/* Butterdough Bakery — Minimal warm-neutral theme */
:root{
  --bg:#f8f1e7;          /* warm beige */
  --paper:#fbf7f2;       /* light paper */
  --ink:#201a17;         /* deep brown/black */
  --muted:#6b615a;
  --gold:#d8b46a;        /* butter gold */
  --line:#e7e0d8;
  --radius:16px;
  --shadow:0 8px 20px rgba(32,26,23,.08);
  --maxw:1100px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;line-height:1.5}
img{max-width:100%;display:block}

.container{max-width:var(--maxw);margin-inline:auto;padding:24px}

.site-header{position:sticky;top:0;background:var(--paper);border-bottom:1px solid var(--line);z-index:20}
.header-inner{display:flex;align-items:center;justify-content:flex-start;gap:16px;width:100%}
.brand-logo{height:56px;width:auto}
.header-tagline{font-size:14px;color:var(--muted);margin-left:18px;letter-spacing:.3px;flex:1;min-width:0;white-space:nowrap;text-align:left}
.nav{position:fixed;top:0;left:0;height:100vh;width:260px;background:var(--paper);box-shadow:12px 0 30px rgba(32,26,23,.18);padding:96px 24px 40px;display:flex;flex-direction:column;align-items:flex-start;gap:18px;transform:translateX(-110%);transition:transform .3s ease;z-index:40}
.nav.is-open{transform:translateX(0)}
.nav a{text-decoration:none;color:var(--ink);font-weight:600;font-size:18px}
.nav a:hover{opacity:.7}
.nav-inline{display:none}
.nav-inline a{text-decoration:none;color:var(--ink);font-weight:600;margin-left:18px}
.nav-inline a:first-child{margin-left:0}
.nav-inline a:hover{opacity:.7}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.nav-toggle{display:inline-flex;flex-direction:column;background:none;border:0;padding:10px;margin-right:12px;cursor:pointer;align-items:center;justify-content:center;gap:5px}
.nav-toggle:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.nav-toggle-bar{width:24px;height:2px;background:var(--ink);transition:transform .2s ease,opacity .2s ease}
.nav-toggle.is-active .nav-toggle-bar:nth-of-type(1){transform:translateY(6px) rotate(45deg)}
.nav-toggle.is-active .nav-toggle-bar:nth-of-type(2){opacity:0}
.nav-toggle.is-active .nav-toggle-bar:nth-of-type(3){transform:translateY(-6px) rotate(-45deg)}
.nav-overlay{display:none}
body.nav-open{overflow:hidden}
body.nav-open .nav-overlay{display:block;position:fixed;inset:0;background:rgba(32,26,23,.45);z-index:30}

@media (max-width:719px){
  .header-tagline{font-size:12px;margin-left:12px;max-width:200px;white-space:normal;line-height:1.3}
}
@media (min-width:720px){
  .nav{width:280px;padding:110px 28px 46px}
  .nav-inline{display:flex;align-items:center;margin-left:auto}
}
@media (min-width:1080px){
  .nav{width:320px;padding:130px 36px 56px}
  .nav-inline a{margin-left:22px}
}

.hero{background:var(--paper);border-bottom:1px solid var(--line)}
.hero-inner{padding:56px 24px;text-align:center}
.hero-logo{width:280px;margin:0 auto 12px auto}
h1{font-family:Georgia, 'Times New Roman', Times, serif;font-size:clamp(28px,4vw,44px);line-height:1.1;margin:8px 0 12px 0}
h2{font-family:Georgia, 'Times New Roman', Times, serif;font-size:clamp(22px,3vw,32px);margin:20px 0 8px}
h3{font-size:clamp(18px,2.2vw,22px);margin:12px 0 6px}

.lead{font-size:clamp(16px,2vw,19px);color:var(--muted)}

.btn{display:inline-block;padding:12px 18px;border-radius:999px;background:var(--ink);color:white;text-decoration:none;border:2px solid var(--ink);box-shadow:var(--shadow);font-weight:700}
.btn:hover{transform:translateY(-1px)}
.btn.outline{background:transparent;color:var(--ink)}

.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px;margin:32px auto}
.card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}
.card picture{display:block}
.card-body{padding:14px}
.product-hero{width:100%;margin:0 auto}
@media (min-width:720px){.product-hero{max-width:50%}}

.story{margin:24px auto 60px auto}

.page h1{margin-top:16px}
.product-list{display:grid;grid-template-columns:1fr;gap:18px;margin:20px 0}
.product{display:grid;grid-template-columns:140px 1fr;gap:16px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:14px;box-shadow:var(--shadow)}
.product img{border-radius:12px;height:100%;object-fit:cover}
.product .allergens{color:var(--muted);font-size:14px}

.note{background:var(--paper);border:1px dashed var(--gold);padding:14px;border-radius:var(--radius)}

.info-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin:12px 0 20px}
.info-card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:14px;box-shadow:var(--shadow)}

