/* =========================================================
   commoncotton — Design System
   Inspired by Apple's spacing / AURALEE's quiet materiality
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  /* Color */
  --bg: #f6f6f4;          /* light grey (AURALEE-style) */
  --bg-soft: #eeeeeb;     /* soft grey */
  --bg-dark: #111111;     /* near-black hero */
  --ink: #1a1a1a;         /* primary text */
  --ink-soft: #6b6a66;    /* secondary text */
  --line: #dbdbd8;        /* hairline dividers */
  --accent: #2a2a2a;
  --white: #ffffff;

  /* Type */
  --font-sans: "Poppins", -apple-system, BlinkMacSystemFont,
               "Helvetica Neue", system-ui, sans-serif;
  --font-serif: "Times New Roman", "Cormorant Garamond", Georgia, serif;

  /* Scale */
  --fs-xxs: 11px;
  --fs-xs:  13px;
  --fs-sm:  15px;
  --fs-md:  18px;
  --fs-lg:  24px;
  --fs-xl:  40px;
  --fs-xxl: 72px;
  --fs-hero: clamp(48px, 8.5vw, 128px);

  /* Layout */
  --max:  1440px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 2px;

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.row    { display: flex; gap: var(--gutter); }
.center { text-align: center; }
.uppercase { text-transform: uppercase; letter-spacing: .12em; }
.eyebrow {
  font-size: var(--fs-xxs);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 400; letter-spacing: -.02em; line-height: 1.05; }
h1 { font-size: var(--fs-hero); }
h2 { font-size: clamp(34px, 5vw, 64px); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); letter-spacing: -.01em; }
p  { color: var(--ink); }

.serif    { font-family: var(--font-serif); font-style: italic; }
.muted    { color: var(--ink-soft); }
.fine     { font-size: var(--fs-xs); color: var(--ink-soft); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.nav.scrolled { border-bottom: 1px solid var(--line); }
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: .04em;
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.nav-logo img {
  height: 32px;
  width: auto;
  display: block;
  transition: opacity .2s var(--ease);
}
.nav-logo:hover img { opacity: .72; }
.nav-menu {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-menu > li { position: relative; }
.nav-menu a {
  font-size: var(--fs-xs);
  color: var(--ink);
  opacity: .82;
  display: inline-block;
  -webkit-text-stroke: 0 currentColor;
  transition: opacity .2s var(--ease), -webkit-text-stroke-width .45s cubic-bezier(.4, 0, .2, 1);
}
.nav-menu a:hover { opacity: 1; -webkit-text-stroke-width: 0.4px; }

/* Submenu (dropdown) */
.has-submenu > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
}
.has-submenu > a::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: .55;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.has-submenu:hover > a::after,
.has-submenu.open > a::after {
  opacity: 1;
  transform: rotate(225deg) translateY(0);
}

/* invisible hover bridge — keeps hover continuous from link down to panel */
.has-submenu > a::before {
  content: "";
  position: absolute;
  left: -14px;
  right: -14px;
  top: 100%;
  height: 40px;
}

.nav-menu .has-submenu { position: static; }

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 26px 0 30px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  box-shadow: 0 24px 48px rgba(0,0,0,.06);
  z-index: 110;
}
.has-submenu:hover .submenu,
.has-submenu.open .submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 1.5s var(--ease), transform 1.5s var(--ease);
}
.submenu-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  gap: clamp(48px, 7vw, 110px);
}
.submenu-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Apple-style blur scrim — blurs the page behind an open dropdown */
.nav::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 100vh;
  background: rgba(0, 0, 0, .14);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
  z-index: 90;
}
.nav:has(.has-submenu:hover)::after,
.nav:has(.has-submenu.open)::after {
  opacity: 1;
  transition: opacity 1.5s var(--ease);
}

