/* Shop only — continuous editorial backdrop, frosted controls and product grid.
   The shared homepage styles, catalog and interaction controllers are unchanged. */
body[data-page="shop"] .shop-page [hidden] { display: none !important; }
.shop-page { background: var(--c-bg); }
.shop-discovery { position: relative; isolation: isolate; background: var(--c-bg); }
.shop-discovery__backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: var(--c-fig);
}
.shop-discovery__backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 57% 32%;
}
.shop-discovery__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, transparent 0%, transparent 40%, #f6efe740 59%, #f6efe7c9 78%, var(--c-bg) 100%),
    linear-gradient(90deg, #2a1520e8 0%, #2a1520a8 34%, #2a15204a 70%, #2a15201f 100%),
    linear-gradient(180deg, #2a15204d 0%, transparent 27%);
}
.shop-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  min-height: clamp(295px, 25vw, 365px);
  padding: clamp(102px, 8.4vw, 120px) 0 clamp(26px, 3vw, 40px);
  color: var(--c-cream);
}
.shop-hero__copy { max-width: 660px; min-width: 0; }
.shop-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: var(--fs-sm); color: var(--c-cream-2); margin-bottom: clamp(16px, 1.9vw, 24px); }
.shop-breadcrumb a { text-decoration: underline; text-underline-offset: 4px; }
.shop-breadcrumb [aria-current="page"] { color: var(--c-cream); }


