/* Nest & Best retail shop styles.
   Brand tokens live here so a name or color swap is straightforward. */
:root {
  --cream: #fff9f1;
  --ivory: #fffcf7;
  --paper: #fffdf9;
  --sand: #e8d9c6;
  --sage: #7e9270;
  --sage-deep: #4a5a3c;
  --moss: #3a4a32;
  --clay: #c98980;
  --clay-deep: #8b5a54;
  --blush: #f0c0b8;
  --ink: #2a2723;
  --muted: #6a635b;
  --line: #e5dacb;
  --white: #fffdf9;
  --shadow: 0 12px 40px rgba(58, 74, 50, 0.09);
  --shadow-sm: 0 4px 16px rgba(58, 74, 50, 0.06);
  --radius: 1.15rem;
  --radius-sm: 0.75rem;
  --font-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "Nunito Sans", "Segoe UI", sans-serif;
  --header-h: 4.6rem;
  --max: 72rem;
  --gutter: 1.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.6;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sage-deep); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--clay-deep); }
h1, h2, h3, h4, .wordmark, .hero-title {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--moss);
}
p { margin: 0 0 1rem; }
button, input, select, textarea { font: inherit; }

.wrap {
  width: min(var(--max), 100% - (var(--gutter) * 2));
  margin-inline: auto;
}
.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus {
  left: 1rem; top: 1rem; z-index: 100;
  background: var(--paper); padding: 0.5rem 1rem; border-radius: 0.4rem;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--ivory) 86%, white);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: 0.7rem;
  text-decoration: none; color: var(--moss);
}
.brand-mark {
  width: 3rem; height: 3rem; flex: none;
  display: block; object-fit: contain;
}
@media (min-width: 860px) {
  .brand-mark { width: 3.35rem; height: 3.35rem; }
}
.wordmark {
  font-size: 1.28rem; font-style: italic; font-weight: 560;
  letter-spacing: -0.03em; line-height: 1;
  color: var(--sage-deep);
}
.wordmark span { font-style: italic; color: var(--clay-deep); font-weight: 450; }
.nav {
  display: flex; align-items: center; gap: 1.15rem;
}
.nav a {
  color: var(--ink); text-decoration: none; font-size: 0.92rem; font-weight: 650;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--sage-deep); }
.nav-toggle {
  display: none;
  background: none; border: 0; padding: 0.35rem;
  color: var(--moss); cursor: pointer;
}
.nav-toggle svg { width: 1.6rem; height: 1.6rem; display: block; }
.cart-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--moss); color: var(--paper) !important;
  text-decoration: none !important;
  padding: 0.4rem 0.8rem; border-radius: 999px;
  font-size: 0.85rem; font-weight: 700;
}
.cart-link:hover { background: var(--sage-deep); color: var(--paper) !important; }
.cart-count {
  background: #8b3f2a; color: white;
  min-width: 1.25rem; height: 1.25rem; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
}

.cart-link-bar { display: none; }
@media (max-width: 820px) {
  .cart-link-bar { display: inline-flex; }
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1.25rem 1.1rem;
    gap: 0.35rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.65rem 0.2rem; }
  .cart-link { align-self: flex-start; margin-top: 0.4rem; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: 0; cursor: pointer;
  border-radius: 999px; padding: 0.8rem 1.35rem;
  font-weight: 700; font-size: 0.95rem;
  text-decoration: none !important;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--moss); color: #fff !important; }
.btn-primary:hover { background: #2d3a27; }
.btn-dark { background: var(--moss); color: var(--paper) !important; }
.btn-dark:hover { background: var(--sage-deep); }
.btn-ghost {
  background: transparent; color: var(--moss) !important;
  box-shadow: inset 0 0 0 1.5px var(--sand);
}
.btn-ghost:hover { background: var(--cream); }
.btn[disabled], .btn.is-disabled {
  opacity: 0.55; cursor: not-allowed; transform: none;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1000px 420px at 80% -10%, color-mix(in srgb, var(--blush) 55%, white), transparent 60%),
    radial-gradient(800px 380px at 0% 100%, color-mix(in srgb, var(--sage) 22%, var(--cream)), transparent 55%),
    var(--cream);
  padding: 2.4rem 0 3.2rem;
}
.hero-grid {
  display: grid; gap: 2rem; align-items: center;
}
@media (min-width: 860px) {
  .hero { padding: 3.4rem 0 4rem; }
  .hero-grid { grid-template-columns: 1.15fr 0.95fr; gap: 3rem; }
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--sage-deep);
  margin-bottom: 0.8rem;
}
.hero-title {
  font-size: clamp(2.3rem, 6vw, 4.15rem);
  font-weight: 560;
  margin: 0 0 1rem;
}
.hero-title em { font-style: italic; font-weight: 450; color: var(--clay-deep); }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.5rem; }
.hero-art {
  position: relative; min-height: 16rem;
}
.hero-art picture, .hero-art img, .hero-art svg {
  width: 100%; height: auto; display: block;
}

