/* ============================================
   NORTH & NOBLE — E-commerce Fashion Template
   Minimalist American · Navy + Gold on Paper
   Shopify-ready structure
   ============================================ */

:root {
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --paper: #faf9f7;
  --white: #ffffff;
  --accent: #1e3a5f;
  --accent-dark: #142a45;
  --gold: #b08d57;
  --muted: #8a8a8a;
  --line: #e8e5e0;
  --danger: #c0392b;
  --success: #2f7d32;
  --font-body: 'Be Vietnam Pro', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --shadow: 0 10px 34px rgba(26, 26, 26, .08);
  --shadow-lg: 0 18px 48px rgba(26, 26, 26, .14);
  --header-h: 76px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  padding-top: var(--header-h);
  -webkit-font-smoothing: antialiased;
  /* clip, not hidden: reveal transforms overhang the edge before they animate in,
     and clip does not turn the body into a scroll container (keeps sticky working) */
  overflow-x: clip;
}
body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }
/* 700 is not loaded — keep bold text on the 600 cut instead of a synthesized face */
strong { font-weight: 600; }

/* Shared form-control base. Each widget below only overrides size and palette. */
.search-form input,
.sort-select,
.field input, .field select, .field textarea,
.newsletter-form input {
  border: 1px solid var(--line); border-radius: 2px;
  background: var(--paper); color: var(--ink); font-size: 14px;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(38px, 5.5vw, 64px); }
