/* ==========================================================================
   ANFAYA Boutique — Elevated White Surfaces, Warm Shadows & Clean Hierarchy
   ========================================================================== */

/* Split Stage Hero */
.hero-section {
  background-color: transparent;
  padding: 16px 0 20px;
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-section {
    padding: 32px 0 28px;
  }
  .hero-stage {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 48px;
  }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.hero-logo {
  height: 126px;
  width: auto;
  margin: 0 auto 2px;
  animation: anfFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@media (min-width: 900px) {
  .hero-copy {
    align-items: flex-start;
    text-align: start;
  }
  .hero-logo {
    height: 148px;
    margin: 0 0 4px;
  }
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.8vw, 3.1rem);
  font-weight: 600;
  line-height: 1.08;
  color: var(--text-main);
  max-width: 18ch;
  animation: anfFadeUp 0.62s cubic-bezier(0.16, 1, 0.3, 1) 0.06s both;
}

html[lang="ar"] .hero-title {
  font-family: var(--font-ar);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 700;
  line-height: 1.25;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 44ch;
  animation: anfFadeUp 0.62s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

.hero-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
  animation: anfFadeUp 0.62s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
}

.hero-actions .btn-primary,
.hero-actions .btn-outline {
  width: 100%;
  padding: 12px 10px;
  font-size: 0.875rem;
  text-align: center;
}

@media (min-width: 900px) {
  .hero-actions {
    width: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  .hero-actions .btn-primary,
  .hero-actions .btn-outline {
    width: auto;
    padding: 12px 22px;
    font-size: 0.9375rem;
  }
}

/* Pure white hero card with soft warm rose-brown shadow, no gold outline */
.hero-visual {
  background-color: var(--surface-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-visual:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.hero-visual img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}

.hero-visual-caption {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-pale);
}

.hero-visual-name {
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--text-main);
}

html[lang="ar"] .hero-visual-name {
  font-family: var(--font-ar);
  font-size: 1rem;
  font-weight: 700;
}

.hero-visual-price {
  font-weight: 700;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Hero Best-Sellers Sideways Carousel — full-bleed darkish-pink band on mobile, rounded on desktop */
.hero-bestsellers {
  position: relative;
  background: linear-gradient(155deg, #B4485E 0%, #8C3146 100%);
  border-radius: 0;
  box-shadow: none;
  margin-inline: -16px;
  width: calc(100% + 32px);
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  animation: anfFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both;
}

.bs-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

@media (min-width: 900px) {
  .hero-bestsellers {
    margin-inline: 0;
    width: 100%;
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(140, 49, 70, 0.24);
    padding: 20px 22px 18px;
  }
  .bs-head {
    justify-content: space-between;
  }
}

.bs-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  color: rgba(255, 249, 247, 0.94);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[lang="ar"] .bs-badge {
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.88rem;
}

.bs-badge svg {
  width: 13px;
  height: 13px;
  color: #F4D28A;
  flex-shrink: 0;
}

.bs-arrows {
  display: none;
  align-items: center;
  gap: 6px;
}

@media (min-width: 900px) {
  .bs-arrows {
    display: inline-flex;
  }
}

.bs-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.bs-arrow:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.5);
}

.bs-frame-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(46, 16, 24, 0.16);
}

.bs-viewport {
  position: absolute;
  inset: 7% 7%;
  overflow: hidden;
  touch-action: pan-y;
}

.bs-track {
  display: flex;
  height: 100%;
  transition: transform 0.72s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.bs-track.is-dragging {
  transition: none;
}

.bs-slide {
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
}

.bs-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bs-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0.22;
  transform: scale(0.88) translateY(6px);
  transition: opacity 0.55s ease, transform 0.72s cubic-bezier(0.16, 1, 0.3, 1);
}

.bs-slide.is-active .bs-media img {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.bs-caption-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  color: #FFF9F7;
  text-decoration: none;
  padding: 2px 8px 0;
  transition: opacity 0.25s ease;
}

.bs-caption-link .hero-visual-name {
  color: #FFF9F7;
}

.bs-caption-link .hero-visual-price {
  color: #FFFFFF;
}

.bs-caption-link:hover {
  opacity: 0.9;
}

.bs-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-top: 2px;
}

.bs-dot {
  position: relative;
  overflow: hidden;
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
}

.bs-dot.is-active {
  width: 28px;
  background-color: rgba(255, 255, 255, 0.26);
}

.bs-dot.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background-color: #FFFFFF;
  transform-origin: left center;
  animation: bsFill 3.8s linear forwards;
}