/* Sections */
section { padding: 3.2rem 0; }
.section-head { max-width: 40rem; margin-bottom: 1.8rem; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); margin: 0 0 0.6rem; }
.band { background: var(--paper); }
.band-soft { background: var(--cream); }
.story-grid {
  display: grid; gap: 1rem;
}
@media (min-width: 720px) { .story-grid { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; } }
.story-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem 1.2rem;
  box-shadow: var(--shadow-sm);
}
.story-card h3 { margin: 0 0 0.45rem; font-size: 1.25rem; }
.story-card p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* Product grid */
.filters {
  display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.4rem;
}
.filter-btn {
  background: transparent; border: 1px solid var(--line);
  color: var(--ink); border-radius: 999px;
  padding: 0.35rem 0.8rem; cursor: pointer; font-size: 0.85rem; font-weight: 700;
}
.filter-btn[aria-pressed="true"], .filter-btn:hover {
  background: var(--moss); color: var(--paper); border-color: var(--moss);
}
.product-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem;
}
@media (min-width: 720px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; } }
@media (min-width: 1020px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
.product-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  text-decoration: none; color: inherit;
  height: 100%;
}
.product-card:hover { box-shadow: var(--shadow); }
.card-img {
  aspect-ratio: 1; background: var(--cream);
  display: grid; place-items: center; overflow: hidden;
}
.card-img picture, .pdp-image picture { display: block; width: 100%; height: 100%; }
.card-img img, .pdp-image img, .card-img picture img, .pdp-image picture img {
  width: 100%; height: 100%; object-fit: contain;
}
.card-body { padding: 0.85rem 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.card-brand { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.card-title { font-family: var(--font-serif); font-size: 1.05rem; margin: 0; color: var(--moss); line-height: 1.25; }
.card-price { font-weight: 800; margin-top: auto; padding-top: 0.45rem; }
.badge-row { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.badge {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.02em;
  border-radius: 999px; padding: 0.18rem 0.5rem;
  background: var(--cream); color: var(--sage-deep);
}
.badge-gots, .badge-certified { background: #e1ead8; color: #2f4a2a; }
.badge-organic { background: #e8f0df; color: #3d5336; }
.badge-natural { background: #f3e6d2; color: #6a4e2a; }
.badge-pul { background: #ece7f3; color: #4c3d66; }
.badge-note { background: #f6e6e0; color: #6d3b2c; }
.placeholder-img {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 1rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--blush) 35%, var(--cream)), var(--cream));
  color: var(--moss);
}
.placeholder-img strong { font-family: var(--font-serif); font-size: 1.15rem; display: block; margin-bottom: 0.35rem; }
.placeholder-img span { font-size: 0.78rem; color: var(--muted); max-width: 16rem; }

/* Product page */
.pdp {
  display: grid; gap: 1.6rem; padding: 2rem 0 3rem;
}
@media (min-width: 860px) { .pdp { grid-template-columns: 1.05fr 0.95fr; gap: 2.5rem; align-items: start; } }
.pdp-image {
  background: var(--cream); border-radius: var(--radius);
  border: 1px solid var(--line); overflow: hidden;
  min-height: 18rem;
  display: grid; place-items: center;
}
.pdp-image img { width: 100%; height: auto; object-fit: contain; }
.pdp h1 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin: 0.2rem 0 0.5rem; }
.pdp .price { font-size: 1.45rem; font-weight: 800; margin: 0.6rem 0 1rem; }
.qty-row { display: flex; gap: 0.6rem; align-items: center; margin: 1rem 0 1.2rem; flex-wrap: wrap; }
.qty-row input {
  width: 4.2rem; padding: 0.55rem 0.5rem; border-radius: 0.7rem;
  border: 1px solid var(--line); background: var(--paper); text-align: center;
}
.fine { font-size: 0.9rem; color: var(--muted); }
.detail-list { padding-left: 1.1rem; }
.detail-list li { margin-bottom: 0.35rem; }
.callout {
  background: var(--cream); border-radius: var(--radius-sm);
  padding: 0.85rem 1rem; margin: 1rem 0;
  border: 1px solid var(--line);
  font-size: 0.95rem;
}

/* Cart */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td {
  text-align: left; padding: 0.9rem 0.4rem;
  border-bottom: 1px solid var(--line); vertical-align: middle;
}
.cart-item { display: flex; gap: 0.8rem; align-items: center; }
.cart-item img, .cart-item .ph {
  width: 4.5rem; height: 4.5rem; object-fit: contain;
  background: var(--cream); border-radius: 0.6rem; flex: none;
}
.cart-empty { padding: 2.5rem 0; }
.totals {
  margin-top: 1.4rem; padding: 1.2rem 1.3rem;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); max-width: 26rem; margin-left: auto;
}
.totals-row { display: flex; justify-content: space-between; margin: 0.3rem 0; }
.coming-soon {
  background: var(--cream);
  border: 1px dashed var(--sage);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  margin-top: 1.5rem;
}
.coming-soon h2 { margin-top: 0; }

/* Pages */
.page { padding: 2.4rem 0 3.5rem; }
.page h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 1rem; }
.prose { max-width: 42rem; }
.prose h2 { font-size: 1.4rem; margin: 1.8rem 0 0.6rem; }
.address {
  font-style: normal;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin: 1rem 0 1.4rem;
}
.form {
  display: grid; gap: 0.8rem; max-width: 32rem; margin-top: 1rem;
}
.form label { font-size: 0.85rem; font-weight: 800; }
.form input, .form textarea, .form select {
  width: 100%; padding: 0.7rem 0.8rem;
  border: 1px solid var(--line); border-radius: 0.7rem;
  background: var(--paper);
}
.form textarea { min-height: 8rem; resize: vertical; }

/* Footer */
.site-footer {
  background: var(--moss); color: #e8eadf;
  padding: 2.4rem 0 1.4rem; margin-top: 2rem;
}
.site-footer a { color: #f3efe6; }
.footer-grid {
  display: grid; gap: 1.4rem;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer h2, .site-footer .wordmark { color: #f7f3ea; margin: 0 0 0.5rem; }
.footer-note { font-size: 0.88rem; opacity: 0.85; margin-top: 1.6rem; }
.footer-nav { display: grid; gap: 0.3rem; }
.footer-nav a { text-decoration: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0);
}

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

.breadcrumb { font-size: 0.88rem; margin: 0 0 1.1rem; color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.15rem 0.2rem; padding: 0; margin: 0; }
.breadcrumb li { display: inline; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin: 0 0.4rem; color: var(--sand); }
.breadcrumb a { color: var(--sage-deep); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--ink); }

.category-links { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1rem 0 0.4rem; }
.category-links a {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.35rem 0.8rem; font-size: 0.85rem; font-weight: 700;
  text-decoration: none; color: var(--ink); background: var(--paper);
}
.category-links a:hover, .category-links a[aria-current="page"] {
  background: var(--moss); color: var(--paper); border-color: var(--moss);
}

.related { margin-top: 3rem; padding-top: 0.5rem; }
.related h2 { margin-bottom: 1rem; }

.faq { max-width: 44rem; }
.faq-item { border-bottom: 1px solid var(--line); padding: 0.95rem 0; }
.faq-item summary {
  cursor: pointer; font-family: var(--font-serif);
  font-size: 1.15rem; color: var(--moss); font-weight: 560;
  list-style-position: outside;
}
.faq-item p { margin: 0.7rem 0 0.2rem; color: var(--muted); }

.site-footer .fine, .site-footer address { color: inherit; opacity: 0.95; }