h2 { font-size: clamp(28px, 3.4vw, 42px); }
h3 { font-size: 20px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
.section { padding: 92px 0; }
.section-alt { background: var(--white); }
.section-cta { margin-top: 42px; text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Shared media sizing ---------- */
.hero-bg img,
.page-hero-strip img,
.product-media img,
.gallery-main img,
.thumb img,
.split-media img,
.blog-media img,
.article-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: 12px; text-transform: uppercase; letter-spacing: 3px;
  font-weight: 600; color: var(--gold);
}
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { margin-top: 12px; }
.section-desc { color: var(--ink-soft); margin-top: 14px; font-size: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px; border: 1px solid transparent; border-radius: 2px;
  font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s ease;
}
.btn::after { content: '→'; transition: transform .3s ease; }
.btn:hover::after { transform: translateX(5px); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--accent); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: var(--white); }
.btn-outline { border-color: currentColor; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-block { width: 100%; justify-content: center; }
.link-arrow {
  font-size: 13px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
  border-bottom: 1px solid var(--line); padding-bottom: 3px; transition: border-color .3s ease;
}
.link-arrow:hover { border-color: var(--ink); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 500; background: var(--paper);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 18px;
  transition: opacity .6s ease, visibility .6s ease;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader-mark { font-family: var(--font-display); font-size: 26px; letter-spacing: 4px; }
.preloader-bar { width: 140px; height: 2px; background: var(--line); overflow: hidden; }
.preloader-bar span { display: block; width: 40%; height: 100%; background: var(--accent); animation: loadSlide 1.1s ease-in-out infinite; }
@keyframes loadSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 310;
  height: var(--header-h); background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: background .35s ease, box-shadow .35s ease;
}
.site-header.scrolled { box-shadow: 0 2px 18px rgba(26, 26, 26, .07); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.logo {
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; white-space: nowrap;
  transition: color .3s ease;
}
.nav { display: flex; gap: 30px; }
.nav a {
  font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-soft); position: relative; padding: 6px 0; transition: color .3s ease;
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--accent); transition: width .3s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { width: 100%; }
.nav a[aria-current="page"] { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 0; background: none; font-size: 17px; color: inherit;
  border-radius: 2px; position: relative; transition: background .3s ease, color .3s ease;
}
.icon-btn:hover { background: var(--line); }
.cart-badge {
  position: absolute; top: 5px; right: 3px; min-width: 18px; height: 18px;
  background: var(--accent); color: var(--white); border-radius: 99px;
  font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; padding: 0 5px;
}
.cart-badge[hidden] { display: none; }

.nav-toggle { display: none; width: 42px; height: 42px; border: 0; background: none; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px auto;
  transition: transform .3s ease, opacity .3s ease, background .3s ease;
}

/* Search panel */
.search-panel {
  position: absolute; top: var(--header-h); left: 0; right: 0;
  background: var(--white); border-bottom: 1px solid var(--line);
  padding: 22px 0; transform: translateY(-12px); opacity: 0; visibility: hidden;
  transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
}
.search-panel.open { transform: none; opacity: 1; visibility: visible; }
.search-form { display: flex; gap: 12px; }
.search-form input { flex: 1; padding: 13px 16px; }

/* Mobile menu overlay */
@media (max-width: 900px) {
  .nav {
    position: fixed; inset: 0; z-index: 300; background: var(--ink);
    flex-direction: column; align-items: center; justify-content: center; gap: 26px;
    opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s ease;
  }
  .nav.open { opacity: 1; visibility: visible; }
  /* .nav overlays from *inside* .header-inner, so raising .header-inner cannot beat it.
     Lift the overlay's siblings instead: wordmark stays visible, close button stays tappable. */
  .site-header .logo, .header-actions { position: relative; z-index: 301; }
  /* the overlay is dark: the active link must beat the light-header active color */
  .nav a, .nav a[aria-current="page"] { font-size: 18px; color: var(--paper); }
  .nav a::after { background: var(--gold); }
  .nav-toggle { display: block; }
  body.menu-open .site-header { background: transparent; box-shadow: none; border-bottom-color: transparent; }
  body.menu-open .logo, body.menu-open .icon-btn { color: var(--paper); }
  body.menu-open .icon-btn:hover { background: rgba(250, 249, 247, .14); }
  body.menu-open .nav-toggle span { background: var(--paper); }
  body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; overflow: hidden; color: var(--paper);
}
.hero-bg { position: absolute; inset: -12%; z-index: 0; }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(20, 42, 69, .82) 0%, rgba(26, 26, 26, .55) 55%, rgba(26, 26, 26, .3) 100%);
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; padding: 120px 0; }
.hero h1 { margin: 18px 0 20px; color: var(--white); }
.hero h1 em { font-style: italic; font-weight: 500; }
.hero-sub { font-size: 17px; color: rgba(250, 249, 247, .86); max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.scroll-hint {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 1;
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: rgba(250, 249, 247, .8);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-hint::after { content: ''; width: 1px; height: 40px; background: rgba(250, 249, 247, .6); animation: scrollPulse 1.9s ease-in-out infinite; }
@keyframes scrollPulse { 0%, 100% { transform: scaleY(.4); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ---------- Marquee ---------- */
.marquee { background: var(--accent); color: var(--paper); overflow: hidden; padding: 14px 0; }
.marquee-track { display: flex; width: max-content; animation: marqueeSlide 26s linear infinite; }
.marquee-track span {
  font-size: 12px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
  padding: 0 28px; white-space: nowrap;
}
@keyframes marqueeSlide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: var(--white); border-bottom: 1px solid var(--line); padding: 56px 0 60px; }
.page-hero h1 { margin-top: 14px; font-size: clamp(32px, 4.2vw, 52px); }
.breadcrumb { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { margin: 0 8px; }
.page-hero-strip { position: relative; height: 340px; overflow: hidden; }
.page-hero-strip::after { content: ''; position: absolute; inset: 0; background: rgba(26, 26, 26, .42); }

/* ---------- Collection cards ---------- */
.collection-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.collection-grid.large { grid-template-columns: repeat(2, 1fr); gap: 32px; }
.collection-card { position: relative; overflow: hidden; border-radius: 3px; color: var(--paper); display: block; }
.collection-card .split-media { height: 420px; }
.collection-grid.large .split-media { height: 480px; }
.collection-card img { transition: transform .8s ease; }
.collection-card:hover img { transform: scale(1.06); }
.collection-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26, 26, 26, .78) 0%, rgba(26, 26, 26, .1) 60%);
}
.collection-card-body { position: absolute; left: 26px; right: 26px; bottom: 24px; z-index: 1; }
.collection-card-body h3 { font-size: 24px; color: var(--white); }
.collection-card-count { font-size: 13px; color: rgba(250, 249, 247, .8); }
.collection-card-cta { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; }

/* ---------- Product card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.product-card {
  position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 3px;
  overflow: hidden; transition: transform .45s ease, box-shadow .45s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product-media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--line); }
.product-media img { transition: transform .8s ease; }
.product-card:hover .product-media img { transform: scale(1.06); }
.product-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2; padding: 5px 11px; border-radius: 2px;
  font-size: 11px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--white);
}
.badge-sale { background: var(--danger); }
.badge-new { background: var(--accent); }
.badge-low { background: var(--gold); }
.badge-best { background: var(--ink); }
.quick-view {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2;
  padding: 12px; border: 0; border-radius: 2px; background: var(--ink); color: var(--paper);
  font-size: 12px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase;
  opacity: 0; transform: translateY(16px); transition: opacity .35s ease, transform .35s ease, background .3s ease;
}
.quick-view:hover { background: var(--accent); }
.product-card:hover .quick-view, .product-card:focus-within .quick-view { opacity: 1; transform: none; }
.product-info { padding: 18px 18px 22px; }
.product-cat { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.product-name { font-size: 17px; margin: 6px 0 10px; }
.product-price { display: flex; align-items: baseline; gap: 10px; font-size: 15px; }
.price { font-weight: 600; }
.price.on-sale { color: var(--danger); }
.compare-at { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.product-card-link { position: absolute; inset: 0; z-index: 1; }

@media (hover: none) {
  /* Touch: luôn hiện quick-add (giữ chuyển đổi mobile) — z-index 2 > link z-1 */
  .quick-view { opacity: 1; transform: none; }
}