.preorder-form fieldset{border:1px solid var(--line);border-radius:var(--radius);padding:14px;margin-bottom:14px;background:var(--paper)}
.preorder-form label{display:flex;flex-direction:column;margin-bottom:10px;font-weight:600}
.preorder-form input,.preorder-form select,.preorder-form textarea{margin-top:6px;padding:10px;border:1px solid var(--line);border-radius:10px;background:white}

.grid-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}

.contact-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.contact-card{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow)}
.contact-card:hover{border-color:var(--gold)}
.contact-icon{font-size:18px;line-height:1;display:block;flex-shrink:0}
.contact-icon-img{width:20px;height:20px;display:block;flex-shrink:0}

.site-footer{margin-top:44px;border-top:1px solid var(--line);background:var(--paper)}
.footer-inner{text-align:center}
.small{font-size:13px}
.muted{color:var(--muted)}

/* Anchor offset for sticky header */
.product[id] { scroll-margin-top: 96px; }

/* Make entire home cards clickable without link underline */
a.card.card-link { display:block; text-decoration:none; color:inherit; }
a.card.card-link:hover { border-color: var(--gold); transform: translateY(-2px); transition: transform .15s ease; }

/* Clickable highlight (nice UX touch): add a subtle highlight when users land on an anchor:*/
.product:target { outline: 2px solid var(--gold); box-shadow: 0 0 0 6px rgba(216,180,106,.15); }

/* Product list title links */
.title-link { text-decoration: none; color: inherit; border-bottom: 2px solid transparent; }
.title-link:hover { border-bottom-color: var(--gold); }

/* Make the whole product rows clickable like home cards */
a.product.card-link { text-decoration: none; color: inherit; }
a.product.card-link:hover { border-color: var(--gold); transform: translateY(-2px); transition: transform .15s ease; }

.hero-logo {
  max-width: 200px;
  margin: 0 auto 16px auto;
  display: block;
}

/* Hero */
.hero { text-align: center; padding: 40px 0 16px; }
.hero-logo { max-width: 200px; display: block; margin: 0 auto 16px; }
.hero .lead { font-size: clamp(16px, 2.6vw, 18px); margin: 8px auto 12px; max-width: 48ch; color: var(--muted); }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }

/* Featured product (editorial card) */
.featured { padding: 24px 0 12px; }
.featured-card { display: grid; gap: 0; grid-template-columns: 1fr; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-soft); }
.featured-card picture { display: block; }
.featured-card img { width: 100%; height: auto; display: block; }
.featured-body { padding: 18px; }
.featured-body h2 { margin: 0 0 6px; }
.featured-body p { color: var(--muted); margin: 0 0 12px; }
.featured-cta { display: flex; gap: 10px; flex-wrap: wrap; }

@media (min-width: 900px) {
  .featured-card { grid-template-columns: 1.2fr 1fr; align-items: stretch; }
  .featured-card img { height: 100%; object-fit: cover; }
  .featured-body { padding: 24px; }
}

/* Story teaser */
.story { padding: 18px 0 36px; }
.story-inner { border: 1px dashed var(--border); border-radius: 20px; padding: 18px; background: var(--paper, #fffef9); }
.story h2 { margin-top: 0; }
.story p { color: var(--muted); max-width: 62ch; }
.story-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* Ensure home card grid is solid on mobile (if not already set) */
.cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(4, 1fr); gap: 24px; } }

/* Match hover lift on any clickable card-like anchors */
a.card.card-link, a.product.card-link { display: block; text-decoration: none; color: inherit; }
a.card.card-link:hover, a.product.card-link:hover { border-color: var(--gold); transform: translateY(-2px); transition: transform .15s ease; }

/* General image safety */
img { max-width: 100%; height: auto; display: block; }

/* Products page: compact, multi-column cards */
.product-list { 
  grid-template-columns: 1fr; 
  gap: 14px; 
  margin: 16px 0; 
}

@media (min-width: 700px) {
  .product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .product-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Tighter product row layout */
a.product.card-link { 
  /* it's already a link; make it a grid so children align nicely */
  display: grid; 
}

.product {
  grid-template-columns: 110px 1fr; /* was 140px */
  gap: 12px;                        /* was 16px */
  padding: 12px;                    /* was 14px */
  border-radius: 12px;              /* was var(--radius)=16px */
  box-shadow: 0 4px 12px rgba(32,26,23,.06);  /* lighter shadow */
}

.product picture{
  display:block;
}

.product img { 
  height: 110px;                    /* was 100% of row height; this stabilizes card height */
  object-fit: cover; 
  border-radius: 10px; 
}

.product h2 { 
  font-size: clamp(18px, 2.2vw, 20px); 
  margin: 4px 0 6px; 
}

.product p { 
  margin: 0 0 8px; 
}

/* Optional: keep product cards from stretching too wide */
.product-list > a.product.card-link { max-width: 560px; }
.product-list { justify-items: center; } /* center the fixed-width cards in the grid */
