/* The Abeyta Audio Store (homepage #shop). Data in /shop/products.json, behavior in js/shop.js.
   Flagship-store look: big quiet product photography on warm light tiles, set into the plum room. */
.shop, .pdp, .zoom, .shop-bag { --tile: #f2efea; --tile-2: #e9e4dc; --tile-ink: #1d1822; }

.store-head { text-align: center; max-width: 760px; margin: 0 auto clamp(28px, 4vw, 44px); }
.store-kicker { color: var(--gold); text-transform: uppercase; letter-spacing: 0.22em; margin: 0 0 18px; }
.store-title { font-family: var(--brand); text-transform: none; font-variation-settings: normal; font-weight: 700; letter-spacing: -0.04em; font-size: clamp(2.4rem, 5.4vw, 4.2rem); line-height: 0.95; margin: 0 0 14px; }
.store-sub { font-size: 1.12rem; max-width: 56ch; margin: 0 auto; }

/* Featured product: one big photograph, one quiet column of copy */
.store-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-radius: 22px; overflow: hidden; background: var(--tile); color: var(--tile-ink); margin-bottom: clamp(36px, 5vw, 56px); box-shadow: 0 40px 90px -50px rgba(0,0,0,0.85); }
.feat-pic { padding: 0; border: 0; cursor: zoom-in; display: block; background: var(--tile-2); }
.feat-pic img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 30%; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.feat-pic:hover img { transform: scale(1.03); }
.feat-copy { padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.feat-kicker { color: #8a6a2a; text-transform: uppercase; letter-spacing: 0.16em; margin: 0 0 10px; }
.feat-copy h3 { font-family: var(--brand); font-size: clamp(2.2rem, 4vw, 3.4rem); letter-spacing: -0.035em; line-height: 1; margin-bottom: 8px; }
.feat-tag { font-size: 1.25rem; font-weight: 600; margin-bottom: 14px; }
.feat-copy .dim { color: #4f4656; font-size: 1rem; line-height: 1.6; }
.feat-price { font-family: var(--brand); font-size: 1.4rem; font-weight: 600; margin: 8px 0 22px; }
.feat-copy .btn { align-self: flex-start; }
@media (max-width: 860px) { .store-feature { grid-template-columns: 1fr; } }

/* The collection */
.store-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.store-bar h3 { font-family: var(--brand); font-size: 1.5rem; letter-spacing: -0.02em; }
.store-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 32px; }
@media (max-width: 1100px) { .store-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .store-row { grid-template-columns: 1fr 1fr; gap: 12px; } .tile-info h4 { font-size: 1rem; } .tile-info p.dim { display: none; } }
.store-line { margin: 0 0 16px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.16em; font-weight: 500; font-size: 0.78rem; }
.tile-pic { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: var(--tile); aspect-ratio: 1; cursor: pointer; }
.tile-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.5s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
.tile-pic .t-b { opacity: 0; }
@media (hover: hover) { .tile-pic:hover .t-a { opacity: 0; } .tile-pic:hover .t-b { opacity: 1; transform: scale(1.03); } }
.tile-info { padding: 16px 4px 0; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--sw); box-shadow: 0 0 0 1px rgba(237,228,208,0.35), 0 0 0 3px var(--ink); margin-bottom: 10px; }
.tile-info h4 { margin: 0 0 4px; font-family: var(--brand); font-size: 1.2rem; letter-spacing: -0.015em; }
.tile-info h4 button { all: unset; cursor: pointer; }
.tile-info h4 button:hover { text-decoration: underline; text-underline-offset: 4px; }
.tile-info p { margin: 0 0 6px; font-size: 0.92rem; }
.tile-price { font-size: 0.95rem; color: var(--paper); }

/* The promise row */
.store-promise { list-style: none; padding: 24px 0 0; margin: clamp(8px, 2vw, 20px) 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 900px) { .store-promise { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .store-promise { grid-template-columns: 1fr; } }
.store-promise li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.store-promise svg { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.store-promise strong { display: block; font-size: 0.98rem; margin-bottom: 2px; }
.store-promise span { color: var(--paper-3); font-size: 0.88rem; line-height: 1.45; }

/* Product page */
body.pdp-open { overflow: hidden; }
.pdp { position: fixed; inset: 0; z-index: 60; background: rgba(14, 9, 20, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; place-items: center; padding: 24px; opacity: 0; transition: opacity 0.26s ease; }
.pdp.on { opacity: 1; }
.pdp-inner { position: relative; width: min(1180px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: var(--tile); color: var(--tile-ink); border-radius: 24px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); transform: scale(0.96) translateY(10px); transition: transform 0.34s cubic-bezier(.2,.8,.2,1); box-shadow: 0 50px 120px -30px rgba(0,0,0,0.8); }
.pdp.on .pdp-inner { transform: none; }
.pdp-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(29,24,34,0.08); cursor: pointer; display: grid; place-items: center; }
.pdp-close svg { width: 18px; height: 18px; stroke: var(--tile-ink); stroke-width: 2; fill: none; }
.pdp-close:hover { background: rgba(29,24,34,0.16); }
.pdp-gallery { padding: 18px; display: grid; gap: 12px; align-content: start; }
.pdp-main { position: relative; border-radius: 16px; overflow: hidden; background: #fff; }
.pdp-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: zoom-in; overscroll-behavior-x: contain; }
.pdp-track::-webkit-scrollbar { display: none; }
.pdp-track img { flex: 0 0 100%; width: 100%; aspect-ratio: 1; object-fit: cover; display: block; scroll-snap-align: center; scroll-snap-stop: always; user-select: none; -webkit-user-drag: none; }
.pdp-arrow { position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: rgba(255,255,255,0.88); box-shadow: 0 6px 18px rgba(0,0,0,0.18); transition: transform .15s ease; }
.pdp-arrow:hover { transform: scale(1.06); }
.pdp-arrow svg { width: 20px; height: 20px; fill: none; stroke: #1d1822; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pdp-arrow.prev { left: 12px; } .pdp-arrow.next { right: 12px; }
.pdp-count { position: absolute; z-index: 2; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 4px 10px; border-radius: 999px; background: rgba(29,24,34,0.72); color: #f2efea; font-size: 0.7rem; letter-spacing: 0.08em; }
.pdp-thumbs { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.pdp-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #fff; cursor: pointer; aspect-ratio: 1; }
.pdp-thumbs button[aria-current] { border-color: var(--tile-ink); }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp-info { padding: clamp(28px, 4vw, 52px) clamp(24px, 4vw, 48px) 36px 18px; }
.pdp-kicker { color: #8a6a2a; text-transform: uppercase; letter-spacing: 0.14em; margin: 0 0 10px; }
.pdp-name { font-family: var(--brand); font-size: clamp(2rem, 3.6vw, 2.9rem); letter-spacing: -0.035em; line-height: 1; margin: 0 0 8px; }
.pdp-tag { font-size: 1.15rem; font-weight: 600; margin: 0 0 6px; }
.pdp-price { font-family: var(--brand); font-size: 1.35rem; font-weight: 600; margin: 0 0 14px; }
.pdp-blurb { color: #4f4656; line-height: 1.6; margin-bottom: 22px; }
.pdp-size-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.pdp-size-h .mono { text-transform: uppercase; letter-spacing: 0.12em; color: #6a6070; }
.pdp .link-btn { background: none; border: 0; padding: 0; cursor: pointer; color: var(--tile-ink); text-decoration: underline; text-underline-offset: 3px; font-size: 0.9rem; }
.pdp .sizes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.pdp .size span { width: 100%; height: 46px; border-radius: 10px; border-color: rgba(29,24,34,0.2); color: var(--tile-ink); font-size: 0.85rem; background: #fff; }
.pdp .size input:checked + span { background: var(--tile-ink); border-color: var(--tile-ink); color: var(--paper); }
.pdp-chart { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 0.88rem; }
.pdp-chart th, .pdp-chart td { text-align: left; padding: 7px 4px; border-bottom: 1px solid rgba(29,24,34,0.12); }
.pdp-chart th { font-family: var(--mono); font-weight: 500; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #6a6070; }
.pdp-add { width: 100%; justify-content: center; margin-top: 20px; height: 54px; font-size: 1.02rem; border-radius: 14px; background: var(--tile-ink); border-color: var(--tile-ink); color: var(--paper); }
.pdp-add:hover { background: #31293b; border-color: #31293b; }
.pdp-msg { min-height: 1.4em; margin: 10px 0 6px; color: #2f7a4f; }
.pdp-acc details { border-top: 1px solid rgba(29,24,34,0.12); padding: 14px 0; }
.pdp-acc details:last-child { border-bottom: 1px solid rgba(29,24,34,0.12); }
.pdp-acc summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.pdp-acc summary::after { content: "+"; font-weight: 400; }
.pdp-acc details[open] summary::after { content: "–"; }
.pdp-acc p { color: #4f4656; font-size: 0.93rem; line-height: 1.6; margin: 10px 0 0; }
@media (max-width: 860px) {
  .pdp { padding: 0; place-items: stretch; }
  .pdp-inner { grid-template-columns: 1fr; max-height: 100vh; height: 100%; border-radius: 0; }
  .pdp-gallery { padding: 0 0 8px; }
  .pdp-main { border-radius: 0; }
  .pdp-thumbs { padding: 0 12px; grid-template-columns: repeat(8, 64px); overflow-x: auto; }
  .pdp-info { padding: 20px 18px 40px; }
  .pdp .sizes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Full-screen zoom */
.zoom { position: fixed; inset: 0; z-index: 70; background: #fff; display: grid; place-items: center; cursor: zoom-out; }
.zoom img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.zoom .pdp-arrow { position: fixed; } .zoom .pdp-arrow.prev { left: 16px; } .zoom .pdp-arrow.next { right: 16px; }
.zoom .pdp-count { position: fixed; bottom: 18px; }
.zoom .pdp-close { position: fixed; }

/* Bag */
.shop-bag { position: fixed; z-index: 80; right: 20px; bottom: 20px; width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; padding: 18px; border-radius: 16px;
  background: var(--ink-2); border: 1px solid var(--line-strong); box-shadow: 0 24px 48px rgba(0,0,0,0.5); }
.bag-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.shop-bag h4 { margin: 0; font-family: var(--brand); font-size: 1.05rem; }
.shop-bag ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; font-size: 0.9rem; }
.shop-bag li { display: grid; grid-template-columns: 40px 1fr auto 20px; gap: 10px; align-items: center; }
.shop-bag li img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--tile); }
.shop-bag .link-btn { background: none; border: 0; color: var(--paper-3); cursor: pointer; font-size: 0.9rem; padding: 0; }
.bag-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--line); margin-bottom: 14px; }
.bag-total strong { font-size: 1.2rem; }
.shop-bag .btn { width: 100%; justify-content: center; }
.bag-msg { margin: 10px 0 0; font-size: 0.85rem; color: var(--red); }
.bag-direct { margin-top: 12px; display: grid; gap: 8px; }
.bag-direct-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.bag-ship { display: grid; gap: 8px; margin-top: 12px; }
.bag-ship p { margin: 0; }
.bag-ship input { width: 100%; min-width: 0; padding: 9px 10px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--ink-3); color: var(--paper); font: inherit; font-size: 0.9rem; }
.bag-ship input:focus { outline: none; border-color: var(--amber); }
.bag-row { display: grid; grid-template-columns: 1.4fr 0.8fr 0.9fr; gap: 8px; }
.bag-pill { position: fixed; z-index: 79; right: 20px; bottom: 20px; height: 52px; padding: 0 18px; border-radius: 26px; border: 0; background: var(--amber); color: var(--amber-ink); display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; box-shadow: 0 14px 30px rgba(0,0,0,0.45); }
.bag-pill svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
@media (max-width: 560px) { .shop-bag { right: 16px; left: 16px; bottom: 16px; width: auto; } .bag-pill { right: 16px; bottom: 16px; } }

/* Size chips */
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.size { position: relative; }
.size input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.size span { display: inline-grid; place-items: center; min-width: 38px; height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 6px; font-family: var(--mono); font-size: 0.75rem; color: var(--paper-2); }
.size input:checked + span { border-color: var(--amber); background: var(--amber); color: var(--amber-ink); }
.size input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
