/* Cravely 2.0 — Andean direction */
:root {
  --terracotta: #904C37;
  --brick: #6D2F27;
  --sand: #DBC3A0;
  --cream: #F1E7D6;
  --paper: #FDF8EF;
  --ochre: #C28F49;
  --ink: #3B2A22;
  --ink-soft: #6B5847;
  --ink-faint: #8A7259;
  --hairline: #E9DCC5;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Karla', 'Trebuchet MS', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--terracotta); }
a:hover { color: var(--brick); }
img { max-width: 100%; }

.serif { font-family: 'Young Serif', 'Georgia', serif; font-weight: 400; }
.eyebrow { font-size: 12px; letter-spacing: 2.5px; font-weight: 700; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--sand);
  background: var(--cream);
}
.site-header .wrap {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 18px; padding-bottom: 14px;
}
.site-header img { height: 34px; width: auto; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--terracotta);
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 15px 32px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--brick); color: var(--paper); }
.btn.small { font-size: 14px; padding: 11px 22px; }
.btn.dark { background: var(--brick); }
.btn.dark:hover { background: var(--terracotta); }

/* Hero */
.hero { background: var(--terracotta); color: var(--cream); }
.hero .wrap {
  display: flex; flex-direction: column; gap: 16px;
  padding-top: 52px; padding-bottom: 48px;
}
.hero .eyebrow { color: var(--sand); }
.hero h1 { margin: 0; font-size: 38px; line-height: 1.12; color: var(--paper); }
.hero p { margin: 0; font-size: 17px; line-height: 1.6; max-width: 620px; }

/* Band strip divider */
.band {
  height: 30px;
  background-color: var(--sand);
  background-image: url('/assets/band-strip.png');
  background-size: auto 30px;
  background-repeat: repeat-x;
  background-position: center;
}

/* Badges */
.badges { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.badge img { height: 48px; width: auto; }
.badge span { font-size: 10px; letter-spacing: 1.5px; font-weight: 700; color: var(--ink-soft); }

/* Cards */
.card {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: 6px;
  padding: 24px 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.card h3 { margin: 0; font-size: 19px; color: var(--brick); display: flex; align-items: center; gap: 10px; }
.card h3 img { height: 22px; width: auto; }
.card .meta { font-size: 12px; letter-spacing: 1px; font-weight: 700; color: var(--ochre); }
.card .label { font-size: 11px; letter-spacing: 2px; font-weight: 700; color: var(--terracotta); }
.card p { margin: 0; font-size: 14px; line-height: 1.6; }
.card .photo {
  height: 200px;
  border-radius: 4px;
  background: var(--cream) center / cover no-repeat;
  border: 2px dashed var(--ochre);
  display: flex; align-items: center; justify-content: center;
  color: var(--ochre); font-size: 11px; letter-spacing: 2px; font-weight: 700;
}
.card .photo.has-img { border: none; }

/* Sections */
.section { padding: 48px 0; }
.section-head h2 { margin: 0 0 8px 0; font-size: 30px; color: var(--brick); }
.section-head p { margin: 0; font-size: 16px; color: var(--ink-soft); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

/* Why yacon */
.why { background: var(--brick); color: var(--cream); }
.why .wrap { display: flex; flex-direction: column; gap: 12px; padding-top: 44px; padding-bottom: 44px; }
.why .eyebrow { color: var(--sand); }
.why h2 { margin: 0; font-size: 28px; color: var(--paper); }
.why p { margin: 0; font-size: 15px; line-height: 1.6; max-width: 640px; }
.why .mark { height: 26px; width: auto; align-self: flex-start; }

/* CTA */
.cta { background: var(--cream); text-align: center; }
.cta .wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 44px; padding-bottom: 44px; }
.cta h2 { margin: 0; font-size: 26px; color: var(--brick); }
.cta p { margin: 0; font-size: 15px; color: var(--ink-soft); max-width: 480px; }

/* Email opt in */
.optin { background: var(--sand); }
.optin .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  padding-top: 40px; padding-bottom: 40px; flex-wrap: wrap;
}
.optin .blurb h2 { margin: 0 0 6px 0; font-size: 24px; color: var(--brick); }
.optin .blurb p { margin: 0; font-size: 15px; color: #4A3428; }
.optin form { display: flex; gap: 12px; flex: 1; min-width: 280px; max-width: 520px; }
.optin input[type="email"] {
  flex: 1;
  border: 1px solid var(--ochre);
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  background: var(--paper);
  color: var(--ink);
}

/* Footer */
.site-footer { background: var(--ink); color: #B8A58F; }
.site-footer .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 26px; padding-bottom: 26px; flex-wrap: wrap;
}
.site-footer img { height: 22px; width: auto; opacity: 0.9; }
.site-footer p { margin: 0; font-size: 12px; }

/* Responsive */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 32px; }
  .optin .wrap { flex-direction: column; align-items: stretch; }
  .optin form { flex-direction: column; max-width: none; }
  .site-footer .wrap { justify-content: center; text-align: center; }
}

