/* ============================================================
   FORGE — Collection / listing page
   Layered on top of storefront.css (chrome, tokens, .ph system).
   Faithful structural reconstruction of the reference collection
   layout. All product imagery is editable placeholders.
   ============================================================ */

/* ---------- Light chrome (no dark hero on this page) ----------
   The storefront header defaults to white text over a dark hero.
   On a collection page the page is light from the top, so force
   dark nav text and a solid header that matches the page. */
body.light-chrome .header {
  background: var(--bg);
  border-bottom: 1px solid transparent;
}
body.light-chrome .header.header--scrolled { border-bottom-color: var(--line); }
body.light-chrome .nav__link,
body.light-chrome .icon-btn { color: var(--ink); }
body.light-chrome .nav__link:hover,
body.light-chrome .icon-btn:hover { color: var(--accent); }
/* show the orange F icon on light pages */
body.light-chrome .brand__wordmark { display: none; }
body.light-chrome .brand__icon { display: block; }

/* ---------- Accent placeholder tone (for promo banners) ---------- */
.ph--accent {
  background-color: var(--accent);
  background-image: repeating-linear-gradient(45deg,
      rgba(0,0,0,.06) 0 12px, rgba(0,0,0,.11) 12px 24px);
}
.ph--accent::after { color: rgba(255,255,255,.7); }

/* ============================================================
   COLLECTION TITLE
   ============================================================ */
.col-hero {
  text-align: center;
  padding-block: clamp(36px, 6vw, 92px) clamp(44px, 7vw, 100px);
}
.col-hero__title {
  font-size: clamp(56px, 13vw, 168px);
  line-height: 0.9;
}

/* ============================================================
   TOOLBAR (Filters / Sort)
   ============================================================ */
.col-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 40px;
}
.col-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.col-filter svg { width: 22px; height: 22px; }
.col-filter:hover { color: var(--accent); }

.col-sort { position: relative; }
.col-sort__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  color: var(--ink);
  white-space: nowrap;
}
.col-sort__label { color: var(--ink-soft); font-weight: 400; }
.col-sort__value { font-weight: 700; }
.col-sort__chev {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #e3e3e0;
  display: grid; place-items: center;
  transition: background .2s, transform .2s;
}
.col-sort__chev svg { width: 16px; height: 16px; }
.col-sort__btn[aria-expanded="true"] .col-sort__chev { transform: rotate(180deg); }
.col-sort__menu {
  position: absolute;
  right: 0; top: calc(100% + 12px);
  z-index: 30;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0,0,0,.14);
  padding: 8px;
  display: none;
}
.col-sort__menu.is-open { display: block; }
.col-sort__opt {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 7px;
  color: var(--ink);
}
.col-sort__opt:hover { background: var(--bg); }
.col-sort__opt[aria-selected="true"] { font-weight: 700; }

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(20px, 3vw, 52px);
  row-gap: clamp(46px, 5vw, 78px);
  grid-auto-flow: dense;
  padding-bottom: 24px;
}

.col-card { display: flex; flex-direction: column; }
.col-card__link { display: block; }
.col-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-card);
  margin-bottom: 22px;
  overflow: hidden;
}
.col-card__media .ph { position: absolute; inset: 0; }
.col-card__media .product-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 18px;
  object-fit: contain;
  object-position: center;
  transition: transform 1.1s cubic-bezier(.2, .8, .2, 1);
}
.col-card:hover .col-card__media .product-img { transform: scale(1.045); }
.col-card__badge {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 2;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 7px 15px;
  border-radius: 999px;
}
.col-card.is-soldout .col-card__media .ph { opacity: .55; }
.col-card__name { font-size: 19px; font-weight: 700; }
.col-card__price { font-size: 17px; color: var(--ink-soft); margin-top: 6px; }
.col-card:hover .col-card__name { color: var(--accent); }

/* ---------- Promo banner tile ---------- */
.col-banner {
  grid-column: 1 / -1;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 100%;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 2.15 / 1;
}
.col-banner .ph,
.col-banner__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.col-banner__image {
  object-fit: cover;
  object-position: center;
}
.col-banner::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 38%, rgba(0,0,0,.7) 100%);
  z-index: 1;
}
.col-banner__inner {
  position: relative;
  z-index: 2;
  padding: clamp(26px, 3vw, 46px);
  color: #fff;
}
.col-banner__title {
  font-family: var(--font-disp);
  font-size: clamp(30px, 3.2vw, 54px);
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: 0.02em;
}
.col-banner__sub {
  font-size: clamp(15px, 1.2vw, 19px);
  font-weight: 600;
  margin-top: 12px;
  max-width: 36ch;
}

/* ============================================================
   FILTER DRAWER
   ============================================================ */
.fdrawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(20,20,18,.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.fdrawer-overlay.is-open { opacity: 1; visibility: visible; }

.fdrawer {
  position: fixed;
  top: 0; left: 0;
  z-index: 120;
  height: 100%;
  height: 100dvh;
  width: min(400px, 88vw);
  background: var(--bg);
  transform: translateX(-100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
}
.fdrawer.is-open { transform: translateX(0); }
.fdrawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 28px 20px;
  border-bottom: 1px solid var(--line);
}
.fdrawer__title {
  font-family: var(--font-disp);
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.fdrawer__close {
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
  width: 36px; height: 36px;
  display: grid; place-items: center;
}
.fdrawer__close:hover { color: var(--accent); }
.fdrawer__body { flex: 1; overflow-y: auto; padding: 8px 28px 28px; }
.fgroup { border-bottom: 1px solid var(--line); padding: 24px 0; }
.fgroup:last-child { border-bottom: none; }
.fgroup__title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.fopt {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px 0;
  font-size: 16px;
  cursor: pointer;
  user-select: none;
}
.fopt input { position: absolute; opacity: 0; pointer-events: none; }
.fopt__box {
  width: 21px; height: 21px;
  border: 2px solid var(--ink);
  border-radius: 5px;
  display: grid; place-items: center;
  flex: 0 0 auto;
  transition: background .15s, border-color .15s;
}
.fopt__box svg { width: 13px; height: 13px; color: #fff; opacity: 0; }
.fopt input:checked + .fopt__box { background: var(--ink); }
.fopt input:checked + .fopt__box svg { opacity: 1; }
.fopt__count { margin-left: auto; color: var(--ink-soft); font-size: 14px; }

.fdrawer__foot {
  display: flex;
  gap: 14px;
  padding: 20px 28px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}
.fdrawer__foot .btn { flex: 1; padding: 16px 20px; }
.btn--clear {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
}
.btn--clear:hover { background: transparent; }

/* ---------- Empty state ---------- */
.col-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0 90px;
  color: var(--ink-soft);
}
.col-empty__title {
  font-family: var(--font-disp);
  font-size: 30px;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 12px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .col-grid { grid-template-columns: repeat(2, 1fr); }
  .col-banner { grid-column: 1 / -1; aspect-ratio: 1.9 / 1; }
}
@media (max-width: 760px) {
  .col-bar { padding-bottom: 28px; }
  .col-filter, .col-sort__btn { font-size: 16px; }
  .col-grid { column-gap: 16px; row-gap: 38px; }
  .col-card__name { font-size: 17px; }
}
@media (max-width: 460px) {
  .col-banner__sub { display: none; }
}
