/* =============================================
   TMT Coffee Roasters — style.css
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ---------------------------------------------
   Custom Properties
   --------------------------------------------- */
:root {
  /* Brand Colors */
  --color-bg:      #F8F8F8;
  --color-text:    #111111;
  --color-accent:  #111111;
  --color-green:   #111111;
  --color-light:   #E5E5E5;
  --color-white:   #FFFFFF;
  --color-muted:   #888888;
  --color-accent-dark: #000000;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing scale */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Layout */
  --max-width:  1200px;
  --nav-height: 72px;

  /* Shape */
  --radius:    12px;
  --radius-sm:  6px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow:    0 4px 16px rgba(0,0,0,0.09);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);

  /* Motion */
  --ease: 0.2s ease;
}

/* ---------------------------------------------
   Reset & Base
   --------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ---------------------------------------------
   Typography
   --------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 700; font-family: 'Raleway', system-ui, sans-serif; }
h2 { font-size: clamp(1.625rem, 3vw, 2.375rem); font-weight: 600; }
h3 { font-size: clamp(1.125rem, 2vw, 1.375rem); font-weight: 600; }
h4 { font-size: 1.0625rem; font-weight: 600; }

p { max-width: 65ch; }

.lead {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-muted);
}

/* ---------------------------------------------
   Layout utilities
   --------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--sp-8);
}

section { padding-block: var(--sp-24); }

.section-header {
  text-align: center;
  margin-bottom: var(--sp-16);
}

.section-header h2 { margin-bottom: var(--sp-4); }

.section-header p {
  margin-inline: auto;
  color: var(--color-muted);
}

.text-center { text-align: center; }

/* ---------------------------------------------
   Navigation
   --------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-light);
  transition: box-shadow var(--ease);
}

.site-nav.scrolled { box-shadow: var(--shadow); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--sp-8);
}

/* Logo
   The PNG canvas is 1414×2000 with ~35% whitespace top & bottom.
   We render it tall then clip to show only the text area, aligned with nav links.
   ----------------------------------------------------------------- */
.nav-logo {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  /* clip window = full nav height so logo text centers at same axis as nav links */
  height: var(--nav-height);
  flex-shrink: 0;
}

.logo-img {
  /* Render tall so the text band fills the clip window nicely */
  height: 160px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* White version for dark backgrounds (footer) */
.logo-img-white {
  filter: brightness(0) invert(1);
}

/* Legacy text-logo spans — kept for safety, hidden when img is present */
.logo-tmt {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.logo-sub {
  font-family: var(--font-sans);
  font-size: 0.575rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  line-height: 1;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--ease);
  position: relative;
  padding-block: var(--sp-2);
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 100%;
  height: 1.5px;
  background-color: var(--color-accent);
  transition: right var(--ease);
}

.nav-links a:hover           { color: var(--color-accent); }
.nav-links a:hover::after,
.nav-links a.active::after   { right: 0; }
.nav-links a.active          { color: var(--color-accent); }

/* Nav CTA pill */
.nav-cta {
  background-color: var(--color-accent) !important;
  color: var(--color-white) !important;
  padding: var(--sp-2) var(--sp-5) !important;
  border-radius: var(--radius-sm);
  border: none !important;
  font: inherit !important;
  font-weight: 600 !important;
  transition: background-color var(--ease), transform var(--ease) !important;
}

.nav-cta:hover {
  background-color: var(--color-accent-dark) !important;
  transform: translateY(-1px);
}

.nav-cta::after { display: none !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: all var(--ease);
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------------------------------------------
   Footer
   --------------------------------------------- */
.site-footer {
  background-color: var(--color-text);
  color: var(--color-light);
  padding-top: var(--sp-16);
  padding-bottom: var(--sp-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--sp-12);
  margin-bottom: var(--sp-12);
}

.footer-brand .nav-logo {
  height: 60px;
  align-items: flex-start;
  margin-bottom: var(--sp-4);
}

.footer-brand .logo-img {
  height: 184px;
  margin-top: -58px;
}

.footer-brand p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  max-width: 260px;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--sp-4);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-col ul a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--ease);
}

.footer-col ul a:hover { color: var(--color-light); }

.footer-col address {
  font-style: normal;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
}

.footer-col address a {
  color: rgba(255,255,255,0.6);
  transition: color var(--ease);
}

.footer-col address a:hover { color: var(--color-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.35);
}

