/* v261 — Al Habiba Ya Tanger: front first, back on touch/hover. */
section[aria-labelledby="collection-18"] .product-card .product-image.alhabiba-tshirt-image {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 1 / 1;
  background: transparent;
}
section[aria-labelledby="collection-18"] .product-card .product-image.alhabiba-tshirt-image img {
  visibility: visible;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 16px 18px rgba(0,0,0,.24));
}
.alhabiba-tshirt-face {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .42s ease, transform .52s cubic-bezier(.22,.61,.36,1);
}
.alhabiba-tshirt-face--front { opacity: 1; transform: scale(1); }
.alhabiba-tshirt-image:hover .alhabiba-tshirt-face--front,
.alhabiba-tshirt-image:focus-visible .alhabiba-tshirt-face--front,
.alhabiba-tshirt-image.is-touch-back .alhabiba-tshirt-face--front { opacity: 0; transform: scale(.98); }
.alhabiba-tshirt-image:hover .alhabiba-tshirt-face--back,
.alhabiba-tshirt-image:focus-visible .alhabiba-tshirt-face--back,
.alhabiba-tshirt-image.is-touch-back .alhabiba-tshirt-face--back { opacity: 1; transform: scale(1); }
.alhabiba-tshirt-hint {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 2;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 999px;
  background: rgba(10,10,10,.62);
  color: rgba(255,255,255,.86);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.alhabiba-tshirt-image:hover .alhabiba-tshirt-hint,
.alhabiba-tshirt-image:focus-visible .alhabiba-tshirt-hint,
.alhabiba-tshirt-image.is-touch-back .alhabiba-tshirt-hint { opacity: 1; transform: translateY(0); }
.alhabiba-tshirt-image:focus-visible { outline: 2px solid #8224E3; outline-offset: -3px; }

/* Product page: show the supplied front and back together after opening the card. */
body.single-product:is(.postid-46, .postid-33, .postid-94, .postid-100, .postid-76, .postid-88) .wordstore-dual-tshirt-gallery .woocommerce-product-gallery__wrapper {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
body.single-product:is(.postid-46, .postid-33, .postid-94, .postid-100, .postid-76, .postid-88) .wordstore-dual-tshirt-gallery .woocommerce-product-gallery__image {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  background: #151515;
}
body.single-product:is(.postid-46, .postid-33, .postid-94, .postid-100, .postid-76, .postid-88) .wordstore-dual-tshirt-gallery .woocommerce-product-gallery__image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 1 !important;
  visibility: visible !important;
}
@media (max-width: 700px) {
  body.single-product:is(.postid-46, .postid-33, .postid-94, .postid-100, .postid-76, .postid-88) .wordstore-dual-tshirt-gallery .woocommerce-product-gallery__wrapper { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .alhabiba-tshirt-face,
  .alhabiba-tshirt-hint { transition: none; }
}

/* v262 — override v260's empty-slot rule for the supplied T-shirt only. */
section[aria-labelledby="collection-18"] .collection-track > .product-card .product-image.alhabiba-tshirt-image img {
  visibility: visible !important;
}
section[aria-labelledby="collection-18"] .collection-track > .product-card .product-image.alhabiba-tshirt-image {
  background: transparent;
}

/* v267 — keep the supplied two-view gallery visible after WooCommerce refreshes a variation. */
body.single-product:is(.postid-46, .postid-33, .postid-94, .postid-100, .postid-76, .postid-88) .woocommerce-product-gallery:not(.wordstore-dual-tshirt-gallery) {
  visibility: hidden !important;
  opacity: 0 !important;
}
body.single-product:is(.postid-46, .postid-33, .postid-94, .postid-100, .postid-76, .postid-88) .woocommerce-product-gallery.wordstore-dual-tshirt-gallery {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* v263 — refined glass frames inspired by contemporary 21st.dev cards. */
section[aria-labelledby="collection-18"] .collection-track > .product-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% -18%, rgba(130,36,227,.16), transparent 54%),
    linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.018) 48%, rgba(0,0,0,.30));
  box-shadow: 0 16px 38px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.075);
  transform: translateY(0);
  transition: border-color .35s ease, box-shadow .35s ease, transform .35s ease;
}
section[aria-labelledby="collection-18"] .collection-track > .product-card::before {
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: 23px;
  background: linear-gradient(125deg, rgba(255,255,255,.13), transparent 34%, rgba(130,36,227,.10) 78%, transparent);
  content: "";
  opacity: .48;
  pointer-events: none;
}
section[aria-labelledby="collection-18"] .collection-track > .product-card:hover,
section[aria-labelledby="collection-18"] .collection-track > .product-card:focus-within {
  border-color: rgba(130,36,227,.62);
  box-shadow: 0 22px 48px rgba(0,0,0,.38), 0 0 0 1px rgba(130,36,227,.12), 0 0 28px rgba(130,36,227,.13);
  transform: translateY(-4px);
}
section[aria-labelledby="collection-18"] .collection-track > .product-card .product-image {
  border-radius: 21px 21px 0 0;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.07), rgba(12,12,12,.52) 72%);
}
section[aria-labelledby="collection-18"] .collection-track > .product-card .product-info {
  position: relative;
  z-index: 1;
  padding: 16px 17px 18px;
}
section[aria-labelledby="collection-18"] .collection-track > .product-card .product-title,
section[aria-labelledby="collection-18"] .collection-track > .product-card .product-price,
section[aria-labelledby="collection-18"] .collection-track > .product-card .product-link {
  position: relative;
  z-index: 1;
}
@media (max-width: 700px) {
  section[aria-labelledby="collection-18"] .collection-track > .product-card { border-radius: 20px; }
  section[aria-labelledby="collection-18"] .collection-track > .product-card::before { border-radius: 19px; }
}

