/* shop/index.css — page composition CSS. Mobile-first. */

/* ─── Atoms ────────────────────────────────────────────────────────── */
@import url('../../_components/atoms/page-shell/page-shell.css');
@import url('../../_components/atoms/pill-count/pill-count.css');
@import url('../../_components/atoms/sales-badge/sales-badge.css');

/* ─── Molecules ────────────────────────────────────────────────────── */
@import url('../../_components/molecules/card-product/card-product.css');
@import url('../../_components/molecules/pagination-controls/pagination-controls.css');

/* ─── Sections ─────────────────────────────────────────────────────── */
@import url('../../_components/sections/header-full/header-full.css');
@import url('../../_components/sections/footer-full/footer-full.css');
@import url('../../_components/sections/mobile-menu/mobile-menu.css');
@import url('../../_components/sections/age-gate-modal/age-gate-modal.css');
@import url('../../_components/sections/page-glow/page-glow.css');
@import url('../../_components/sections/product-grid/product-grid.css');
@import url('../../_components/sections/shop-filters/shop-filters.css');

/* ─── Page-scoped overrides ─────────────────────────────────────────── */

.page-shop .shop-main {
  position: relative;
}

.page-shop .shop-container {
  max-width: 1232px;
  margin: 0 auto;
  padding: 24px 16px 80px;
  position: relative;
  z-index: 1;
}

/* H1 "Shop" — Figma y=136, font 36/48 weight 600 -0.72 */
.page-shop .shop-h1 {
  font-family: 'Nationale', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 600;
  font-size: 28px;
  line-height: 36px;
  letter-spacing: -0.56px;
  color: rgb(var(--color-lead));
  margin: 0 0 16px 0;
}

/* shop-active-filter-chips (inline page-level pattern — small chips with X-close) */
.page-shop .shop-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.page-shop .shop-active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 16px;
  background: rgb(var(--color-soft));
  border: 1px solid rgb(var(--color-line));
  color: rgb(var(--color-subs));
  font-family: 'Nationale', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 18px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.page-shop .shop-active-filter-chip:hover { background: rgb(var(--color-line)); }
.page-shop .shop-active-filter-chip .icon-x-close { font-size: 12px; color: rgb(var(--color-subs)); }

/* shop-subhead row: product-count LEFT + sort-dropdown RIGHT */
.page-shop .shop-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.page-shop .product-count {
  font-family: 'Nationale', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: rgb(var(--color-subs));
}

/* sort-dropdown inline pattern (190×40 right-aligned) */
.page-shop .sort-dropdown {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 190px;
  height: 40px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgb(var(--color-soft));
  border: 1px solid rgb(var(--color-line));
  color: rgb(var(--color-lead));
  font-family: 'Nationale', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  transition: background 0.15s;
}
.page-shop .sort-dropdown:hover { background: rgb(var(--color-line)); }
.page-shop .sort-dropdown .icon-chevron-down { font-size: 16px; color: rgb(var(--color-subs)); }

/* shop-layout: stacked on mobile, sidebar + grid on desktop */
.page-shop .shop-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Pagination wrapper — centered below grid */
.page-shop .shop-pagination-wrap {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

@media (min-width: 1024px) {
  .page-shop .shop-container {
    padding-top: 40px;
    padding-bottom: 120px;
  }
  .page-shop .shop-h1 {
    font-size: 36px;
    line-height: 48px;
    letter-spacing: -0.72px;
    margin: 0 0 8px 0;
  }
  /* Active filters at y=192 — h1 ends 184, gap 8 */
  .page-shop .shop-active-filters {
    margin: 0 0 14px 0;
  }
  /* Subhead at y=232/238 — count/sort row. Count font 20/28.
     Sort-dropdown sits over the sidebar gutter at Figma x=1152.
     Extend subhead beyond container right via margin-right negative for sort overflow. */
  .page-shop .shop-subhead {
    margin: 0 -22px 18px 0;
    align-items: center;
  }
  .page-shop .product-count {
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
    color: rgb(var(--color-lead));
  }

  /* Two-col layout: product grid (LEFT 894w) + 282px filter sidebar (RIGHT).
     Container 1232 padded → content 1200 from x=120 to x=1320. Cards end at 1014, sidebar at x=1060 →
     46px gap. Sidebar ends at x=1342 (extending 22px beyond container content right edge).
     Use negative margin on sidebar to allow this overhang. */
  .page-shop .shop-layout {
    flex-direction: row;
    gap: 46px;
    align-items: flex-start;
  }
  .page-shop .shop-filters {
    flex: 0 0 282px;
    order: 2;
  }
  .page-shop .shop-layout > .shop-products {
    flex: 0 0 894px;
    max-width: 894px;
    min-width: 0;
    order: 1;
  }
  /* Product grid row gap — Figma row1 y=296, row2 y=740 → gap=740-296-405=39. */
  .page-shop .product-grid {
    gap: 39px 24px;
  }
  /* Pagination at Figma y=2088, summary y=2140; in HTML pagination renders below products grid.
     Last card row at y=1628, ends 2033. Pagination at 2088 → 55 gap. */
  .page-shop .shop-pagination-wrap { margin-top: 55px; gap: 16px; }
  .page-shop .shop-pagination-wrap .pagination { margin-top: 0; }
  .page-shop .shop-pagination-wrap .pagination-summary { margin: 0; }
}