html[dir="rtl"] .bs-dot.is-active::after {
  transform-origin: right center;
}

.hero-bestsellers.is-paused .bs-dot.is-active::after {
  animation-play-state: paused;
}

@keyframes bsFill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Keep carousel animations smooth across devices */

/* Filter Strip: Soft Pale-Pink Inactive Chips (No Outline), Solid Rose Active */
.category-strip-wrap {
  background-color: rgba(255, 249, 247, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 0 12px;
  position: sticky;
  top: 64px;
  z-index: var(--z-sticky);
}

@media (min-width: 768px) {
  .category-strip-wrap {
    top: 72px;
  }
}

.category-strip-wrap .container {
  position: relative;
}

.category-strip-wrap .container::after {
  content: "";
  position: absolute;
  top: 0;
  right: 16px;
  bottom: 0;
  width: 32px;
  pointer-events: none;
  background: linear-gradient(to left, var(--surface-page), transparent);
}

html[dir="rtl"] .category-strip-wrap .container::after {
  right: auto;
  left: 16px;
  background: linear-gradient(to right, var(--surface-page), transparent);
}

.category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  padding: 4px 20px 4px 0;
}

html[dir="rtl"] .category-strip {
  padding: 4px 0 4px 20px;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

@media (min-width: 860px) {
  .category-strip-wrap .container::after {
    display: none;
  }
  .category-strip {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 4px 0;
  }
}

.cat-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  background-color: var(--surface-chip);
  border: none;
  border-radius: var(--radius-pill);
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.cat-chip svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.cat-chip img.cat-icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.cat-chip:hover {
  background-color: var(--surface-chip-hover);
  color: var(--brand-rose);
}

.cat-chip.active {
  background-color: var(--brand-rose);
  color: var(--brand-rose-ink);
}

.cat-chip.active svg {
  color: var(--brand-rose-ink);
}

/* Search Bar: One Pure-White Soft Field with Light Warm Shadow */
.catalog-toolbar {
  display: flex;
  align-items: center;
  margin: 16px 0 24px;
}

.search-box {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.search-box svg {
  position: absolute;
  inset-inline-start: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  padding-inline-start: 44px;
  background-color: var(--surface-card);
  border: 1px solid var(--border-pale);
  box-shadow: var(--shadow-field);
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  color: var(--text-main);
}

/* Compact Sort Dropdown Next to Article Count (No Gold Outline) */
.sort-select {
  min-height: 36px;
  padding: 4px 12px;
  background-color: var(--surface-card);
  border: 1px solid var(--border-pale);
  box-shadow: var(--shadow-field);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  color: var(--text-main);
  cursor: pointer;
}

/* Product Grid: 2-col Mobile, 3-col Tablet, 4-col Desktop */
.catalog-main {
  padding-top: 8px;
  padding-bottom: 64px;
}

.product-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 720px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (min-width: 1080px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }
}

/* Pure White Product Card with Soft Wide Warm Shadow, Generous Padding, No Gold Border */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--surface-card);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  color: inherit;
  transition: box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.product-card:active {
  box-shadow: var(--shadow-card);
  transform: scale(0.985);
}

.product-card-media {
  position: relative;
  background-color: var(--surface-card);
  aspect-ratio: 1 / 1;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-card-media img {
  transform: scale(1.05);
}

/* Soft Green-Grey Neutral Stock Pill (NOT gold) */
.stock-pill {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 3;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background-color: var(--stock-ok-bg);
  color: var(--stock-ok-text);
}

.stock-pill.out {
  background-color: var(--stock-out-bg);
  color: var(--stock-out-text);
}

.product-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 4px 16px 16px;
}

@media (min-width: 768px) {
  .product-card-body {
    padding: 4px 20px 20px;
  }
}

/* Product Name Clearly Larger Than Metadata */
.product-card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-main);
}

html[lang="ar"] .product-card-title {
  font-family: var(--font-ar);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

/* Small Soft Grey-Brown Metadata (Pieces & Ref) */
.product-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.meta-chip svg {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
}

/* Bold Charcoal Price */
.product-card-price {
  margin-top: auto;
  padding-top: 8px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

/* Commander Button: The Only Strong Rose Element on the Card */
.product-card-cta {
  display: block;
  margin-top: 4px;
  padding: 12px;
  text-align: center;
  background-color: var(--brand-rose);
  color: var(--brand-rose-ink);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.15s ease;
}

.product-card:hover .product-card-cta {
  background-color: var(--brand-rose-hover);
}

.empty-state {
  text-align: center;
  padding: 48px 16px;
  background-color: var(--surface-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  color: var(--text-muted);
}

/* ==========================================================================
   Product Detail Page (Mobile-First + 2-Column Desktop)
   ========================================================================== */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 16px 0;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--brand-rose);
}

.pdp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding-bottom: 96px;
}