/* ============ Product one pager ============ */
.product { padding: 56px 0; }
.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: start;
}

/* Gallery */
.gallery { display: flex; flex-direction: column; gap: 14px; }
.gallery .main {
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.gallery .main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.thumbs button {
  padding: 0; border: 1px solid var(--sand); border-radius: 4px;
  background: var(--paper); overflow: hidden; cursor: pointer; aspect-ratio: 1 / 1;
}
.thumbs button[aria-current="true"] { border-color: var(--terracotta); border-width: 2px; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Buy panel */
.buy { display: flex; flex-direction: column; gap: 18px; }
.buy h1 { margin: 0; font-size: 36px; line-height: 1.15; color: var(--brick); }
.buy .sub { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink-soft); }
.price-row { display: flex; align-items: baseline; gap: 12px; }
.price { font-size: 30px; font-weight: 700; color: var(--ink); }
.price-note { font-size: 14px; color: var(--ink-faint); }
.buy ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.buy ul li { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; line-height: 1.5; }
.buy ul li svg { flex: none; margin-top: 2px; }
.buy .btn { text-align: center; font-size: 16px; padding: 17px 32px; }
.ship-note { font-size: 13px; color: var(--ink-faint); text-align: center; }

/* Discount teaser */
.teaser {
  background: var(--sand);
  border-radius: 6px;
  padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.teaser p { margin: 0; font-size: 14px; line-height: 1.5; color: #4A3428; }
.teaser strong { color: var(--brick); }
.teaser button {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700;
  color: var(--terracotta); text-decoration: underline; white-space: nowrap;
}

/* Image strip */
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.strip figure { margin: 0; }
.strip img {
  width: 100%; display: block; border-radius: 6px;
  border: 1px solid var(--sand); background: var(--paper);
}

/* ============ Discount modal ============ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(59, 42, 34, 0.62);
  display: none; align-items: center; justify-content: center; padding: 24px; z-index: 90;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--paper); border-radius: 8px; max-width: 460px; width: 100%;
  padding: 36px 34px; position: relative; text-align: center;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 24px 60px rgba(59, 42, 34, 0.28);
}
.modal .close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; cursor: pointer;
  font-size: 24px; line-height: 1; color: var(--ink-faint); padding: 4px 8px;
}
.modal img.mark { height: 30px; width: auto; margin: 0 auto; }
.modal h2 { margin: 0; font-size: 27px; line-height: 1.2; color: var(--brick); }
.modal p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.modal form { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.modal input[type="email"] {
  border: 1px solid var(--ochre); border-radius: 4px; padding: 14px 16px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--ink); text-align: center;
}
.modal .fine { font-size: 12px; color: var(--ink-faint); }
.modal .decline {
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 13px; color: var(--ink-faint); text-decoration: underline;
}

@media (max-width: 860px) {
  .product-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .buy h1 { font-size: 30px; }
  .strip { grid-template-columns: minmax(0, 1fr); }
  /* One swipeable row instead of two stacked rows, so the headline
     and the buy button stay closer to the top of the screen. */
  .thumbs {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .thumbs::-webkit-scrollbar { display: none; }
  .thumbs button { flex: 0 0 72px; }
}