/* v265 — on touch devices, the back is visible only while the finger is down. */
@media (hover: none), (pointer: coarse) {
  .alhabiba-tshirt-image {
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
  }
  .alhabiba-tshirt-image:hover .alhabiba-tshirt-face--front {
    opacity: 1;
    transform: scale(1);
  }
  .alhabiba-tshirt-image:hover .alhabiba-tshirt-face--back {
    opacity: 0;
    transform: scale(1.02);
  }
  .alhabiba-tshirt-image.is-touch-back .alhabiba-tshirt-face--front {
    opacity: 0;
    transform: scale(.98);
  }
  .alhabiba-tshirt-image.is-touch-back .alhabiba-tshirt-face--back {
    opacity: 1;
    transform: scale(1);
  }
  .alhabiba-tshirt-image:hover .alhabiba-tshirt-hint { opacity: 0; transform: translateY(5px); }
  .alhabiba-tshirt-image.is-touch-back .alhabiba-tshirt-hint { opacity: 1; transform: translateY(0); }
}

/* v277 — the newly added ready-made products must not be hidden by v260's empty-slot rule. */
section[aria-labelledby="collection-18"] .collection-track > .product-card .product-image[href*="/grand-stand-tangier-t-shirt/"] img,
section[aria-labelledby="collection-18"] .collection-track > .product-card .product-image[href*="/word-t-shirt/"] img {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

section[aria-labelledby="collection-18"] .collection-track > .product-card .product-image[href*="/grand-stand-tangier-t-shirt/"],
section[aria-labelledby="collection-18"] .collection-track > .product-card .product-image[href*="/word-t-shirt/"],
section[aria-labelledby="collection-18"] .collection-track > .product-card .product-image[href*="/ferrari-racing/"] {
  background: transparent;
}

section[aria-labelledby="collection-18"] .collection-track > .product-card .product-image[href*="/ferrari-racing/"] img {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* v282 — server-rendered T-max gallery fallback when WooCommerce keeps the old Ferrari gallery. */
body.single-product.postid-88 .woocommerce-product-gallery:not(.wordstore-tmax-gallery) {
  display: none !important;
}
body.single-product.postid-88 .wordstore-tmax-gallery {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
body.single-product.postid-88 .wordstore-tmax-gallery .woocommerce-product-gallery__wrapper {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
body.single-product.postid-88 .wordstore-tmax-gallery .woocommerce-product-gallery__image {
  display: block !important;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  background: #151515;
  min-height: 240px;
}
body.single-product.postid-88 .wordstore-tmax-gallery img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  object-fit: contain;
  visibility: visible !important;
  opacity: 1 !important;
}
@media (max-width: 700px) {
  body.single-product.postid-88 .wordstore-tmax-gallery .woocommerce-product-gallery__wrapper {
    grid-template-columns: 1fr;
  }
}

/* v285 — fill the Custom T-Shirt image square without changing card geometry. */
.custom-design-card--tshirt .custom-design-card-mark {
  width: 100%;
  aspect-ratio: 1 / 1;
}
.custom-design-card--tshirt .custom-design-card-mockup {
  width: 100%;
  height: 100%;
}

/* v286 — minimal 21st.dev-inspired View all link below each arrow pair. */
.collection-track-arrow-group {
  display: grid !important;
  grid-template-columns: 42px 42px;
  grid-template-rows: 42px auto;
  justify-content: center;
  align-items: center;
  column-gap: 10px;
  row-gap: 8px;
  margin-top: 10px;
}
.collection-track-arrow-group .collection-view-all-link {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 0 4px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.9);
  background: transparent;
  color: #fff;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  text-decoration: none;
  transition: color .22s ease, border-color .22s ease, transform .22s ease;
}
.collection-track-arrow-group .collection-view-all-link:hover,
.collection-track-arrow-group .collection-view-all-link:focus-visible {
  border-bottom-color: #8224E3;
  color: #8224E3;
  transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
  .collection-track-arrow-group .collection-view-all-link { transition: none; }
}

/* v287 — FlowButton adaptation from the supplied 21st.dev component. */
.collection-track-arrow-group .collection-view-all-link {
  position: relative;
  overflow: hidden;
  min-height: 38px;
  padding: 10px 34px;
  border: 1.5px solid rgba(255,255,255,.38);
  border-radius: 100px;
  color: #fff;
  letter-spacing: .02em;
  transition: all .6s cubic-bezier(.23,1,.32,1);
}
.collection-track-arrow-group .collection-view-all-link::before,
.collection-track-arrow-group .collection-view-all-link::after {
  position: absolute;
  top: 50%;
  z-index: 2;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  opacity: 0;
  transition: all .8s cubic-bezier(.34,1.56,.64,1);
  transform: translateY(-50%);
}
.collection-track-arrow-group .collection-view-all-link::before {
  content: '→';
  left: -25%;
}
.collection-track-arrow-group .collection-view-all-link::after {
  content: '→';
  right: 14px;
  opacity: 1;
}
.collection-track-arrow-group .collection-view-all-link .collection-view-all-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #8224E3;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: all .8s cubic-bezier(.19,1,.22,1);
}
.collection-track-arrow-group .collection-view-all-link .collection-view-all-label {
  position: relative;
  z-index: 1;
  transform: translateX(-10px);
  transition: transform .8s ease-out;
}
.collection-track-arrow-group .collection-view-all-link:hover,
.collection-track-arrow-group .collection-view-all-link:focus-visible {
  border-color: transparent;
  border-radius: 12px;
  color: #fff;
  transform: translateY(-1px);
}
.collection-track-arrow-group .collection-view-all-link:hover::before,
.collection-track-arrow-group .collection-view-all-link:focus-visible::before {
  left: 14px;
  opacity: 1;
}
.collection-track-arrow-group .collection-view-all-link:hover::after,
.collection-track-arrow-group .collection-view-all-link:focus-visible::after {
  right: -25%;
  opacity: 0;
}
.collection-track-arrow-group .collection-view-all-link:hover .collection-view-all-circle,
.collection-track-arrow-group .collection-view-all-link:focus-visible .collection-view-all-circle {
  width: 220px;
  height: 220px;
  opacity: 1;
}
.collection-track-arrow-group .collection-view-all-link:hover .collection-view-all-label,
.collection-track-arrow-group .collection-view-all-link:focus-visible .collection-view-all-label {
  transform: translateX(10px);
}
@media (prefers-reduced-motion: reduce) {
  .collection-track-arrow-group .collection-view-all-link,
  .collection-track-arrow-group .collection-view-all-link::before,
  .collection-track-arrow-group .collection-view-all-link::after,
  .collection-track-arrow-group .collection-view-all-link .collection-view-all-circle,
  .collection-track-arrow-group .collection-view-all-link .collection-view-all-label { transition: none; }
}

/* v288 — keep the compact FlowButton label on one line at every viewport width. */
.collection-track-arrow-group .collection-view-all-link {
  min-width: 104px;
  white-space: nowrap;
  justify-content: center;
  box-sizing: border-box;
}

/* v289 — remove the decorative arrows from View all and center the label. */
.collection-track-arrow-group .collection-view-all-link::before,
.collection-track-arrow-group .collection-view-all-link::after {
  display: none !important;
  content: none !important;
}
.collection-track-arrow-group .collection-view-all-link .collection-view-all-label,
.collection-track-arrow-group .collection-view-all-link:hover .collection-view-all-label,
.collection-track-arrow-group .collection-view-all-link:focus-visible .collection-view-all-label {
  transform: none;
}

/* v349 — RTL carousel controls: previous on the right, next on the left. */
body.wordstore-lang-ar .collection-track-arrow-group {
  direction: rtl;
}
body.wordstore-lang-ar .collection-track-arrow-group .collection-track-arrow {
  font-size: 0;
}
body.wordstore-lang-ar .collection-track-arrow-group .collection-track-arrow::after {
  display: inline-block;
  font-size: 18px;
  line-height: 1;
}
body.wordstore-lang-ar .collection-track-arrow-group .collection-track-arrow--prev::after {
  content: '→';
}
body.wordstore-lang-ar .collection-track-arrow-group .collection-track-arrow--next::after {
  content: '←';
}