@media (min-width: 900px) {
  .pdp-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 36px;
    align-items: start;
    padding-bottom: 64px;
  }
}

.pdp-gallery-card,
.pdp-info-card {
  background-color: var(--surface-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

@media (min-width: 900px) {
  .pdp-gallery-card {
    position: sticky;
    top: 96px;
  }
}

.pdp-main-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 480px;
  object-fit: contain;
  margin-inline: auto;
}

.pdp-thumbs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-pale);
  overflow-x: auto;
}

.pdp-thumb-btn {
  width: 60px;
  height: 60px;
  padding: 4px;
  border: 1px solid var(--border-pale);
  border-radius: var(--radius-sm);
  background-color: var(--surface-card);
  cursor: pointer;
}

.pdp-thumb-btn.active {
  border-color: var(--brand-rose);
}

.pdp-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pdp-category-tag {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: inline-block;
}

.pdp-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 2.8vw, 2.35rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-main);
  margin-bottom: 12px;
}

html[lang="ar"] .pdp-title {
  font-family: var(--font-ar);
  font-size: 1.6rem;
  font-weight: 700;
}

.pdp-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pdp-spec-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background-color: var(--surface-page);
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.pdp-spec-badge svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.pdp-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border-pale);
  border-bottom: 1px solid var(--border-pale);
  margin-bottom: 16px;
}

/* Bold Charcoal Price */
.pdp-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.pdp-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.65;
  max-width: 60ch;
}

.delivery-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.delivery-opt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  background-color: var(--surface-card);
  text-align: start;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.delivery-opt.active {
  border-color: var(--brand-rose);
  background-color: var(--surface-chip);
}

.delivery-opt:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.delivery-opt-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.delivery-opt-price {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  background-color: var(--surface-card);
  overflow: hidden;
}

.qty-btn {
  width: 44px;
  height: 44px;
  border: none;
  background-color: var(--surface-page);
  color: var(--text-main);
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
}

.qty-btn:hover {
  background-color: var(--surface-chip);
}

.qty-control input {
  width: 48px;
  height: 44px;
  border: none;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  background-color: var(--surface-card);
  font-variant-numeric: tabular-nums;
}

.order-totals {
  background-color: var(--surface-page);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.order-totals-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.order-totals-row.grand {
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid var(--border-pale);
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.125rem;
}

.mobile-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--surface-card);
  box-shadow: 0 -4px 20px rgba(96, 60, 68, 0.08);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 50;
}

.mobile-sticky-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 900px) {
  .mobile-sticky-bar {
    display: none;
  }
}

.info-card {
  background-color: var(--surface-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 32px 24px;
  max-width: 820px;
  margin: 32px auto 64px;
}

.info-card h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--brand-gold);
}

.info-card h2 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  color: var(--text-main);
  margin: 24px 0 8px;
}

.info-card p, .info-card li {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  max-width: 65ch;
}

.info-card ul {
  padding-inline-start: 20px;
  margin-bottom: 12px;
}

/* Fixed aspect ratios to prevent layout jump */
.hero-visual img,
.pdp-main-img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background-color: var(--surface-card);
}

/* Consistent LTR isolation for prices & numeric values in RTL */
.hero-visual-price,
.product-card-price,
.pdp-price,
.mobile-sticky-price,
.delivery-opt-price,
.order-totals-row span:last-child {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

/* RTL refinements */
html[dir="rtl"] .rtl-flip {
  display: inline-block;
  transform: scaleX(-1);
}

html[dir="rtl"] .qty-control {
  direction: ltr;
}

html[dir="rtl"] input[type="tel"] {
  direction: ltr;
  text-align: right;
}

/* Out of stock CTA on cards */
.product-card-cta.out {
  background-color: var(--stock-out-bg);
  color: var(--stock-out-text);
}

/* Brand-styled Order Confirmation Card */
.order-confirm-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-pale);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.order-confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--stock-ok-bg);
  color: var(--stock-ok-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.order-confirm-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-main);
}

html[lang="ar"] .order-confirm-title {
  font-family: var(--font-ar);
  font-size: 1.25rem;
  font-weight: 700;
}

.order-confirm-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 38ch;
}