/* ---------------------------------------------
   Buttons
   --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-white);
  color: #111;
  border-color: var(--color-white);
  padding: 0.875rem 2.25rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-outline:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-outline-light {
  background-color: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.7);
}

.btn-outline-light:hover {
  background-color: var(--color-white);
  color: var(--color-accent);
  border-color: var(--color-white);
}

.btn-green {
  background-color: var(--color-green);
  color: var(--color-white);
  border-color: var(--color-green);
}

.btn-green:hover {
  background-color: #3d5736;
  border-color: #3d5736;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* ---------------------------------------------
   Badges
   --------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-light  { background-color: #F0F0F0; color: #555555; }
.badge-medium { background-color: #EBEBEB; color: #222222; }
.badge-dark   { background-color: #E2E2E2; color: #111111; }
.badge-decaf  { background-color: #F0F0F0; color: #555555; border: 1px solid #DDDDDD; }

/* ---------------------------------------------
   Hero
   --------------------------------------------- */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: #0A0A0A;
}

.hero::before { display: none; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: var(--sp-6);
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background-color: rgba(255,255,255,0.3);
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: var(--sp-6);
  letter-spacing: -0.02em;
  font-style: italic;
}

.hero h1 em {
  color: rgba(255,255,255,0.75);
  font-style: normal;
}

.hero-sub {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.58);
  margin-bottom: var(--sp-10);
  max-width: 500px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.scroll-hint {
  position: absolute;
  bottom: var(--sp-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  color: rgba(255,255,255,0.25);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: bounce-y 2.2s ease-in-out infinite;
}

.scroll-hint svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes bounce-y {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  55%       { transform: translateX(-50%) translateY(7px); }
}

/* ---------------------------------------------
   Home — Why Section
   --------------------------------------------- */
.section-why { background-color: var(--color-bg); }

.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}

.feature-card {
  padding: var(--sp-12) var(--sp-8);
  text-align: center;
  border: 1px solid var(--color-light);
  border-radius: var(--radius);
  background-color: var(--color-white);
  transition: all var(--ease);
}

.feature-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin-inline: auto;
  margin-bottom: var(--sp-6);
  background-color: rgba(0,0,0,0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-size: 1.0625rem;
  margin-bottom: var(--sp-3);
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--color-muted);
  margin-inline: auto;
}

/* ---------------------------------------------
   Home — Featured Products
   --------------------------------------------- */
.section-featured { background-color: var(--color-white); }

.section-featured .section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  text-align: left;
  margin-bottom: var(--sp-12);
}

.section-featured .section-header > div p {
  margin-inline: 0;
  color: var(--color-muted);
}

/* ---------------------------------------------
   Home — Brand Story
   --------------------------------------------- */
.section-story { background-color: var(--color-bg); }

.story-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}

.story-text h2   { margin-bottom: var(--sp-6); }
.story-text p    { color: var(--color-muted); margin-bottom: var(--sp-6); max-width: none; }
.story-text .btn { margin-top: var(--sp-2); }

.story-image {
  height: 480px;
  border-radius: var(--radius-lg);
  background: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.2);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.0625rem;
  overflow: hidden;
  position: relative;
}

/* ---------------------------------------------
   Home — Instagram CTA
   --------------------------------------------- */
.section-instagram {
  background-color: var(--color-green);
  padding-block: var(--sp-20);
  text-align: center;
}

.section-instagram h2 {
  color: var(--color-white);
  margin-bottom: var(--sp-4);
}

.section-instagram .instagram-lead {
  color: rgba(255,255,255,0.75);
  margin-inline: auto;
  margin-bottom: var(--sp-8);
  max-width: 480px;
}

.instagram-handle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: rgba(255,255,255,0.9);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--sp-8);
}

/* ---------------------------------------------
   Product Cards  (shared: home + shop)
   --------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--sp-8);
}

.product-card {
  background-color: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease), transform var(--ease);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.product-card.coming-soon {
  pointer-events: none;
  background: linear-gradient(160deg, #1a1a1a 0%, #2a2a2a 100%);
  border: 1px solid #333;
}

.product-card.coming-soon .product-name,
.product-card.coming-soon .product-origin,
.product-card.coming-soon .product-variety,
.product-card.coming-soon .product-notes {
  color: rgba(255,255,255,0.55);
}

.product-card.coming-soon .product-name {
  color: rgba(255,255,255,0.9);
}

.product-image {
  /* Match the bag's 1398×2000 portrait ratio so the full image shows */
  aspect-ratio: 7 / 10;
  background-color: var(--color-white);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.125rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.01em;
}

