/* ============================================================
   ABC FC Store — Desktop & Tablet Layer
   ------------------------------------------------------------
   Loaded with  media="(min-width: 769px)"  after store.css, so
   phones never apply any of it: the mobile store is untouched.

   769px  – 1023px  tablet: aligned toolbar, roomier cards
   1024px +         desktop: hero with kit, 2-column product view,
                    2-column checkout
   ============================================================ */

:root {
  --content-max: 1280px;
  --gutter: clamp(24px, 3.5vw, 48px);
  --header-h: 72px;
  /* left/right padding that lines full-width bars up with the content column
     (cqw = width of #page-shop, which is a size container, so scrollbars don't skew it) */
  --edge: max(var(--gutter), calc((100cqw - var(--content-max)) / 2 + var(--gutter)));
}

/* ── Header ────────────────────────────────────────────────── */
.store-header-inner { max-width: var(--content-max); padding-inline: var(--gutter); }
.store-logo-img { width: 44px; height: 44px; }
.store-logo-name { font-size: 22px; }
.store-topnav a { font-size: 14.5px; }
.store-search-btn, .theme-toggle-btn, .cart-btn { width: 42px; height: 42px; }
.cart-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(245,168,0,0.3); }

/* ── Toolbar: categories on the left, count + sort on the right, one bar ── */
#page-shop { container-type: inline-size; }
#page-shop.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}
#page-shop > * { grid-column: 1 / -1; }
#page-shop > .cat-pills-wrap { grid-column: 1; }
#page-shop > .sort-bar { grid-column: 2; }
.cat-pills-wrap,
.sort-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.cat-pills { padding: 14px 0 14px var(--edge); gap: 8px; }
.cat-pill { padding: 9px 18px; font-size: 13.5px; }
.sort-bar { padding: 0 var(--edge) 0 16px; gap: 14px; }
.sort-label { white-space: nowrap; }
.sort-select {
  flex: none;
  width: 200px;
  max-width: none;
  padding: 10px 38px 10px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23F5A800' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.sort-select:hover, .sort-select:focus { border-color: var(--gold); outline: none; }

/* ── Products ──────────────────────────────────────────────── */
.products-section { max-width: var(--content-max); padding: 32px var(--gutter) 56px; }
.product-card { border-radius: 18px; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(245,168,0,0.35); }
.product-img-wrap { background: #f4f4f2; }
.product-badge { top: 12px; left: 12px; padding: 4px 10px; font-size: 11px; }
.product-card-body { padding: 16px 18px 18px; gap: 6px; }
.product-name { font-size: 16px; }
.product-meta { font-size: 11.5px; }
.product-price { font-size: 19px; }

/* Quick add: a round button that floats over the photo on hover */
.product-quick-add {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  font-size: 24px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}
.product-card:hover .product-quick-add,
.product-card:focus-within .product-quick-add { opacity: 1; transform: none; }
.product-quick-add:hover { transform: scale(1.08); }
@media (hover: none) { .product-quick-add { opacity: 1; transform: none; } }

/* ── Trust strip ───────────────────────────────────────────── */
.trust-strip { padding: 32px var(--gutter); margin-top: 0; }
.trust-strip-inner { max-width: calc(var(--content-max) - 2 * var(--gutter)); gap: 24px; }
.trust-item { flex-direction: row; align-items: center; text-align: left; gap: 14px; padding: 4px; }
.trust-item svg { width: 30px; height: 30px; }
.trust-item strong { font-size: 14px; margin: 0 0 2px; }
.trust-item span { font-size: 13px; }

/* ── Footer ────────────────────────────────────────────────── */
.store-footer { padding: 64px var(--gutter) 28px; }
.store-footer-inner { max-width: calc(var(--content-max) - 2 * var(--gutter)); gap: 48px; }
.footer-tagline { max-width: 46ch; font-size: 14px; }
.store-footer-bottom { max-width: calc(var(--content-max) - 2 * var(--gutter)); margin-inline: auto; }

/* ── Product view (tablet): show the whole product, never crop it ── */
.modal-img { object-fit: contain; background: #f4f4f2; padding: 20px; }

/* ── Toast: no bottom tab bar to clear on big screens ──────── */
.toast { bottom: 32px; padding: 12px 24px; }

/* ── Breadcrumbs line up with the page content ─────────────── */
#page-checkout .breadcrumb { max-width: 1180px; margin: 0 auto; padding: 24px var(--gutter) 0; }
#page-info .breadcrumb { max-width: 760px; margin: 0 auto; padding: 24px 16px 0; }

/* ══════════════════════════════════════════════════════════
   DESKTOP (1024px +)
══════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {

  /* ── Hero: title left, the kit on show right ─────────────── */
  .cat-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
    min-height: 460px;
    padding: 56px var(--edge);
    text-align: left;
    position: relative;
    overflow: hidden;
    background:
      radial-gradient(ellipse 50% 70% at 78% 50%, rgba(245,168,0,0.16), transparent 70%),
      linear-gradient(135deg, var(--black-2) 0%, var(--black-3) 100%);
  }
  .cat-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(-55deg, transparent 0 46px, rgba(245,168,0,0.025) 46px 47px);
    pointer-events: none;
  }
  .cat-banner > * { position: relative; }
  .cat-banner-kicker.desk-only {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 6px 14px;
    border: 1px solid rgba(245,168,0,0.35);
    border-radius: var(--radius-full);
    font-family: var(--font-sub);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    background: var(--gold-faint);
  }
  .cat-banner h1 { font-size: clamp(5rem, 8vw, 8.5rem); line-height: 0.9; letter-spacing: 0.02em; }
  .cat-banner p { font-size: 15px; margin-top: 14px; letter-spacing: 0.1em; }
  .cat-banner-actions.desk-only { display: flex; gap: 12px; margin-top: 32px; }
  .cbn-primary, .cbn-ghost {
    padding: 15px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sub);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all var(--transition);
  }
  .cbn-primary { background: var(--gold); color: var(--black); }
  .cbn-primary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(245,168,0,0.3); }
  .cbn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
  .cbn-ghost:hover { border-color: var(--gold); color: var(--gold); }

  .cat-banner-visual.desk-only {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 360px;
  }
  .cat-banner-visual img {
    width: 230px;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 18px;
    background: #f4f4f2;
    border: 4px solid #fff;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    transition: transform 400ms cubic-bezier(0.16,1,0.3,1);
  }
  .cat-banner-visual img:nth-child(1) { transform: translateX(40px) rotate(-9deg) scale(0.88); }
  .cat-banner-visual img:nth-child(2) { position: relative; z-index: 2; transform: translateY(-8px); }
  .cat-banner-visual img:nth-child(3) { transform: translateX(-40px) rotate(9deg) scale(0.88); }
  .cat-banner:hover .cat-banner-visual img:nth-child(1) { transform: translateX(16px) rotate(-12deg) scale(0.9); }
  .cat-banner:hover .cat-banner-visual img:nth-child(3) { transform: translateX(-16px) rotate(12deg) scale(0.9); }

  .products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .trust-strip-inner { grid-template-columns: repeat(4, 1fr); }

  /* ── Product view: photo left, details right ─────────────── */
  .product-modal-overlay.active { align-items: center; padding: 32px; }
  .modal-wrap { width: min(1040px, 100%); }
  .product-modal {
    max-width: none;
    height: min(86vh, 640px);
    max-height: none;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    padding: 0;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 40px 100px rgba(0,0,0,0.6);
    animation: modal-pop 260ms cubic-bezier(0.16,1,0.3,1);
  }
  @keyframes modal-pop { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
  .modal-handle { display: none; }
  .modal-img {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: contain;
    padding: 36px;
    background: #f4f4f2;
  }
  .modal-body {
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 56px 44px 40px;
    gap: 24px;
  }
  .modal-name { font-size: 32px; line-height: 1.05; }
  .modal-price { font-size: 38px; }
  .modal-desc { font-size: 15.5px; }
  .size-btn { min-width: 52px; padding: 11px 14px; font-size: 14px; }
  .qty-btn { width: 44px; height: 44px; }
  .qty-value { height: 44px; }
  .add-to-cart-btn { padding: 18px; font-size: 17px; margin-top: auto; }
  .add-to-cart-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(245,168,0,0.3); }
  .modal-close-btn { top: 18px; right: 18px; width: 40px; height: 40px; background: var(--surface-2); }

  /* ── Cart drawer ─────────────────────────────────────────── */
  .cart-drawer { width: 440px; }
  .cart-drawer-header { padding: 22px 24px; }
  .cart-drawer-items { padding: 20px 24px; }
  .cart-drawer-footer { padding: 20px 24px 24px; }
  .cart-item-img { width: 76px; height: 76px; background: #f4f4f2; }
  .cart-item-name { font-size: 14px; }

  /* ── Checkout: details left, summary + payment right ─────── */
  .checkout-wrap {
    max-width: 1180px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    /* the last, flexible row soaks up the delivery card's extra height so the
       summary, payment and Place Order button stay together on the right */
    grid-template-rows: auto auto auto auto 1fr;
    column-gap: 32px;
    row-gap: 24px;
    align-items: start;
    padding: 24px var(--gutter) 72px;
  }
  .checkout-wrap > :nth-child(1) { grid-column: 1; grid-row: 1; }             /* 1 Contact   */
  .checkout-wrap > :nth-child(2) { grid-column: 1; grid-row: 2 / span 4; }    /* 2 Delivery  */
  .checkout-wrap > :nth-child(3) { grid-column: 2; grid-row: 1; }             /* 3 Summary   */
  .checkout-wrap > :nth-child(4) { grid-column: 2; grid-row: 2; }             /* 4 Payment   */
  .checkout-wrap > :nth-child(5) { grid-column: 2; grid-row: 3; }             /* Place order */
  .checkout-wrap > :nth-child(6) { grid-column: 2; grid-row: 4; margin-top: -8px !important; }
  .checkout-section { border-radius: 18px; }
  .checkout-section-head { padding: 18px 24px; }
  .checkout-section-body { padding: 24px; }
  .checkout-wrap > :nth-child(3) { border-color: rgba(245,168,0,0.35); }
  .os-img { width: 64px; height: 64px; background: #f4f4f2; }
  .os-name { font-size: 14px; }
  .ot-row { font-size: 14px; }
  .ot-row.total { font-size: 20px; }
  .place-order-btn { padding: 20px; font-size: 17px; }
  .place-order-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(245,168,0,0.3); }

  /* ── Order confirmation + info pages ─────────────────────── */
  .confirm-wrap { padding: 72px 16px 80px; }
  .info-wrap { padding-bottom: 80px; }
  .info-title { font-size: 40px; font-family: var(--font-display); font-weight: 400; letter-spacing: 0.03em; }
  .info-content { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .product-modal { animation: none; }
  .cat-banner-visual img { transition: none; }
}