/* ---------- Split (image with text) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-media { position: relative; height: 560px; overflow: hidden; border-radius: 3px; }
.split-body h2 { margin: 14px 0 18px; }
.split-body p { color: var(--ink-soft); margin-bottom: 16px; }

/* ---------- Value props ---------- */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.value-card { background: var(--white); border: 1px solid var(--line); border-radius: 3px; padding: 34px 28px; text-align: center; }
.value-icon { font-size: 26px; }
.value-card h3 { font-size: 18px; margin: 14px 0 8px; }
.value-card p { font-size: 14px; color: var(--ink-soft); }

/* ---------- Testimonials ---------- */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.testimonial {
  background: var(--white); border: 1px solid var(--line); border-radius: 3px; padding: 32px 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.stars { color: var(--gold); letter-spacing: 2px; font-size: 14px; }
.testimonial blockquote { font-family: var(--font-display); font-size: 18px; font-style: italic; line-height: 1.6; }
.testimonial-author { font-size: 13px; color: var(--muted); margin-top: auto; }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--accent); color: var(--paper); padding: 78px 0; text-align: center; }
.newsletter h2 { color: var(--white); margin: 12px 0 12px; }
.newsletter p { color: rgba(250, 249, 247, .8); max-width: 520px; margin: 0 auto; }
.newsletter-form { display: flex; gap: 12px; max-width: 480px; margin: 30px auto 0; }
.newsletter-form input {
  flex: 1; padding: 14px 16px; border-color: rgba(250, 249, 247, .3);
  background: rgba(250, 249, 247, .08); color: var(--paper);
}
.newsletter-form input::placeholder { color: rgba(250, 249, 247, .6); }
.form-note { margin-top: 14px; font-size: 14px; color: var(--success); }
.newsletter .form-note { color: #8fd694; }

/* ---------- Collection page: toolbar ---------- */
.shop-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px; padding-bottom: 26px; margin-bottom: 38px; border-bottom: 1px solid var(--line);
}
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
/* Pill family — .chip (category filter) and .size-btn (variant picker) share this base.
   Both are toggle buttons driven by aria-pressed. */
.chip, .size-btn {
  border: 1px solid var(--line); background: var(--white); border-radius: 2px; font-weight: 600;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.chip:hover, .size-btn:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"], .size-btn[aria-pressed="true"] {
  background: var(--ink); border-color: var(--ink); color: var(--paper);
}
.chip {
  padding: 9px 18px; font-size: 12px; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--ink-soft);
}
.toolbar-right { display: flex; align-items: center; gap: 16px; }
.result-count { font-size: 13px; color: var(--muted); }
.sort-select { padding: 10px 14px; background: var(--white); font-size: 13px; }
.empty-results { text-align: center; padding: 60px 0; color: var(--muted); }