/* Per-product gradient palettes (shown when no <img> is present) */
.product-img-1 { background: #CCCCCC; }
.product-img-2 { background: #C8C8C8; }
.product-img-3 { background: #C2C2C2; }
.product-img-4 { background: #BEBEBE; }
.product-img-5 { background: linear-gradient(135deg, #1A1A1A, #2E2E2E, #444444); }
.product-img-6 { background: linear-gradient(135deg, #222222, #333333, #4A4A4A); }

/* Real product photo — contain so the full bag is always visible */
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 12px;
  box-sizing: border-box;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.03);
}

.coming-soon-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.55) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: var(--sp-6);
}

.coming-soon-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  color: rgba(255,255,255,0.85);
}

.coming-soon-inner svg {
  opacity: 0.7;
}

.coming-soon-inner span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.badge-coming {
  background-color: #2a2a2a;
  color: rgba(255,255,255,0.6);
  border: 1px solid #444;
  font-size: 0.7rem;
}

.coming-soon-teaser {
  font-style: italic;
}

.coming-soon-pill {
  display: inline-block;
  padding: 6px var(--sp-4);
  border: 1px solid #444;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.05em;
}

.product-body {
  padding: var(--sp-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-badges {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}

.product-name {
  font-size: 1.0625rem;
  margin-bottom: var(--sp-1);
}

.product-origin {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-bottom: var(--sp-3);
  max-width: none;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
}

.product-variety {
  font-size: 0.8rem;
  color: var(--color-muted);
  max-width: none;
}

.product-process {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-light);
  padding: 0.125rem 0.5rem;
  border-radius: 100px;
  white-space: nowrap;
}

.product-sca {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid #CCCCCC;
  padding: 0.125rem 0.5rem;
  border-radius: 100px;
  white-space: nowrap;
  margin-left: auto;
}

.product-notes {
  font-size: 0.875rem;
  color: var(--color-muted);
  flex: 1;
  max-width: none;
  margin-bottom: var(--sp-5);
  line-height: 1.5;
}

/* Weight selector */
.weight-selector {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.weight-btn {
  flex: 1;
  padding: var(--sp-2) var(--sp-3);
  border: 1.5px solid var(--color-light);
  background: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: all var(--ease);
  text-align: center;
}

.weight-btn.active {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background-color: rgba(0,0,0,0.04);
  font-weight: 600;
}

.weight-btn:hover:not(.active) {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.product-price {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.btn-cart {
  background-color: var(--color-accent);
  color: var(--color-white);
  border: none;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
}

.btn-cart:hover {
  background-color: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ---------------------------------------------
   Page Header (inner pages)
   --------------------------------------------- */
.page-header {
  background: #111111;
  padding-block: var(--sp-20);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before { display: none; }

.page-header-content { position: relative; z-index: 1; }

.page-header h1 {
  color: var(--color-white);
  margin-bottom: var(--sp-4);
  font-style: italic;
}

.page-header p {
  color: rgba(255,255,255,0.55);
  margin-inline: auto;
  font-size: 1.0625rem;
}

/* ---------------------------------------------
   Shop page
   --------------------------------------------- */
.shop-section { padding-block: var(--sp-16); }

/* Shop filter toolbar */
.shop-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: var(--sp-8);
}

/* Filter dropdown */
.filter-dropdown {
  position: relative;
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 8px var(--sp-4);
  border: 1.5px solid var(--color-light);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.filter-toggle:hover {
  border-color: var(--color-accent);
}

.filter-dropdown.open .filter-toggle {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 12%, transparent);
}

.filter-chevron {
  transition: transform var(--ease);
  flex-shrink: 0;
  color: var(--color-muted);
}

.filter-dropdown.open .filter-chevron {
  transform: rotate(180deg);
}

.filter-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--color-white);
  border: 1px solid var(--color-light);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  padding: var(--sp-2) 0;
  z-index: 50;
  list-style: none;
}

.filter-dropdown.open .filter-menu {
  display: block;
}

.filter-group-label {
  padding: 3px var(--sp-4) 2px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-top: var(--sp-1);
}

.filter-group-label:first-child {
  margin-top: 0;
}

.filter-option {
  display: block;
  width: 100%;
  padding: 5px var(--sp-4);
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--ease), color var(--ease);
}

.filter-option:hover {
  background-color: var(--color-light);
  color: var(--color-accent);
}

.filter-option.active {
  color: var(--color-accent);
}

.product-card.hidden {
  display: none;
}

/* Language toggle button */
.lang-btn {
  background: none;
  border: 1.5px solid var(--color-light);
  border-radius: 4px;
  padding: 3px 8px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease);
}

.lang-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Cart toggle button */
.cart-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  position: relative;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 100px;
  background-color: var(--color-accent);
  color: var(--color-white);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

/* Cart overlay */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
}

.cart-overlay.open { display: block; }

/* Cart drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 100vw;
  background: var(--color-white);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -4px 0 32px rgba(0,0,0,0.12);
}

.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--color-light);
}

.cart-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
}

.cart-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  padding: var(--sp-1);
  border-radius: var(--radius-sm);
  transition: color var(--ease), background var(--ease);
}

.cart-close:hover {
  color: var(--color-text);
  background: var(--color-light);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4) var(--sp-6);
}

.cart-empty {
  color: var(--color-muted);
  font-size: 0.9rem;
  text-align: center;
  margin-top: var(--sp-8);
}

/* Individual cart item */
.cart-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--color-light);
}

.cart-item:last-child { border-bottom: none; }

.cart-item-info { flex: 1; }

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.cart-item-price {
  font-size: 0.825rem;
  color: var(--color-muted);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--color-light);
  background: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: border-color var(--ease), background var(--ease);
}