.shop-hero h1 { font: 500 clamp(3.1rem, 5.7vw, 5.65rem)/1.02 var(--font-body); letter-spacing: -.045em; color: var(--c-cream); text-shadow: 0 2px 18px #2a15205c; }
.shop-hero h1 em { color: var(--c-apricot); letter-spacing: -.02em; }
.shop-hero__description { max-width: 45ch; margin-top: 15px; line-height: 1.65; font-size: var(--fs-md); color: var(--c-cream); text-shadow: 0 1px 10px #2a15208a; }




/* The background remains visible through the glass panel and fades into the page below. */
.shop-catalog { position: relative; padding: 0 0 24px; scroll-margin-top: 92px; }
.shop-filter-panel {
  border: 1px solid #fbf6f0d9;
  border-radius: clamp(20px, 2.2vw, 30px);
  padding: clamp(20px, 2.15vw, 30px);
  background: #fbf6f0f2; /* opaque-enough fallback when backdrop-filter is unavailable */
  box-shadow: 0 18px 54px #2a152016, inset 0 1px 0 #ffffff9e;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .shop-filter-panel {
    background: #fbf6f0cf;
    -webkit-backdrop-filter: blur(18px) saturate(1.12);
    backdrop-filter: blur(18px) saturate(1.12);
  }
}
.shop-eyebrow { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #9b4828; margin-bottom: 8px; }

.shop-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.shop-section-heading h2 { color: var(--c-ink); font-size: clamp(1.95rem, 3.1vw, 3.1rem); line-height: 1.14; }
.shop-section-heading__description { color: var(--c-muted); max-width: 33ch; font-size: var(--fs-sm); line-height: 1.55; }
.shop-filters { margin: 0; }
.shop-categories { margin: 0 0 14px; min-width: 0; padding: 2px 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.shop-category { position: relative; display: inline-flex; }
.shop-category input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.shop-category > span { display: inline-flex; align-items: center; gap: 9px; border: 1px solid #2a152026; border-radius: 99px; background: #fbf6f09e; color: var(--c-ink); padding: 9px 14px; min-height: 42px; white-space: nowrap; font-size: var(--fs-sm); font-weight: 500; transition: background-color .25s,color .25s,border-color .25s,box-shadow .25s; }
.shop-category small { display: grid; place-items: center; min-width: 23px; height: 23px; padding-inline: 5px; border-radius: 99px; background: #2a15200d; color: var(--c-muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.shop-category input:checked + span { background: var(--c-fig); color: var(--c-cream); border-color: var(--c-fig); box-shadow: 0 5px 12px #2a152020; }
.shop-category input:checked + span small { background: #fbf3ea21; color: var(--c-cream); }
.shop-category input:focus-visible + span { outline: 2px solid var(--c-clay); outline-offset: 2px; }
@media (hover: hover) { .shop-category input:not(:checked):hover + span { background: var(--c-paper); border-color: #2a152059; } }
.shop-toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: stretch; gap: 10px; }
.shop-search, .shop-sort { min-height: 50px; border: 1px solid #2a152026; border-radius: 99px; background: #fbf6f0bf; display: flex; align-items: center; gap: 10px; padding: 0 18px; transition: background-color .25s,border-color .25s; }
.shop-search svg { flex: 0 0 19px; width: 19px; height: 19px; color: var(--c-muted); }
.shop-search input { min-width: 0; width: 100%; min-height: 48px; border: 0; outline: none; background: transparent; color: var(--c-ink); font-size: max(16px, var(--fs-sm)); }
.shop-search input::placeholder { color: var(--c-muted); opacity: .9; }
.shop-search:focus-within, .shop-sort:focus-within { outline: 2px solid var(--c-clay); outline-offset: 2px; background: var(--c-paper); }
.shop-sort span { color: var(--c-muted); font-size: var(--fs-xs); white-space: nowrap; }
.shop-sort select { font: inherit; font-size: var(--fs-sm); color: var(--c-ink); border: 0; background: transparent; outline: none; max-width: 210px; cursor: pointer; }
.shop-sort select option { color: var(--c-ink); background: var(--c-paper); }
.shop-filter-submit { justify-content: center; min-height: 50px; padding-inline: 24px; }
.shop-results { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid #2a15201a; margin-top: 19px; padding-top: 14px; color: var(--c-muted); font-size: var(--fs-sm); }
.shop-clear { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 15px; border-radius: 99px; border: 1px solid var(--c-line); background: #fbf6f099; font-weight: 600; color: var(--c-ink); text-decoration: none; transition: background .25s, color .25s, border-color .25s; }
.shop-back-top { display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--c-line); background: var(--c-paper); color: var(--c-fig); transition: background .25s, color .25s, border-color .25s; }
.shop-back-top svg { width: 21px; height: 21px; }
@media (hover: hover) { .shop-clear:hover, .shop-back-top:hover { background: var(--c-fig); color: var(--c-cream); border-color: var(--c-fig); } }
.shop-back-top:focus-visible { border-radius: 50%; }
.shop-clear svg { width: 15px; height: 15px; flex: 0 0 15px; }

/* Keep the actual catalog images undistorted, with consistent product-card geometry. */
.shop-products { padding: 5px 0 clamp(48px, 7vw, 88px); }
.shop-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(12px, 1.65vw, 24px); }
.shop-grid .pcard { min-width: 0; border: 1px solid var(--c-line); border-radius: clamp(16px, 1.6vw, 22px); box-shadow: 0 3px 14px #2a152006; transition: box-shadow .3s,border-color .3s; }
html.js:not(.reduced) body[data-page="shop"] .shop-grid .pcard { opacity: 1; }
.shop-grid .pcard__media { aspect-ratio: 1; background: var(--c-sand); }
.shop-grid .pcard__media img { object-fit: contain; }
.shop-grid .pcard__swatches { padding: 15px 16px 0; }
.shop-grid .pcard__variant { margin: 0; font-size: var(--fs-xs); }
.shop-grid .pcard__name { font-size: var(--fs-md); line-height: 1.45; min-height: 3.4em; padding: 9px 16px 0; }
.shop-grid .pcard__row { gap: 8px; flex-wrap: wrap; padding: 14px 16px 16px; }
.shop-grid .pcard__price { white-space: nowrap; font-size: var(--fs-md); }
.shop-grid .cart-btn { white-space: nowrap; min-height: 36px; padding: 8px 15px; }
.shop-grid .tag { background: #fbf6f0e8; padding: 5px 11px; }
@media (hover: hover) {
  .shop-grid .pcard:hover { box-shadow: 0 10px 30px #2a152016; border-color: #2a152036; }
  .shop-grid .pcard:hover .pcard__media img { transform: scale(1.035); }
}
.shop-empty { padding: clamp(40px, 7vw, 90px) 18px; border: 1px solid var(--c-line); border-radius: var(--r-lg); background: var(--c-paper); text-align: center; display: grid; justify-items: center; gap: 14px; }
.shop-empty__icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--c-sand); color: var(--c-fig); }
.shop-empty__icon svg { width: 24px; height: 24px; }
.shop-empty h2 { font-size: var(--fs-lg); }
.shop-empty p { color: var(--c-muted); }
.shop-note { display: flex; align-items: center; gap: 14px; margin-top: 36px; padding: 22px 0 0; border-top: 1px solid var(--c-line); }

.shop-note p { flex: 1; color: var(--c-muted); }
.shop-note em { color: var(--c-ink); }

html[lang="ar"] .shop-discovery__backdrop::after {
  background: linear-gradient(to bottom, transparent 0%, transparent 40%, #f6efe740 59%, #f6efe7c9 78%, var(--c-bg) 100%),
              linear-gradient(270deg, #2a1520e8 0%, #2a1520a8 34%, #2a15204a 70%, #2a15201f 100%),
              linear-gradient(180deg, #2a15204d 0%, transparent 27%);
}
html[lang="ar"] .shop-hero h1, html[lang="ar"] .shop-hero h1 em, html[lang="ar"] .shop-eyebrow, html[lang="ar"] .shop-hero__eyebrow, html[lang="ar"] .shop-hero__detail { letter-spacing: normal; }
html[lang="ar"] .shop-hero h1 { line-height: 1.28; }
html[lang="ar"] .shop-grid .tag { left: auto; right: 12px; }
@media (width <= 1100px) { .shop-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (width <= 820px) {
  .shop-hero { min-height: 255px; padding: 91px 0 28px; align-items: center; }
  .shop-hero__copy { max-width: 520px; }
  .shop-breadcrumb { margin-bottom: 18px; }

  .shop-hero h1 { font-size: clamp(2.15rem, 8vw, 3.65rem); line-height: 1.12; }
  .shop-hero__description { font-size: .92rem; line-height: 1.55; margin-top: 12px; }

  .shop-discovery__backdrop img { object-position: 56% 22%; }
  .shop-discovery__backdrop::after, html[lang="ar"] .shop-discovery__backdrop::after {
    background: linear-gradient(to bottom,#2a1520e0 0%,#2a1520ba 40%,#f6efe76b 65%,#f6efe7dc 87%,var(--c-bg) 100%);
  }
  .shop-filter-panel { padding: 20px 16px 16px; border-radius: 23px; }
  .shop-catalog { padding-bottom: 19px; }
  .shop-section-heading { flex-direction: column; align-items: flex-start; gap: 9px; margin-bottom: 18px; }
  .shop-section-heading h2 { font-size: 1.85rem; }
  .shop-section-heading__description { max-width: none; font-size: .85rem; }
  .shop-categories { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; padding: 4px 4px 6px; margin: -4px -4px 11px; }
  .shop-categories::-webkit-scrollbar { display: none; }
  .shop-category { flex: 0 0 auto; }
  .shop-category > span { min-height: 40px; padding: 8px 12px; }
  .shop-toolbar { grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
  .shop-search { grid-column: 1/-1; padding-inline: 14px; }
  .shop-sort { min-width: 0; padding-inline: 12px; }
  .shop-sort select { min-width: 0; width: 100%; font-size: .85rem; }
  .shop-filter-submit { padding-inline: 17px; }
  .shop-results { margin-top: 15px; padding-top: 12px; font-size: .85rem; }
  .shop-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .shop-grid .pcard__name { font-size: .94rem; min-height: 3.6em; padding-inline: 11px; }
  .shop-grid .pcard__swatches { padding-inline: 11px; }
  .shop-grid .pcard__row { padding: 12px 11px; align-items: center; }
  .shop-grid .cart-btn { padding: 7px 11px; }
  .shop-grid .tag { font-size: .75rem; top: 8px; left: 8px; }
  html[lang="ar"] .shop-grid .tag { right: 8px; }
  .shop-note { flex-wrap: wrap; font-size: var(--fs-sm); }

}
@media (width <= 480px) {
  .shop-grid .pcard__row { flex-direction: column; align-items: stretch; }
  .shop-grid .cart-btn { text-align: center; min-height: 40px; }
}
@media (width <= 380px) {
  .shop-grid { gap: 9px; }
  .shop-sort > span { display: none; }
  .shop-filter-panel { padding-inline: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  .shop-hero__copy { animation: shop-reveal .7s var(--ease-out) both; }
  .shop-discovery__backdrop img { animation: shop-photo-reveal 1.05s var(--ease-out) both; }
  .shop-filter-panel { animation: shop-reveal .8s .12s var(--ease-out) backwards; }
}
@keyframes shop-reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shop-photo-reveal { from { transform: scale(1.035); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .shop-category > span, .shop-grid .pcard, .shop-search, .shop-sort, .shop-grid .pcard__media img { transition: none; }
  .shop-grid .pcard:hover .pcard__media img { transform: none; }
}