/* filter animations (independent from .reveal) */
@keyframes filterPop { from { opacity: 0; transform: scale(.94) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes filterOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.96); } }
.filter-pop { animation: filterPop .45s ease both; }
.filter-out { animation: filterOut .22s ease both; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: start; }
.gallery-main { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 3px; background: var(--line); }
.gallery-main img { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; }
.gallery-main img.active { opacity: 1; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(250, 249, 247, .9);
  font-size: 16px; transition: background .3s ease;
}
.gallery-nav:hover { background: var(--white); }
.gallery-prev { left: 14px; }
.gallery-next { right: 14px; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.thumb {
  aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid var(--line); border-radius: 2px;
  padding: 0; background: none; transition: border-color .3s ease, opacity .3s ease; opacity: .65;
}
.thumb[aria-pressed="true"] { border-color: var(--ink); opacity: 1; }
.thumb:hover { opacity: 1; }

.product-panel h1 { font-size: clamp(30px, 3.6vw, 44px); margin: 12px 0 14px; }
.rating-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-soft); }
.product-panel .product-price { font-size: 24px; margin: 18px 0 16px; }
.product-panel .compare-at { font-size: 17px; }
.product-lead { color: var(--ink-soft); padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.variant-block { padding: 22px 0; border-bottom: 1px solid var(--line); }
.variant-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 14px;
}
.variant-label .selected-value { color: var(--muted); letter-spacing: .6px; text-transform: none; font-weight: 500; }
.swatches { display: flex; gap: 12px; }
.swatch {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  box-shadow: inset 0 0 0 3px var(--white); transition: box-shadow .3s ease, border-color .3s ease;
}
.swatch[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 3px var(--white), 0 0 0 1px var(--ink); }
.sw-white { background: #f2efe9; }
.sw-navy { background: #1e3a5f; }
.sw-black { background: #232323; }
.size-row { display: flex; flex-wrap: wrap; gap: 10px; }
.size-btn { min-width: 54px; padding: 11px 14px; font-size: 13px; }
.size-guide { font-size: 12px; color: var(--muted); text-decoration: underline; text-transform: none; letter-spacing: .4px; }

.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 2px; background: var(--white); }
.qty-control button { width: 42px; height: 46px; border: 0; background: none; font-size: 17px; color: var(--ink); }
.qty-control button:hover { background: var(--line); }
.qty-control input {
  width: 52px; height: 46px; border: 0; text-align: center; font-weight: 600; background: none;
  -moz-appearance: textfield;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row { display: flex; flex-direction: column; gap: 12px; padding: 24px 0 16px; }
.trust-line { font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.trust-line strong { color: var(--success); }

/* ---------- Accordion ---------- */
.accordion { border-top: 1px solid var(--line); margin-top: 8px; }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0; border: 0; background: none; text-align: left;
  font-size: 14px; font-weight: 600; letter-spacing: .6px; color: var(--ink);
}
.acc-trigger::after { content: '+'; font-size: 20px; color: var(--muted); transition: transform .3s ease; }
.acc-trigger[aria-expanded="true"]::after { transform: rotate(45deg); }
.acc-panel { padding: 0 0 22px; color: var(--ink-soft); font-size: 15px; }
.acc-panel ul { padding-left: 20px; }

/* ---------- Reviews ---------- */
.review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.review-card { background: var(--white); border: 1px solid var(--line); border-radius: 3px; padding: 28px; }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.review-card h3 { font-size: 17px; margin-bottom: 8px; }
.review-card p { color: var(--ink-soft); font-size: 15px; }
.review-meta { font-size: 13px; color: var(--muted); margin-top: 12px; }
.rating-summary { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.rating-score { font-family: var(--font-display); font-size: 42px; }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }
.cart-line {
  display: grid; grid-template-columns: 110px 1fr auto auto auto; gap: 20px; align-items: center;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.cart-line-media { width: 110px; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 2px; background: var(--line); }
.cart-line-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-title { font-family: var(--font-display); font-size: 18px; }
.cart-line-variant { font-size: 13px; color: var(--muted); }
.cart-line-unit { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.cart-line-total { font-weight: 600; min-width: 90px; text-align: right; }
.line-remove {
  width: 36px; height: 36px; border: 1px solid var(--line); background: var(--white);
  border-radius: 2px; color: var(--muted); transition: color .3s ease, border-color .3s ease;
}
.line-remove:hover { color: var(--danger); border-color: var(--danger); }
.cart-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 16px; border-bottom: 1px solid var(--ink);
}
.cart-head span { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }

.ship-progress { background: var(--white); border: 1px solid var(--line); border-radius: 3px; padding: 20px 22px; margin-top: 26px; }
.ship-progress .ship-note { font-size: 14px; margin-bottom: 12px; }
.ship-bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.ship-bar span { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 99px; transition: width .5s ease, background .5s ease; }
.ship-progress.reached .ship-bar span { background: var(--success); }
.ship-progress.reached .ship-note { color: var(--success); font-weight: 600; }

.order-summary { background: var(--white); border: 1px solid var(--line); border-radius: 3px; padding: 30px 28px; position: sticky; top: calc(var(--header-h) + 24px); }
.order-summary h2 { font-size: 22px; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; font-size: 15px; padding: 10px 0; color: var(--ink-soft); }
.summary-row.total {
  border-top: 1px solid var(--line); margin-top: 10px; padding-top: 18px;
  font-size: 19px; font-weight: 600; color: var(--ink);
}
.summary-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.summary-note { font-size: 12px; color: var(--muted); margin-top: 14px; text-align: center; }
.empty-state { text-align: center; padding: 80px 0; }
.empty-state h2 { margin: 16px 0 12px; }
.empty-state p { color: var(--ink-soft); margin-bottom: 28px; }
.empty-icon { font-size: 44px; }

/* ---------- About ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-num { font-family: var(--font-display); font-size: clamp(34px, 4vw, 52px); color: var(--accent); }
.stat-label { font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.team-card { background: var(--white); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.team-card .split-media { height: 340px; border-radius: 0; }
.team-body { padding: 22px 24px 26px; }
.team-body h3 { font-size: 19px; }
.team-role { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold); margin: 4px 0 10px; }
.team-body p { font-size: 14px; color: var(--ink-soft); }
.pull-quote {
  font-family: var(--font-display); font-style: italic; font-size: 22px; line-height: 1.6;
  border-left: 2px solid var(--gold); padding-left: 22px; margin: 26px 0; color: var(--ink);
}
.cta-band { background: var(--ink); color: var(--paper); padding: 78px 0; text-align: center; }
.cta-band h2 { color: var(--white); margin: 12px 0 16px; }
.cta-band p { color: rgba(250, 249, 247, .78); max-width: 540px; margin: 0 auto; }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.blog-card { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; transition: transform .45s ease, box-shadow .45s ease; }
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.blog-media { height: 240px; overflow: hidden; }
.blog-media img { transition: transform .8s ease; }
.blog-card:hover .blog-media img { transform: scale(1.06); }
.blog-body { padding: 24px 24px 28px; }
.blog-meta { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); display: flex; gap: 8px; }
.blog-meta .cat { color: var(--gold); }
.blog-body h3 { font-size: 20px; margin: 10px 0; }
.blog-body p { font-size: 14px; color: var(--ink-soft); margin-bottom: 16px; }
.blog-card-link { position: absolute; inset: 0; z-index: 1; }

/* ---------- Article ---------- */
.article-wrap { max-width: 760px; margin: 0 auto; }
.article-body p { margin-bottom: 22px; color: var(--ink-soft); font-size: 17px; }
.article-body h2 { margin: 40px 0 18px; font-size: 30px; }
.article-body ul { margin: 0 0 24px 22px; color: var(--ink-soft); }
.article-body li { margin-bottom: 8px; }
.article-media { height: 420px; overflow: hidden; border-radius: 3px; margin: 34px 0 14px; }
.article-figure figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 30px; }
.author-box {
  display: flex; gap: 20px; align-items: center; background: var(--white);
  border: 1px solid var(--line); border-radius: 3px; padding: 26px; margin-top: 46px;
}
.author-avatar { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-box h3 { font-size: 18px; }
.author-box p { font-size: 14px; color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.info-list { list-style: none; margin-top: 24px; }
.info-list li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.info-list .info-icon { font-size: 18px; }
.info-list h3 { font-size: 15px; font-family: var(--font-body); font-weight: 600; }
.info-list p { font-size: 14px; color: var(--ink-soft); }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 3px; padding: 34px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 8px; }
.field input, .field select, .field textarea { width: 100%; padding: 13px 15px; }
.field textarea { resize: vertical; min-height: 130px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.map-placeholder {
  margin-top: 60px; height: 320px; border: 1px solid var(--line); border-radius: 3px;
  background: repeating-linear-gradient(45deg, var(--white), var(--white) 14px, var(--paper) 14px, var(--paper) 28px);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; color: var(--muted);
}
.map-placeholder strong { color: var(--ink); font-family: var(--font-display); font-size: 20px; }

/* ---------- 404 ---------- */
.page-404 {
  min-height: calc(100vh - var(--header-h)); display: flex; align-items: center;
  justify-content: center; text-align: center; padding: 80px 0;
}
.big-404 { font-family: var(--font-display); font-size: clamp(96px, 20vw, 210px); line-height: 1; color: var(--accent); }
.page-404 h1 { margin: 10px 0 16px; }
.page-404 p { color: var(--ink-soft); max-width: 460px; margin: 0 auto 30px; }
.page-404 .search-form { max-width: 440px; margin: 26px auto 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(250, 249, 247, .74); padding: 76px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.site-footer .logo { color: var(--paper); display: inline-block; margin-bottom: 16px; }
.footer-about p { font-size: 14px; max-width: 320px; }
.footer-col h3 { font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--paper); margin-bottom: 18px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; transition: color .3s ease; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  margin-top: 54px; padding-top: 24px; border-top: 1px solid rgba(250, 249, 247, .14); font-size: 13px;
}
.social-row { display: flex; gap: 16px; margin-top: 20px; }
.social-row a { font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; }

/* ---------- To top + toast ---------- */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 200; width: 46px; height: 46px;
  border: 0; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 16px;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s ease, visibility .3s ease, transform .3s ease, background .3s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); }
.toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 400; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper); padding: 14px 24px; border-radius: 2px;
  font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease, transform .35s ease;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transition: opacity .9s ease, transform .9s ease, box-shadow .9s ease; }
.reveal[data-reveal="up"] { transform: translateY(34px); }
/* horizontal offsets stay inside the 28px container padding so nothing overhangs the viewport */
.reveal[data-reveal="left"] { transform: translateX(-24px); }
.reveal[data-reveal="right"] { transform: translateX(24px); }
.reveal[data-reveal="zoom"]:not(.page-hero-strip) { transform: scale(.94); }
.reveal.visible { opacity: 1; transform: none; }

/* card transitions must win over the slower .reveal transition */
.product-card, .blog-card { transition: transform .45s ease, box-shadow .45s ease; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .section { padding: 74px 0; }
  .collection-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .split { gap: 40px; }
  .split-media { height: 460px; }
  .product-detail { grid-template-columns: 1fr; gap: 44px; }
  .cart-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  /* container padding drops to 20px here — slide up instead of sideways */
  .reveal[data-reveal="left"], .reveal[data-reveal="right"] { transform: translateY(28px); }
  .section { padding: 62px 0; }
  .split { grid-template-columns: 1fr; }
  .split-media { height: 360px; }
  .value-grid, .testimonial-grid, .team-grid, .blog-grid, .review-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .collection-grid.large { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; gap: 36px; }
  .shop-toolbar { flex-direction: column; align-items: flex-start; }
  .article-media { height: 280px; }
  /* cart table stacks */
  .cart-line { grid-template-columns: 90px 1fr; grid-template-areas: 'media info' 'media qty' 'media total'; row-gap: 12px; }
  .cart-line-media { width: 90px; grid-area: media; align-self: start; }
  .cart-line-info { grid-area: info; }
  .cart-line-qty { grid-area: qty; justify-self: start; }
  .cart-line-total { grid-area: total; text-align: left; }
  .line-remove { position: absolute; top: 22px; right: 0; }
  .cart-line { position: relative; }
  .cart-head { display: none; }
}

@media (max-width: 560px) {
  /* keep the header on one row: smaller wordmark, tighter icons, account hidden on mobile (demo) */
  .header-inner { gap: 10px; }
  .logo { font-size: 17px; letter-spacing: 1px; }
  .icon-btn { width: 36px; height: 36px; font-size: 15px; }
  .nav-toggle { width: 36px; height: 36px; }
  .account-btn { display: none; }
  .product-grid, .collection-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .newsletter-form, .search-form { flex-direction: column; }
  .hero-actions .btn, .newsletter-form .btn, .search-form .btn { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .thumbs { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .form-card { padding: 24px 20px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-bg { transform: none !important; }
}

/* ===== Shared dropdown: drop the native chrome, draw a themed chevron =====
   Lives at the end of the file so padding-right beats the padding declared
   in the blocks above. Still a real <select>: native list and a11y untouched. */
select,
.sort-select,
.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%238a8a8a' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.75 4.75 3.25 3.25 3.25-3.25'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
}

select:hover,
.sort-select:hover,
.field select:hover {
  border-color: var(--accent);
}

select:focus,
.sort-select:focus,
.field select:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(30, 58, 95, 0.28);
  outline-offset: 1px;
}