.qty-btn:hover {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-white);
}

.qty-value {
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 16px;
  text-align: center;
}

/* Cart footer */
.cart-footer {
  padding: var(--sp-5) var(--sp-6);
  border-top: 1px solid var(--color-light);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-4);
  font-size: 1rem;
}

.cart-total-row strong {
  font-size: 1.125rem;
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  width: 100%;
  padding: 0.875rem var(--sp-4);
  background-color: #25D366;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--ease), transform var(--ease);
}

.btn-whatsapp:hover {
  background-color: #1ebe5d;
  transform: translateY(-1px);
}

.cart-note {
  font-size: 0.775rem;
  color: var(--color-muted);
  text-align: center;
  margin-top: var(--sp-3);
  margin-bottom: 0;
}

/* ---------------------------------------------
   About page
   --------------------------------------------- */
.about-story { background-color: var(--color-white); }

.about-story-inner {
  max-width: 780px;
  margin-inline: auto;
}

.about-story-inner h2 { margin-bottom: var(--sp-8); }

.about-story-inner p {
  color: var(--color-muted);
  margin-bottom: var(--sp-6);
  max-width: none;
  font-size: 1.0625rem;
  line-height: 1.85;
}

/* How we roast */
.about-roast { background-color: var(--color-bg); }

.about-roast-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}

.about-roast-image {
  height: 440px;
  border-radius: var(--radius-lg);
  background: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.2);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.about-roast-text h2   { margin-bottom: var(--sp-6); }
.about-roast-text p    { color: var(--color-muted); margin-bottom: var(--sp-4); max-width: none; }

.roast-steps {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

.roast-step {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}

.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--color-accent);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.roast-step p {
  font-size: 0.9375rem;
  color: var(--color-muted);
  max-width: none;
  padding-top: 0.3125rem;
}

/* Values */
.about-values {
  background-color: var(--color-text);
  color: var(--color-light);
}

.about-values .section-header h2 { color: var(--color-white); }
.about-values .section-header p  { color: rgba(255,255,255,0.55); }

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}

.value-item {
  text-align: center;
  padding: var(--sp-10) var(--sp-8);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  transition: border-color var(--ease);
}

.value-item:hover { border-color: var(--color-accent); }

.value-icon {
  width: 52px;
  height: 52px;
  margin-inline: auto;
  margin-bottom: var(--sp-6);
  background-color: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.value-icon svg {
  width: 24px;
  height: 24px;
  stroke: rgba(255,255,255,0.85);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.value-item h3 {
  color: var(--color-light);
  margin-bottom: var(--sp-3);
}

.value-item p {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.55);
  max-width: none;
}

/* ---------------------------------------------
   Wholesale page
   --------------------------------------------- */
.wholesale-benefits { background-color: var(--color-white); }
.wholesale-form     { background-color: var(--color-bg); }

.wholesale-form-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--sp-16);
  align-items: flex-start;
}

.wholesale-info h2   { margin-bottom: var(--sp-6); }
.wholesale-info p    { color: var(--color-muted); margin-bottom: var(--sp-8); max-width: none; }

.min-order-box {
  background-color: var(--color-white);
  border: 1px solid var(--color-light);
  border-radius: var(--radius);
  padding: var(--sp-6) var(--sp-8);
}

.min-order-box h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: var(--sp-3);
  font-family: var(--font-sans);
}

.min-order-box p {
  font-size: 0.9375rem;
  max-width: none;
}

/* ---------------------------------------------
   Forms
   --------------------------------------------- */
.form-card {
  background-color: var(--color-white);
  border-radius: var(--radius);
  padding: var(--sp-10) var(--sp-12);
  box-shadow: var(--shadow);
}

