:root {
  --bg: #f4efe6;
  --surface: #fffaf3;
  --surface-2: #f0e7d9;
  --ink: #181613;
  --muted: #5a554d;
  --accent: #bb4e2e;
  --accent-2: #1f5b53;
  --border: #d9cfbe;
  --radius: 18px;
  --shadow: 0 14px 40px rgba(24, 22, 19, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f7f2ea 0%, var(--bg) 100%);
  min-height: 100vh;
}

h1,
h2,
h3,
.brand {
  font-family: "Syne", sans-serif;
  letter-spacing: 0.015em;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(36px);
  opacity: 0.45;
}

.blob-a {
  width: 360px;
  height: 360px;
  background: #f0bf98;
  top: -120px;
  right: 10%;
}

.blob-b {
  width: 420px;
  height: 420px;
  background: #94b5ad;
  bottom: -160px;
  left: -80px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 4vw;
  backdrop-filter: blur(10px);
  background: rgba(244, 239, 230, 0.85);
  border-bottom: 1px solid rgba(217, 207, 190, 0.8);
}

.brand {
  text-decoration: none;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.cart-button {
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  padding: 0.5rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

#cart-count {
  min-width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 0.76rem;
}

main {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.hero {
  padding: 5rem 0 3rem;
  max-width: 760px;
  animation: reveal 500ms ease-out;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.75rem;
  color: var(--accent-2);
  margin: 0 0 0.6rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  margin: 0;
  line-height: 1.05;
}

.hero-copy {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 62ch;
  font-size: 1.04rem;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  border-radius: 999px;
  padding: 0.72rem 1.2rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 150ms ease, background 150ms ease, color 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-solid {
  background: var(--ink);
  color: #fff;
}

.btn-solid:hover {
  background: #000;
}

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

.section {
  margin-top: 3.2rem;
}

.section-head h2 {
  font-size: 1.9rem;
  margin: 0;
}

.section-head p {
  margin: 0.4rem 0 1rem;
  color: var(--muted);
}

.filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1.2rem 0 1.6rem;
}

.filter-pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
  font-weight: 600;
}

.filter-pill.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 390px;
  animation: rise 300ms ease;
}

.product-visual {
  height: 170px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0.8rem;
}

.product-visual span {
  background: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 0.22rem 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  font-weight: 700;
}

.product-content {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.product-title-row {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: baseline;
}

.product-title-row h3 {
  margin: 0;
  font-size: 1.02rem;
}

.price {
  font-weight: 700;
  color: var(--accent-2);
}

.product-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.product-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.product-actions select,
.product-actions button {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  font-family: inherit;
}

.product-actions select {
  flex: 1;
  background: #fff;
}

.product-actions button {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.section-story {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

.section-story p {
  color: var(--muted);
  max-width: 58ch;
}

.story-card {
  background: linear-gradient(160deg, #f8d8b9 0%, #f4c7a0 40%, #efb78d 100%);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid #e4b893;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.7rem;
  align-content: center;
}

.story-card p {
  margin: 0;
  color: #2a241b;
  font-weight: 600;
}

.section-checkout {
  margin-bottom: 3.4rem;
}

.checkout-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.checkout-form label {
  display: grid;
  gap: 0.42rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.checkout-form input,
.checkout-form textarea {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.62rem;
  font: inherit;
  background: var(--surface);
}

.full-width {
  grid-column: 1 / -1;
}

.checkout-feedback {
  min-height: 1.2rem;
  font-weight: 600;
  margin: 0.9rem 0 0;
}

.checkout-feedback.success {
  color: var(--accent-2);
}

.checkout-feedback.error {
  color: var(--accent);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(420px, 92vw);
  background: #fffaf6;
  border-left: 1px solid var(--border);
  box-shadow: -10px 0 40px rgba(24, 22, 19, 0.2);
  transform: translateX(105%);
  transition: transform 230ms ease;
  z-index: 30;
  display: flex;
  flex-direction: column;
}

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

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.cart-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.cart-head button {
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.cart-items {
  list-style: none;
  margin: 0;
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
  overflow: auto;
  flex: 1;
}

.cart-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  display: grid;
  gap: 0.5rem;
  background: var(--surface);
}

.cart-item-top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
}

.cart-item-top strong {
  font-size: 0.92rem;
}

.cart-item-top small {
  color: var(--muted);
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.qty-controls button {
  border: 1px solid var(--border);
  background: #fff;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
}

.qty-controls span {
  min-width: 1.2rem;
  text-align: center;
  font-weight: 600;
}

.cart-summary {
  border-top: 1px solid var(--border);
  padding: 1rem;
  display: grid;
  gap: 0.5rem;
  background: #fff5e8;
}

.cart-summary div {
  display: flex;
  justify-content: space-between;
}

.total-row {
  font-size: 1.08rem;
  margin-top: 0.2rem;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  z-index: 25;
}

.footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 940px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-story {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .topbar {
    padding: 0.85rem 4vw;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .checkout-form {
    grid-template-columns: 1fr;
  }
}