/* mega-menu item — text only */
.sub-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background .2s var(--ease);
}
.sub-item-soon { cursor: default; }
.sub-name {
  font-size: var(--fs-xs);
  letter-spacing: .01em;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.15;
  align-self: flex-start;
  -webkit-text-stroke: 0 currentColor;
  transition: -webkit-text-stroke-width .45s cubic-bezier(.4, 0, .2, 1);
}
.sub-item:not(.sub-item-soon):hover .sub-name {
  -webkit-text-stroke-width: 0.4px;
}
.sub-meta {
  font-size: var(--fs-xxs);
  line-height: 1.1;
  color: var(--ink-soft);
}
.nav-actions {
  display: flex;
  gap: 4px;
  font-size: var(--fs-xs);
  align-items: center;
}
.nav-actions button {
  opacity: .85;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 50%;
  transition: opacity .2s var(--ease), background .2s var(--ease);
}
.nav-actions button:hover {
  opacity: 1;
  background: rgba(0,0,0,.05);
}
.nav-actions svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cart-count {
  font-size: 9px;
  font-weight: 500;
  background: var(--ink);
  color: var(--bg);
  border-radius: 99px;
  min-width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  position: absolute;
  top: 4px;
  right: 2px;
  letter-spacing: 0;
  line-height: 1;
  border: 1.5px solid var(--bg);
}
.cart-count.hidden { display: none; }

@media (max-width: 720px) {
  .nav-menu { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 26px;
  font-size: var(--fs-xs);
  letter-spacing: .04em;
  border-radius: 999px;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: #000; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-link {
  font-size: var(--fs-xs);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

/* ---------- Hero (full-bleed image, AURALEE-style) ---------- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: var(--bg-soft);
  display: block;
}
.hero picture,
.hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ---------- Section ---------- */
section { padding: clamp(80px, 12vw, 160px) 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 56px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head h2 { max-width: 780px; }

/* ---------- Product Card ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(24px, 3vw, 48px) clamp(16px, 2vw, 32px);
}
.product {
  display: block;
  transition: transform .4s var(--ease);
}
.product:hover { transform: translateY(-3px); }
.product-media {
  background: var(--bg-soft);
  aspect-ratio: 4/5;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
  border-radius: 20px;
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-media .ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  letter-spacing: .15em;
}
.product-media .ph.tee     { background: linear-gradient(160deg, #ece8df, #d6d0bf); }
.product-media .ph.crew    { background: linear-gradient(160deg, #d8d4c8, #b6b1a1); }
.product-media .ph.pants   { background: linear-gradient(160deg, #c9c3b3, #9a9685); }
.product-media .ph.jacket  { background: linear-gradient(160deg, #b4ad9a, #847e6c); }
.product-media .ph.shirt   { background: linear-gradient(160deg, #efece4, #d7d2c2); }
.product-media .ph.knit    { background: linear-gradient(160deg, #e3dccb, #b9b09c); }

.product-name {
  font-size: var(--fs-sm);
  font-weight: 400;
  margin-bottom: 4px;
}
.product-meta {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
}
.product-price {
  font-size: var(--fs-xs);
  margin-top: 8px;
}

/* ---------- Editorial block ---------- */
.editorial {
  background: var(--bg-dark);
  color: var(--bg);
  padding: clamp(80px, 12vw, 160px) 0;
}
.editorial h2 { color: var(--bg); }
.editorial .muted { color: rgba(245,244,241,.6); }
.editorial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
  align-items: center;
}
.editorial-img {
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, #2a2a2a, #0a0a0a);
  border-radius: 20px;
  overflow: hidden;
}
@media (max-width: 800px) {
  .editorial-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 72px 0 40px;
  font-size: var(--fs-xs);
  color: var(--ink-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--gutter);
}
.footer-grid h5 {
  font-size: var(--fs-xxs);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Cart drawer ---------- */
.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  background: var(--bg);
  z-index: 200;
  transform: translateX(100%);
  transition: transform .5s var(--ease);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,.08);
}
.cart-drawer.open { transform: translateX(0); }
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.25);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s var(--ease);
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-head {
  padding: 24px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.cart-head h4 { font-size: var(--fs-md); font-weight: 500; }
.cart-body { flex: 1; overflow-y: auto; padding: 24px var(--gutter); }
.cart-empty { color: var(--ink-soft); text-align: center; padding: 40px 0; font-size: var(--fs-xs); }
.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item-img {
  aspect-ratio: 4/5;
  background: var(--bg-soft);
  border-radius: 20px;
  overflow: hidden;
}
.cart-item-name { font-size: var(--fs-xs); margin-bottom: 4px; }
.cart-item-meta { font-size: var(--fs-xxs); color: var(--ink-soft); }
.cart-foot {
  padding: 24px var(--gutter);
  border-top: 1px solid var(--line);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: var(--fs-sm);
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 2s var(--ease), transform 2s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Listing (AURALEE-style) ---------- */
.listing {
  padding-top: 116px;
  padding-bottom: clamp(80px, 10vw, 140px);
}
.listing .container {
  max-width: none;
  padding-left: 5px;
  padding-right: 5px;
}
.listing-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(24px, 4vw, 52px) 0 clamp(28px, 4vw, 48px);
}
.listing-head .eyebrow { margin-bottom: 14px; }
.listing-head h1 {
  font-size: clamp(22px, 2.6vw, 36px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.1;
  margin-left: 22px;
  transform: translateY(-32px);
}
.listing-head h1.listing-logo {
  font-size: clamp(18px, 2vw, 27px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: 0.96;
}
.listing-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 4px 0 16px;
  margin-bottom: clamp(18px, 2.4vw, 34px);
}
.listing-filter {
  font-size: var(--fs-xs);
  letter-spacing: .05em;
  color: var(--ink);
  background: none;
  cursor: pointer;
  margin-right: 22px;
  transition: opacity .2s var(--ease);
}
.listing-filter:hover { opacity: .55; }
.listing-cats { display: flex; gap: 24px; flex-wrap: wrap; }
.listing-cats button {
  font-size: var(--fs-xs);
  letter-spacing: .04em;
  color: var(--ink-soft);
  padding: 3px 0;
  cursor: pointer;
  transition: color .2s var(--ease);
}
.listing-cats button:hover { color: var(--ink); }
.listing-cats button.active {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}
.listing-count {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  letter-spacing: .02em;
}
.listing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(64px, 7vw, 104px) 1px;
}
.listing-grid .product-media { border-radius: 0; aspect-ratio: 3 / 4; }
@media (max-width: 1024px) { .listing-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px)  { .listing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px)  { .listing-grid { grid-template-columns: 1fr; } }
.swatch-dots { display: flex; gap: 5px; margin: 13px 0 7px; }
.swatch-dots span {
  width: 9px; height: 9px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.16);
}

