* { box-sizing: border-box; }
body { margin: 0; background: #FEFDF8; color: #1C1917; font-family: Inter, -apple-system, system-ui, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.shop-intro { text-align: center; padding: 60px 20px 32px; background: linear-gradient(135deg, #FFF0E6 0%, #FFFBEB 100%); }
.shop-intro h1 { margin: 0 0 8px; color: #92400E; font: 700 2.2rem/1.2 "Fraunces", Georgia, serif; }
.shop-intro p { max-width: 620px; margin: 0 auto 20px; color: #78716C; font-size: 1.05rem; line-height: 1.6; }
.shop-note { display: inline-block; padding: 6px 16px; border: 1px solid #E7DDD0; border-radius: 100px; color: #57534E; background: rgba(255,255,255,.8); font-size: .8rem; }
.shop-note a { color: #92400E; }

.shop-catalog { max-width: 1320px; margin: 0 auto; padding: 24px 20px 80px; }

/* ── Layout: filter sidebar + results ── */
.shop-layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 28px; align-items: start; }
.shop-filters { position: sticky; top: calc(88px + var(--dq-h, 0px)); max-height: calc(100vh - 108px - var(--dq-h, 0px)); display: flex; flex-direction: column; border: 1px solid #E7DDD0; border-radius: 14px; background: #fff; overflow: hidden; }
.shop-filters__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #F0E9DF; }
.shop-filters__head h2 { margin: 0; font: 700 1rem/1.2 Inter, sans-serif; color: #1C1917; }
.shop-filters__close { display: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #F5F3F1; color: #1C1917; font-size: 1.4rem; line-height: 1; }
.shop-filters__body { flex: 1; overflow-y: auto; padding: 6px 10px 12px; overscroll-behavior: contain; }
.filter-block { padding: 10px 4px; border-bottom: 1px solid #F5EFE6; }
.filter-block:last-child { border-bottom: 0; }
.filter-block h3 { margin: 4px 6px 8px; color: #78716C; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.filter-option, .filter-group__toggle { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 10px; border: 0; border-radius: 8px; color: #44403C; background: transparent; font-size: .86rem; line-height: 1.3; text-align: left; }
.filter-option__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-option:hover, .filter-group__toggle:hover { background: #F7F4EF; }
.filter-option.is-selected { color: #241447; background: #EEEAF6; font-weight: 600; }
.filter-option.is-selected .filter-option__count { color: #241447; }
.filter-option__count { flex: 0 0 auto; min-width: 32px; color: #A8A29E; font-size: .76rem; font-variant-numeric: tabular-nums; text-align: right; }
.filter-group__toggle { margin-top: 2px; color: #1C1917; font-weight: 600; }
.filter-group__chevron { flex: 0 0 auto; color: #78716C; transition: transform .2s; }
.filter-group.is-open .filter-group__chevron { transform: rotate(180deg); }
.filter-group__items { display: none; margin: 2px 0 6px 14px; padding-left: 8px; border-left: 1px solid #ECE6DC; }
.filter-group.is-open .filter-group__items { display: block; }
.filter-group__items .filter-option { min-height: 32px; font-size: .84rem; }
.filter-more { margin: 4px 8px; padding: 0; border: 0; background: none; color: #241447; font-size: .8rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.shop-filters__foot { display: none; }

.shop-toolbar__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.shop-search input, .shop-sort select { width: 100%; min-height: 42px; padding: 9px 12px; border: 1.5px solid #E7DDD0; border-radius: 10px; color: #44403C; background: #fff; }
.shop-search input:focus, .shop-sort select:focus { outline: 2px solid rgba(36,20,71,.18); border-color: #241447; }
.shop-filters-open { display: none; }
.shop-dept-chips { display: none; }
.shop-results { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 0 6px; }
.shop-results h2 { margin: 0; color: #1C1917; font: 700 1.25rem/1.25 "Fraunces", Georgia, serif; }
.shop-status { margin: 0; color: #78716C; font-size: .85rem; white-space: nowrap; }
.shop-types { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.shop-types[hidden] { display: none; }
.shop-type { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1.5px solid #E7DDD0; border-radius: 100px; color: #44403C; background: #fff; font-size: .82rem; font-weight: 500; white-space: nowrap; transition: border-color .15s, background .15s; }
.shop-type span { color: #A8A29E; font-size: .74rem; font-variant-numeric: tabular-nums; }
.shop-type:hover { border-color: #241447; }
.shop-type.is-selected { border-color: #241447; color: #FDE68A; background: #241447; }
.shop-type.is-selected span { color: #CFC6E6; }
.shop-type--more { border-style: dashed; color: #241447; }
.shop-active { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.shop-active:empty { display: none; }
.shop-active__chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid #D9D2EA; border-radius: 100px; color: #241447; background: #F4F1FA; font-size: .78rem; font-weight: 500; }
.shop-active__chip span { font-size: 1rem; line-height: 1; }
.shop-active__clear { padding: 5px 8px; border: 0; background: none; color: #78716C; font-size: .78rem; text-decoration: underline; text-underline-offset: 3px; }
.shop-filters-backdrop { position: fixed; inset: 0; z-index: 1090; background: rgba(15,20,31,.55); }
.shop-filters-backdrop[hidden] { display: none; }

/* ── Mobile: sticky search bar, department chips, filters as a slide-up panel ── */
@media (max-width: 899px) {
  .shop-catalog { padding: 0 0 90px; }
  .shop-layout { display: block; }
  .shop-toolbar { position: sticky; top: calc(69px + var(--dq-h, 0px)); z-index: 50; padding: 10px 12px 8px; background: #FEFDF8; border-bottom: 1px solid #F0E9DF; }
  .shop-toolbar__row { grid-template-columns: 1fr 1fr; }
  .shop-search { grid-column: 1 / -1; }
  .shop-filters-open { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border: 1.5px solid #E7DDD0; border-radius: 10px; color: #241447; background: #fff; font-weight: 600; font-size: .88rem; }
  .shop-filters-open__count { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 100px; color: #FDE68A; background: #241447; font-size: .72rem; }
  .shop-filters-open__count[hidden] { display: none; }
  .shop-sort select { min-height: 40px; font-size: .88rem; }
  .shop-dept-chips { display: flex; gap: 6px; margin: 10px -12px 0; padding: 0 12px 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .shop-dept-chips::-webkit-scrollbar { display: none; }
  .shop-dept-chips button { flex: 0 0 auto; padding: 6px 13px; border: 1.5px solid #E7DDD0; border-radius: 100px; color: #57534E; background: #fff; font-size: .8rem; font-weight: 500; white-space: nowrap; }
  .shop-dept-chips button[aria-selected="true"] { border-color: #241447; color: #FDE68A; background: #241447; }
  .shop-main > .shop-results, .shop-main > .shop-active, .shop-main > .shop-grid, .shop-main > .shop-more, .shop-main > .shop-disclaimer { margin-left: 12px; margin-right: 12px; }
  .shop-results { margin-top: 14px; }
  .shop-main > .shop-types { flex-wrap: nowrap; overflow-x: auto; margin: 4px 0 12px; padding: 0 12px 2px; scrollbar-width: none; }
  .shop-main > .shop-types::-webkit-scrollbar { display: none; }
  .shop-type { flex: 0 0 auto; }
  .shop-results h2 { font-size: 1.1rem; }

  .shop-filters { position: fixed; top: auto; right: 0; bottom: 0; left: 0; z-index: 1100; max-height: 88vh; max-height: 88dvh; border: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.25); transform: translateY(105%); transition: transform .28s ease; visibility: hidden; }
  .shop-filters.is-open { transform: translateY(0); visibility: visible; }
  .shop-filters__head { padding: 14px 16px 12px; }
  .shop-filters__head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; border-radius: 4px; background: #E7DDD0; transform: translateX(-50%); }
  .shop-filters__close { display: grid; place-items: center; }
  .filter-option, .filter-group__toggle, .filter-group__items .filter-option { min-height: 44px; font-size: .92rem; }
  .shop-filters__foot { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #F0E9DF; background: #fff; }
  .shop-filters__clear { padding: 0 14px; border: 1.5px solid #E7DDD0; border-radius: 10px; color: #57534E; background: #fff; font-weight: 600; }
  .shop-filters__apply { min-height: 46px; border: 0; border-radius: 10px; color: #FDE68A; background: #241447; font-weight: 700; }
  body.shop-filters-locked { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .shop-filters { transition: none; } }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.shop-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #E7DDD0; border-radius: 14px; background: #fff; transition: transform .25s, box-shadow .25s, border-color .25s; }
.shop-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(217,119,6,.12); }
.shop-card.in-basket { border-color: #D97706; }
.shop-card__image { position: relative; width: 100%; aspect-ratio: 1; padding: 12px; border: 0; border-bottom: 1px solid #F5EFE6; background: #fff; cursor: zoom-in; }
.shop-card__image img { width: 100%; height: 100%; object-fit: contain; }
.shop-card__body { flex: 1; display: flex; flex-direction: column; padding: 12px 14px 14px; }
.shop-card__category { margin: 0 0 4px; color: #A8A29E; font-size: .72rem; font-weight: 500; }
.shop-card h2 { margin: 0 0 8px; color: #1C1917; font: 600 .88rem/1.35 Inter, sans-serif; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.shop-card__variant select { width: 100%; min-height: 36px; padding: 6px 8px; border: 1.5px solid #E7DDD0; border-radius: 8px; color: #57534E; background: #fff; font-size: .78rem; }
.shop-card__size { margin: 0; color: #78716C; font-size: .78rem; }
.shop-card__note { margin: 8px 0 0; color: #92400E; font-size: .7rem; line-height: 1.35; }
.shop-card__footer { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shop-price strong { display: block; font-size: 1.05rem; }
.shop-price small { display: block; color: #A8A29E; font-size: .7rem; }
.shop-add { min-width: 72px; min-height: 36px; padding: 8px 14px; border: 0; border-radius: 10px; color: #fff; background: #D97706; font-size: .82rem; font-weight: 600; transition: background .2s; }
.shop-add:hover { background: #B45309; }
.shop-qty { display: flex; align-items: center; border: 2px solid #D97706; border-radius: 10px; overflow: hidden; background: #FFF7ED; }
.shop-qty button { width: 30px; height: 32px; border: 0; color: #92400E; background: transparent; font-size: 1.05rem; font-weight: 700; }
.shop-qty span { min-width: 22px; text-align: center; color: #92400E; font-weight: 700; }
.shop-empty { grid-column: 1 / -1; padding: 70px 20px; text-align: center; color: #78716C; border: 1px dashed #E7DDD0; border-radius: 14px; }
.shop-more { display: flex; justify-content: center; padding: 28px 0 8px; }
.shop-more button { padding: 10px 22px; border: 1.5px solid #92400E; border-radius: 100px; color: #92400E; background: #fff; font-weight: 600; }
.shop-more button:hover { color: #fff; background: #92400E; }
.shop-disclaimer { max-width: 760px; margin: 24px auto 0; color: #A8A29E; font-size: .75rem; line-height: 1.5; text-align: center; }

.shop-basket-bar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 900; display: none; align-items: center; justify-content: space-between; padding: 14px 20px; color: #fff; background: #1C1917; box-shadow: 0 -4px 20px rgba(0,0,0,.2); }
.shop-basket-bar.visible { display: flex; }
.shop-basket-bar__info { display: flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 500; }
.shop-basket-bar__info > span:first-child { min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #D97706; font-size: .78rem; font-weight: 700; }
.shop-basket-bar button { padding: 8px 16px; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; color: #fff; background: transparent; font-size: .82rem; }

.shop-image-dialog { width: min(640px, calc(100vw - 28px)); padding: 24px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.28); }
.shop-image-dialog::backdrop { background: rgba(15,20,31,.7); }
.shop-image-dialog img { display: block; width: 100%; max-height: 75vh; object-fit: contain; }
.shop-image-dialog button { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%; color: #fff; background: rgba(28,25,23,.85); font-size: 1.5rem; line-height: 1; }

@media (max-width: 760px) {
  .shop-intro { padding: 40px 18px 28px; }
  .shop-intro h1 { font-size: 1.85rem; }
  .shop-catalog { padding: 14px 12px 80px; }
    .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .shop-card__body { padding: 10px; }
  .shop-card__footer { flex-wrap: wrap; }
  .shop-add, .shop-qty { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}


/* ── Festive theme: navy header band + navy/gold buttons on the light catalogue ── */
body[data-theme="diwali"] .shop-intro {
  background:
    radial-gradient(900px 380px at 80% -20%, rgba(245,158,11,0.22), transparent 60%),
    radial-gradient(700px 320px at 8% 120%, rgba(219,39,119,0.16), transparent 60%),
    linear-gradient(160deg, #1A1033 0%, #241447 60%, #0E0722 100%);
  border-bottom: 1px solid rgba(184,134,11,0.3);
}
body[data-theme="diwali"] .shop-intro h1 { background: var(--gold-foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
body[data-theme="diwali"] .shop-intro p { color: #E7D9C4; }
body[data-theme="diwali"] .shop-intro .store-breadcrumb { color: #C9BBA4; }
body[data-theme="diwali"] .shop-intro .store-breadcrumb a { color: #FCD34D; }
body[data-theme="diwali"] .shop-note { color: #E7D9C4; border-color: rgba(253,230,138,0.28); background: rgba(255,255,255,0.06); }
body[data-theme="diwali"] .shop-note a { color: #FCD34D; }
body[data-theme="diwali"] .shop-add { color: #3A2500; background: linear-gradient(180deg, #FBE7A1 0%, #F4CF5E 100%); border: 1px solid #E2B33C; box-shadow: 0 2px 8px rgba(226,179,60,0.25); }
body[data-theme="diwali"] .shop-add:hover { background: linear-gradient(180deg, #FDEDB4 0%, #F6D66F 100%); box-shadow: 0 4px 12px rgba(226,179,60,0.35); }
body[data-theme="diwali"] .shop-qty { border-color: #241447; background: #F4F1FA; }
body[data-theme="diwali"] .shop-qty button, body[data-theme="diwali"] .shop-qty span { color: #241447; }
body[data-theme="diwali"] .shop-qty button:hover { background: #E6E0F2; }
body[data-theme="diwali"] .shop-card.in-basket { border-color: #241447; }
body[data-theme="diwali"] .shop-more button { color: #241447; border-color: #241447; }
body[data-theme="diwali"] .shop-more button:hover { color: #FDE68A; background: #241447; border-color: #241447; }
body[data-theme="diwali"] .shop-basket-bar { background: #0E0722; border-top: 1px solid rgba(184,134,11,0.3); }
body[data-theme="diwali"] .shop-basket-bar__info > span:first-child { background: var(--gold-foil); color: #3A2500; }
