/* Reusable components: qty, accordion, product card, badges, cart, lightbox */

/* Quantity */
.qty { display: inline-flex; border: 1px solid var(--line); height: 52px; background: var(--white); transition: border-color var(--dur-fast); }
.qty:hover, .qty:focus-within { border-color: var(--ink); }
.qty-btn { width: 44px; font-size: 20px; transition: background var(--dur-fast), color var(--dur-fast); }
.qty-btn:hover { background: var(--ink); color: var(--white); }
.qty-input { width: 48px; text-align: center; border: 0; background: transparent; -moz-appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input:focus-visible { outline: none; }
.qty--small { height: 36px; }
.qty--small .qty-btn { width: 34px; font-size: 16px; }
.qty-value { min-width: 32px; display: grid; place-items: center; font-size: 14px; }

/* Status badges */
.badge { display: inline-block; padding: 3px 8px; border: 1px solid var(--line); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.badge--ok { border-color: var(--ink); color: var(--ink); }
.stock { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.stock::before { content: ""; width: 8px; height: 8px; background: #b9b9b4; }

/* Accordion */
.accordion { border-top: 1px solid var(--ink); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-trigger { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0; text-align: left; font-size: 17px; font-weight: 600; transition: color var(--dur-fast); }
.acc-trigger:hover { color: var(--accent); }
.acc-icon { position: relative; flex: none; width: 14px; height: 14px; }
.acc-icon::before, .acc-icon::after { content: ""; position: absolute; left: 0; right: 0; top: 6.5px; height: 1.5px; background: currentColor; transition: transform 0.35s var(--ease); }
.acc-icon::after { transform: rotate(90deg); }
.acc-item.is-open .acc-icon::after { transform: rotate(0); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease); }
.acc-item.is-open .acc-panel { grid-template-rows: 1fr; }
.acc-inner { overflow: hidden; }
.acc-inner p { padding: 0 48px 24px 0; color: var(--muted); max-width: 64ch; }
.acc-inner a { text-decoration: underline; }

/* Image zoom helper */
.zoom { overflow: hidden; }
.zoom img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.zoom:hover img { transform: scale(1.04); }

/* Product card */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); transition: border-color var(--dur-fast); }
.card:hover { border-color: var(--ink); }
.card-media { display: block; aspect-ratio: 3 / 2; background: var(--soft); }   /* cards show the supplied landscape photos in full */
.card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 24px; }
.card-cat { font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.card-title { margin: 6px 0 4px; font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.card-text { color: var(--muted); font-size: 14.5px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 20px; }
.card-price { font-weight: 700; font-size: 18px; }
.card .btn { min-height: 44px; padding: 0 18px; }

/* Cart drawer */
.cart { position: fixed; inset: 0; z-index: 300; visibility: hidden; transition: visibility 0s 0.5s; }
.cart.is-open { visibility: visible; transition-delay: 0s; }
.cart-overlay { position: absolute; inset: 0; background: rgba(12, 12, 13, 0.55); opacity: 0; transition: opacity var(--dur) var(--ease); }
.cart.is-open .cart-overlay { opacity: 1; }
.cart-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); display: flex; flex-direction: column; background: var(--white); transform: translateX(100%); transition: transform 0.5s var(--ease); }
.cart.is-open .cart-panel { transform: translateX(0); }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 28px; border-bottom: 1px solid var(--line); }
.cart-title { font-family: var(--font-display); font-size: 20px; letter-spacing: -0.01em; }
.cart-close { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; font-size: 26px; line-height: 1; color: var(--muted); transition: color var(--dur-fast), background var(--dur-fast); }
.cart-close:hover { color: var(--ink); background: var(--soft); }
.cart-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cart-list { flex: 1; overflow-y: auto; padding: 8px 28px; }
.cart-empty { display: grid; justify-items: center; gap: 14px; padding: 72px 24px; text-align: center; color: var(--muted); }
.cart-empty-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--soft); color: var(--ink); }
.cart-empty-text { margin: 0 0 8px; font-size: 18px; font-weight: 600; color: var(--ink); }
.cart-item { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cart-item-img { width: 108px; height: 72px; flex: none; object-fit: cover; background: var(--soft); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 15px; }
.cart-item-price { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.cart-item-actions { display: flex; align-items: center; gap: 16px; }
.cart-remove { font-size: 12.5px; color: var(--muted); text-decoration: underline; }
.cart-remove:hover { color: var(--ink); }
.cart-summary { padding: 24px 28px 28px; border-top: 1px solid var(--line); background: var(--soft); }
.cart-row { display: flex; justify-content: space-between; gap: 16px; font-size: 14.5px; margin-bottom: 8px; }
.cart-row--total { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 700; font-size: 17px; }
.cart-note { margin: 12px 0 18px; font-size: 12.5px; color: var(--muted); }
.cart-summary .btn + .btn { margin-top: 10px; }

/* Cart page */
.cart-page { display: grid; grid-template-columns: 1.7fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.cart-page .cart-list { padding: 0; overflow: visible; border-top: 1px solid var(--ink); }
.cart-page .cart-item-img { width: 132px; height: 88px; }
.cart-page .cart-summary { position: sticky; top: calc(var(--header-h) + 24px); }
.cart-page-empty { max-width: 520px; }
.cart-page-empty .btn { margin-top: 24px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: rgba(12, 12, 13, 0.94); opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0s 0.3s; }
.lightbox.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.lightbox-img { max-width: min(92vw, 1200px); max-height: 86vh; width: auto; height: auto; object-fit: contain; background: var(--charcoal); }
.lightbox-btn { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; color: #fff; font-size: 26px; transition: background var(--dur-fast); }
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.12); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; margin-top: -26px; }
.lightbox-next { right: 16px; top: 50%; margin-top: -26px; }
.lightbox-count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font-size: 13px; color: #bdbdbd; }

/* Discount code in the cart */
.cart-code { margin: 16px 0 4px; }
.cart-code-label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cart-code-row { display: flex; gap: 8px; }
.cart-code-input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); text-transform: uppercase; letter-spacing: 0.06em; font-size: 14px; }
.cart-code-input:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.cart-code-row .btn { min-height: 44px; padding: 0 16px; }
.cart-summary .cart-code-row .btn { margin-top: 0; }
.cart-code-msg { margin-top: 8px; font-size: 13px; }
.cart-code-msg.is-error { color: #b00020; }
.cart-code-msg.is-ok { color: #11693a; }
.cart-code-applied { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px dashed var(--ink); font-size: 14px; letter-spacing: 0.06em; }

/* Empty "coming soon" slots in the shop grid */
.card--soon { border-style: dashed; pointer-events: none; }
.card--soon:hover { border-color: var(--line); }
.card--soon .card-media { display: grid; place-items: center; background: var(--soft); }
.card--soon .card-media img { width: 38%; height: auto; opacity: 0.12; object-fit: contain; }
.card--soon .card-body { padding-block: 22px; }

/* Shop card: "view product" plus a quick add-to-cart icon button */
.card-actions { display: flex; align-items: center; gap: 8px; }
.card--wide .card-actions { flex-wrap: wrap; }
.btn.btn--icon { padding: 0; width: 44px; min-width: 44px; flex: none; justify-content: center; }
.btn--icon svg { width: 18px; height: 18px; flex: none; }

/* Free-shipping progress and suggestions in the cart */
.ship-progress { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.ship-progress-text { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.ship-progress-text.is-done { color: var(--ink); }
.ship-bar { height: 4px; background: var(--line); overflow: hidden; }
.ship-bar-fill { display: block; height: 100%; background: var(--ink); transition: width 0.5s var(--ease); }
.ship-progress-text.is-done + .ship-bar .ship-bar-fill { background: var(--accent); }
.ship-rec-title { margin: 16px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.ship-rec { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ship-rec-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 8px; background: var(--white); border: 1px solid var(--line); }
.ship-rec-item img { width: 48px; height: 48px; object-fit: cover; }
.ship-rec-info { display: grid; min-width: 0; }
.ship-rec-name { font-size: 13.5px; font-weight: 600; }
.ship-rec-price { font-size: 13px; color: var(--muted); }
.ship-rec-item .btn { min-height: 36px; padding: 0 12px; font-size: 11px; }
@media (max-width: 420px) { .ship-rec-item { grid-template-columns: 48px 1fr; } .ship-rec-item .btn { grid-column: 1 / -1; } }

/* Product card extras: "Complete set" label and the "photo coming soon" caption on placeholder tiles */
.card-media { position: relative; }
.card-badge { position: absolute; top: 14px; left: 14px; padding: 6px 10px; background: var(--ink); color: var(--white); font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.card-ph { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }

/* The whole cart scrolls as one page (header stays on top), so the products, the shipping bar, the amounts
   and the buttons are all reachable by scrolling anywhere, instead of a tiny scrolling strip above a tall summary. */
@media all {
  .cart-panel { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .cart-head { position: sticky; top: 0; z-index: 2; flex: none; background: var(--white); }
  .cart-list { flex: none; overflow: visible; }
  .cart-summary { flex: none; margin-top: auto; }
  .cart-empty { padding-block: 56px; }
}

/* Discount in the cart: a plain row with a plus (minus when open); the field appears under it */
.cart-code-head { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14.5px; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; }
.cart-code-head:hover { color: #2a2a2f; }
.cart-code-head:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cart-code-pm { display: grid; place-items: center; width: 22px; height: 22px; color: var(--muted); }
.cart-code-head + .cart-code-form { padding-top: 14px; }
.cart-code-head + .cart-code-form .cart-code-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