/* ---------- Filter panel ---------- */
.listing-filter { font-weight: 400; }
.filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
  z-index: 190;
}
.filter-overlay.open { opacity: 1; pointer-events: auto; }
.filter-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(382px, 88vw);
  background: var(--bg);
  transform: translateX(100%);
  transition: transform .45s var(--ease);
  z-index: 200;
  display: flex;
  flex-direction: column;
}
.filter-panel.open { transform: translateX(0); }
.filter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.filter-head h4 { font-weight: 400; }
.filter-head button {
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  background: none;
  cursor: pointer;
  transition: color .2s var(--ease);
}
.filter-head button:hover { color: var(--ink); }
.filter-body { flex: 1; overflow-y: auto; padding: 4px var(--gutter) 24px; }
.filter-group { padding: 22px 0; border-bottom: 1px solid var(--line); }
.filter-group:last-child { border-bottom: none; }
.filter-group h5 {
  font-size: var(--fs-xxs);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 12px;
}
.filter-opt {
  display: block;
  width: 100%;
  text-align: left;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  padding: 7px 0;
  background: none;
  cursor: pointer;
  transition: color .2s var(--ease);
}
.filter-opt:hover { color: var(--ink); }
.filter-opt.active { color: var(--ink); }
.filter-opt.active::before { content: "— "; }
.filter-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-size {
  min-width: 46px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: none;
  font-size: var(--fs-xs);
  letter-spacing: .04em;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.filter-size:hover { border-color: var(--ink); }
.filter-size.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter-colors { display: flex; flex-wrap: wrap; gap: 11px; }
.filter-color {
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,.16);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.filter-color:hover { transform: scale(1.08); }
.filter-color.active { box-shadow: 0 0 0 1.5px var(--ink); transform: scale(1.08); }
.filter-foot {
  padding: 16px var(--gutter);
  border-top: 1px solid var(--line);
}
.filter-foot .btn { width: 100%; }

/* ---------- Utilities ---------- */
.divider {
  height: 1px;
  background: var(--line);
  margin: 0;
}
.spacer-lg { height: clamp(80px, 12vw, 160px); }