.order-confirm-ref {
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background-color: var(--surface-chip);
  color: var(--brand-rose);
  font-size: 0.84rem;
  font-weight: 600;
  direction: ltr;
  unicode-bidi: isolate;
}

/* Empty state card */
.empty-state {
  background-color: var(--surface-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

/* Showcase demo bar */
.demo-switcher-bar {
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background-color: var(--surface-card);
  box-shadow: var(--shadow-field);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}

.demo-switcher-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.demo-switcher-bar .sort-select {
  flex: 1;
  min-width: 200px;
}

@media (max-width: 899px) {
  .pdp-page-body {
    padding-bottom: 84px;
  }
}

/* Visual "Nos Catégories" 2x2 Grid right below Header */
.collection-tiles-sec {
  padding: 20px 0 24px;
}

.cat-grid-head {
  text-align: center;
  margin-bottom: 18px;
}

.cat-grid-title {
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 3.2vw, 2.2rem);
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.15;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

html[lang="ar"] .cat-grid-title {
  font-family: var(--font-ar);
  font-size: clamp(1.4rem, 2.8vw, 1.85rem);
  font-weight: 700;
}

.cat-grid-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 38px;
  height: 2px;
  background-color: var(--brand-gold);
  border-radius: 2px;
}

.cat-grid-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 44ch;
  margin: 8px auto 0;
  line-height: 1.45;
}

.collection-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 900px) {
  .collection-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }
}

.col-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: var(--surface-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: block;
  color: #FFFFFF;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.col-tile:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.col-tile-media {
  width: 100%;
  height: 100%;
  background-color: var(--surface-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.col-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.col-tile-media.is-contain img {
  object-fit: contain;
  padding: 12px 12px 40px;
}

.col-tile:hover .col-tile-media img {
  transform: scale(1.04);
}

.col-tile-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 12px 12px;
  background: linear-gradient(to top, rgba(46, 42, 43, 0.78) 0%, rgba(46, 42, 43, 0.34) 58%, transparent 100%);
  text-align: center;
  z-index: 2;
}

.col-tile::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: url("images/frame/square%20frame.png") center / contain no-repeat;
  opacity: 0.28;
  pointer-events: none;
  z-index: 3;
}

.col-tile-title {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

html[lang="ar"] .col-tile-title {
  font-family: var(--font-ar);
  font-size: 0.96rem;
}

/* LEGO.com-Inspired Sideways Scrollable Category Shelves */
.h-shelf {
  margin-bottom: 34px;
}

.h-shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--brand-gold);
}

.h-shelf-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.h-shelf-title-wrap img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.h-shelf-see-all {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-rose);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
}

.h-shelf-see-all:hover {
  color: var(--brand-rose-hover);
}

.h-track-outer {
  position: relative;
  margin-inline: -16px;
}

.shelf-arrow {
  position: absolute;
  top: 44%;
  transform: translateY(-50%);
  z-index: 4;
  width: 24px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-rose);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.shelf-arrow svg {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 1px 2px rgba(255, 249, 247, 0.95));
}

.shelf-arrow.is-prev {
  inset-inline-start: 2px;
}

.shelf-arrow.is-next {
  inset-inline-end: 2px;
}

.shelf-arrow:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.12);
}

.shelf-arrow.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.8);
}

@media (min-width: 768px) {
  .shelf-arrow.is-prev {
    inset-inline-start: -18px;
  }
  .shelf-arrow.is-next {
    inset-inline-end: -18px;
  }
}

.h-track-outer::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  background: linear-gradient(to left, var(--surface-page), transparent);
}

html[dir="rtl"] .h-track-outer::after {
  right: auto;
  left: 0;
  background: linear-gradient(to right, var(--surface-page), transparent);
}

.h-track {
  list-style: none;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  padding: 4px 20px 14px 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

html[dir="rtl"] .h-track {
  padding: 4px 16px 14px 20px;
}

.h-track::-webkit-scrollbar {
  display: none;
}

.h-track > li {
  flex: 0 0 218px;
  scroll-snap-align: start;
  display: flex;
}

.h-track > li > .product-card {
  width: 100%;
}

@media (min-width: 768px) {
  .h-track-outer {
    margin-inline: 0;
  }
  .h-track {
    padding: 4px 4px 14px 4px;
    gap: 18px;
  }
  .h-track > li {
    flex: 0 0 256px;
  }
}

/* Fix sort select width & padding on narrow screens */
.sort-select {
  min-height: 40px;
  padding: 6px 34px 6px 14px;
  font-size: 0.85rem;
}

html[dir="rtl"] .sort-select {
  padding: 6px 14px 6px 34px;
}