.form-group { margin-bottom: var(--sp-6); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-text);
  margin-bottom: var(--sp-2);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-light);
  border-radius: var(--radius-sm);
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 0.9375rem;
  transition: border-color var(--ease), box-shadow var(--ease);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.6;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-muted);
  opacity: 0.6;
}

.btn-submit { width: 100%; padding: 0.875rem; font-size: 1rem; }

/* ---------------------------------------------
   Training page
   --------------------------------------------- */
.training-services { background-color: var(--color-white); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}

.service-card {
  border: 1px solid var(--color-light);
  border-radius: var(--radius);
  padding: var(--sp-10) var(--sp-8);
  display: flex;
  flex-direction: column;
  transition: all var(--ease);
}

.service-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.service-icon {
  width: 52px;
  height: 52px;
  background-color: rgba(0,0,0,0.05);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-6);
}

.service-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 { margin-bottom: var(--sp-4); }

.service-card p {
  font-size: 0.9375rem;
  color: var(--color-muted);
  flex: 1;
  max-width: none;
  margin-bottom: var(--sp-8);
}

.training-extra { background-color: var(--color-bg); }

.training-extra-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
}

.training-extra-box {
  background-color: var(--color-white);
  border-radius: var(--radius);
  padding: var(--sp-8) var(--sp-10);
  border: 1px solid var(--color-light);
}

.training-extra-box h3 { margin-bottom: var(--sp-4); }

.training-extra-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}

.training-extra-box ul li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: 0.9375rem;
  color: var(--color-muted);
}

.training-extra-box ul li::before {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--color-accent);
  margin-top: 0.55rem;
  flex-shrink: 0;
}

.training-cta {
  background-color: var(--color-text);
  text-align: center;
  padding-block: var(--sp-20);
}

.training-cta h2 { color: var(--color-white); margin-bottom: var(--sp-4); }
.training-cta p  { color: rgba(255,255,255,0.55); margin-inline: auto; margin-bottom: var(--sp-8); }

/* ---------------------------------------------
   Contact page
   --------------------------------------------- */
.contact-section { background-color: var(--color-bg); }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--sp-16);
  align-items: flex-start;
}

.contact-info h2 { margin-bottom: var(--sp-8); }

.contact-items {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  margin-bottom: var(--sp-8);
}

.contact-item {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(0,0,0,0.05);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-item-text h4 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  margin-bottom: var(--sp-1);
}

.contact-item-text p,
.contact-item-text a {
  font-size: 0.9375rem;
  color: var(--color-text);
  max-width: none;
  transition: color var(--ease);
}

.contact-item-text a:hover { color: var(--color-accent); }

.map-placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, var(--color-light), #D4C8BA);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--color-light);
  flex-direction: column;
  gap: var(--sp-2);
}

.map-placeholder svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-muted);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.6;
}

/* ---------------------------------------------
   Snipcart overrides
   --------------------------------------------- */
#snipcart {
  --color-default:  var(--color-text);
  --color-alt:      var(--color-muted);
  --color-accent:   var(--color-accent);
  --bgColor-default: var(--color-bg);
}

/* ---------------------------------------------
   Responsive — Tablet ≤ 1024px
   --------------------------------------------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
  }

  .story-inner,
  .about-roast-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }

  .story-image  { height: 340px; }
  .about-roast-image { height: 320px; order: -1; }

  .wholesale-form-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }

  .services-grid   { grid-template-columns: 1fr 1fr; }
  .feature-cards   { grid-template-columns: 1fr 1fr; }

  .training-extra-inner { grid-template-columns: 1fr; }
}

/* ---------------------------------------------
   Responsive — Mobile ≤ 768px
   --------------------------------------------- */
@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  section { padding-block: var(--sp-16); }

  .container { padding-inline: var(--sp-6); }

  /* Nav */
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    inset-inline: 0;
    bottom: 0;
    background-color: var(--color-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-8);
    z-index: 99;
  }

  .nav-links.open { display: flex; }

  .nav-links a { font-size: 1.25rem; }

  /* Hero */
  .hero { min-height: 88vh; }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .scroll-hint { display: none; }

  /* Featured header */
  .section-featured .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-4);
  }

  /* Grids */
  .feature-cards  { grid-template-columns: 1fr; }
  .values-grid    { grid-template-columns: 1fr; }
  .services-grid  { grid-template-columns: 1fr; }
  .product-grid   { grid-template-columns: 1fr; }

  /* Form */
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-card { padding: var(--sp-8); }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-8); }

  .footer-bottom {
    flex-direction: column;
    gap: var(--sp-3);
    text-align: center;
  }

  /* Page header */
  .page-header { padding-block: var(--sp-16); }
}
