:root {
  --ink: #15222b;
  --muted: #5b6b75;
  --paper: #f3efe6;
  --sand: #e7dfd0;
  --sea: #0f6e7c;
  --sea-deep: #0a4f59;
  --accent: #c45c26;
  --line: rgba(21, 34, 43, 0.12);
  --shadow: 0 24px 60px rgba(15, 40, 48, 0.18);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(15, 110, 124, 0.18), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(196, 92, 38, 0.12), transparent 55%),
    linear-gradient(180deg, #f7f3ea 0%, #ebe4d6 45%, #e4ecec 100%);
  min-height: 100vh;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.site-header, main, .site-footer { position: relative; z-index: 1; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
  display: grid;
  place-items: center;
  background: var(--sea);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.nav a:hover { color: var(--ink); }
.cart-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  cursor: pointer;
}
.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: end;
  min-height: min(88vh, 760px);
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 1rem;
  color: var(--sea-deep);
  animation: rise 0.8s ease both;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.85rem;
  max-width: 18ch;
  animation: rise 0.8s ease 0.08s both;
}
.hero-lead {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36ch;
  animation: rise 0.8s ease 0.14s both;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  animation: rise 0.8s ease 0.2s both;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.25rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn.primary { background: var(--sea); color: #fff; }
.btn.primary:hover { background: var(--sea-deep); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.hero-visual { position: relative; }
.hero-frame {
  position: relative;
  border-radius: 1.4rem 1.4rem 2.4rem 1.4rem;
  overflow: hidden;
  background: var(--sand);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  transform: translateY(12px);
  animation: float-in 1s ease both;
}
.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 1.2s ease;
}
.hero-frame:hover img { transform: scale(1.06); }
.hero-glow {
  position: absolute;
  inset: auto -10% -20% 20%;
  height: 45%;
  background: radial-gradient(circle, rgba(15,110,124,0.35), transparent 70%);
  filter: blur(18px);
}

.section-head {
  max-width: 1200px;
  margin: 0 auto 1.25rem;
  padding: 0 1.25rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}
.section-head p { margin: 0; color: var(--muted); }

.catalog { padding: 2rem 0 3rem; }
.toolbar {
  max-width: 1200px;
  margin: 0 auto 1.25rem;
  padding: 0 1.25rem;
  display: grid;
  gap: 0.85rem;
}
.toolbar input[type="search"] {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.7);
  border-radius: 0.85rem;
  padding: 0.75rem 1rem;
  font: inherit;
}
.mode-tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.mode-tabs button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.45);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font: inherit;
  cursor: pointer;
}
.mode-tabs button.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}
.product {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0;
  background: transparent;
  border: none;
  text-align: left;
  animation: rise 0.5s ease both;
}
.product-media {
  aspect-ratio: 3 / 4;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--sand);
  box-shadow: 0 10px 28px rgba(21,34,43,0.08);
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.product:hover .product-media img { transform: scale(1.04); }
.product-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0;
}
.product-meta { color: var(--muted); font-size: 0.9rem; margin: 0; }
.product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.price { font-weight: 700; }
.add-btn {
  border: none;
  background: var(--sea);
  color: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.add-btn:hover { background: var(--sea-deep); }
.empty { text-align: center; color: var(--muted); padding: 2rem; }

.delivery { padding: 1rem 0 4rem; }
.delivery-points {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.delivery-points article {
  padding: 1.1rem 1.15rem;
  border-top: 2px solid var(--sea);
}
.delivery-points h3 {
  font-family: var(--font-display);
  margin: 0 0 0.4rem;
}
.delivery-points p { margin: 0; color: var(--muted); }

.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.muted { color: var(--muted); }

.drawer[hidden] { display: none; }
.drawer { position: fixed; inset: 0; z-index: 40; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 24, 30, 0.45);
  animation: fade 0.25s ease;
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: #f8f4ec;
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem 1.5rem;
  overflow: auto;
  animation: slide 0.28s ease;
}
.drawer-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-panel h2 {
  font-family: var(--font-display);
  margin: 0;
}
.icon-btn {
  border: none;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.cart-list { display: grid; gap: 0.75rem; margin: 1rem 0; }
.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.7rem;
  align-items: center;
}
.cart-item img {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: 0.5rem;
  background: var(--sand);
}
.qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.qty button {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.cart-summary {
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
  margin-bottom: 1rem;
}
.cart-summary .row {
  display: flex;
  justify-content: space-between;
  margin: 0.25rem 0;
}
.cart-summary .total { font-size: 1.1rem; margin-top: 0.4rem; }

.checkout { display: grid; gap: 0.7rem; }
.checkout label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.92rem;
  font-weight: 600;
}
.checkout input, .checkout textarea {
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-weight: 400;
  background: #fff;
}
.carriers {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
}
.carriers legend { font-weight: 600; margin-bottom: 0.35rem; }
.radio { font-weight: 500; display: inline-flex; gap: 0.35rem; align-items: center; }
.form-note { color: var(--muted); font-size: 0.85rem; margin: 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  z-index: 50;
  animation: rise 0.3s ease;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float-in {
  from { opacity: 0; transform: translateY(28px) scale(0.98); }
  to { opacity: 1; transform: translateY(12px) scale(1); }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide {
  from { transform: translateX(24px); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 0.5rem;
  }
  .hero-visual { order: -1; }
  .hero-frame { max-width: 420px; margin: 0 auto; }
  .delivery-points { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
  .nav a:not(.cart-btn) { display: none; }
}
