/* Celina's Baby Octos — warm, editorial, mobile-first */

:root {
  --bg: #f6f1ea;
  --paper: #fffdf9;
  --ink: #1c1c1c;
  --muted: #5c534c;
  --line: #e4ddd4;
  --line-strong: #cfc6bb;
  --accent: #1c1c1c;
  --accent-soft: #2a2622;
  --sold: #8a4a42;
  --ok: #2f5d46;
  --focus: #1c1c1c;
  --shadow: 0 16px 40px rgba(28, 28, 28, 0.08);
  --font-display: "Gilda Display", "Palatino Linotype", Palatino, serif;
  --font-body: "PT Serif", "Georgia", serif;
  --max: 1180px;
  --pad: clamp(1.1rem, 4vw, 2.4rem);
  --header-h: 4.5rem;
  --radius: 8px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.4rem, 3vw, 2rem); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 0.6rem; top: 0.6rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 241, 234, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem var(--pad);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  min-width: 0;
}
.brand img {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.nav-toggle,
.icon-btn {
  background: none;
  border: 0;
  padding: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
}
.nav-toggle { justify-self: end; }
.icon-btn { position: relative; }
.icon-btn svg, .nav-toggle svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.cart-count {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.65rem;
  line-height: 1.15rem;
  text-align: center;
  font-family: var(--font-body);
}
.cart-count:empty, .cart-count[data-count="0"] { display: none; }

.site-nav {
  display: none;
}
.site-nav a {
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}
.site-nav a[aria-current="page"],
.site-nav a:hover { border-bottom-color: var(--ink); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  justify-self: end;
}

@media (min-width: 800px) {
  .nav-toggle { display: none; }
  .header-inner { grid-template-columns: 1fr auto 1fr; }
  .site-nav {
    display: flex;
    gap: 1.6rem;
    justify-content: center;
  }
  .header-actions { justify-self: end; }
  .brand { justify-self: start; }
}

/* Mobile nav */
.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 0.6rem var(--pad) 1rem;
  background: var(--bg);
}
.mobile-nav.open { display: flex; flex-direction: column; gap: 0.3rem; }
.mobile-nav a {
  text-decoration: none;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.15rem;
  font-family: var(--font-display);
}
@media (min-width: 800px) {
  .mobile-nav, .mobile-nav.open { display: none !important; }
}

/* Layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.section { padding: 3.2rem 0; }
.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.7rem;
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 0.95em 1.7em;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.btn:hover { background: var(--accent-soft); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--line);
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}
.btn-block { width: 100%; }

/* Hero */
.hero {
  display: grid;
  gap: 0;
}
.hero-photo {
  min-height: 58vw;
  max-height: 70vh;
  overflow: hidden;
  background: #ece6de;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 58vw;
  max-height: 70vh;
}
.hero-copy {
  padding: 2.2rem var(--pad) 2.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-copy h1 { margin-bottom: 0.7rem; }
.hero-copy .btn { margin-top: 1.2rem; align-self: flex-start; }

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    min-height: 78vh;
    align-items: stretch;
  }
  .hero-photo, .hero-photo img {
    min-height: 78vh;
    max-height: none;
    height: 100%;
  }
  .hero-copy { padding: 4rem 4.5rem 4rem 3rem; }
}

/* Collection cards */
.card-grid {
  display: grid;
  gap: 1.4rem;
}
@media (min-width: 720px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
.collection-card,
.product-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.collection-card .media,
.product-card .media {
  background: #ece6de;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  position: relative;
}
.collection-card .media { aspect-ratio: 16 / 10; }
.media picture,
.hero-photo picture,
.gallery-main picture,
.photo-stack picture,
.thumbs picture {
  display: block;
  width: 100%;
  height: 100%;
}
.collection-card img,
.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.collection-card:hover img,
.product-card:hover img { transform: scale(1.03); }
.card-body { padding: 1rem 0 0.2rem; }
.card-body h3, .card-body h4 {
  font-size: 1.45rem;
  margin-bottom: 0.35rem;
}
.card-body p { color: var(--muted); font-size: 0.98rem; }
.price { font-size: 1rem; }
.badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  background: var(--paper);
  color: var(--sold);
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  border-radius: 4px;
}

/* Shop filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.4rem 0 2rem;
}
.filter-pill {
  text-decoration: none;
  border: 1px solid var(--line-strong);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.92rem;
  background: transparent;
}
.filter-pill[aria-current="page"],
.filter-pill.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Product page */
.product {
  display: grid;
  gap: 1.6rem;
  padding-top: 1.4rem;
}
@media (min-width: 880px) {
  .product { grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: start; }
  .product-info { position: sticky; top: calc(var(--header-h) + 1.2rem); }
}
.gallery-main {
  background: #ece6de;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.45rem;
  margin-top: 0.45rem;
}
.thumbs button {
  padding: 0;
  border: 2px solid transparent;
  background: #ece6de;
  cursor: pointer;
  aspect-ratio: 1;
  overflow: hidden;
}
.thumbs button[aria-selected="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-price { font-size: 1.2rem; margin: 0.4rem 0 1rem; }
.product-actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin: 1.2rem 0 1.4rem;
}
.qty {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
}
.qty button {
  width: 2.4rem;
  height: 2.8rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.qty input {
  width: 2.6rem;
  border: 0;
  text-align: center;
  background: transparent;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { appearance: none; }
.status-line { min-height: 1.4em; font-size: 0.95rem; color: var(--muted); }
.status-line.error { color: var(--sold); }
.status-line.ok { color: var(--ok); }

.accordion details {
  border-top: 1px solid var(--line);
}
.accordion details:last-child { border-bottom: 1px solid var(--line); }
.accordion summary {
  cursor: pointer;
  padding: 0.95rem 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-weight: 400; }
.accordion details[open] summary::after { content: "–"; }
.accordion .acc-body { padding: 0 0 1.1rem; color: var(--muted); }
.accordion .acc-body p { margin-bottom: 0.5em; }

/* About / content */
.split {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 800px) {
  .split { grid-template-columns: 0.9fr 1.1fr; gap: 3rem; align-items: center; }
  .split.reverse { grid-template-columns: 1.1fr 0.9fr; }
  .split.reverse .copy { order: -1; }
}
.photo-stack { display: grid; gap: 0.8rem; }
.prose { max-width: 40rem; }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

.page-hero { padding: 3rem 0 1rem; }
.page-hero p { color: var(--muted); max-width: 36rem; }

/* Forms */
.form {
  display: grid;
  gap: 0.9rem;
  max-width: 36rem;
}
.form label, .field-label {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
}
.form input,
.form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  padding: 0.75rem 0.85rem;
  border-radius: 6px;
}
.form textarea { min-height: 9rem; resize: vertical; }
.form input:focus, .form textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}
.hp { position: absolute !important; left: -9999px !important; }
.form-status { min-height: 1.4em; }
.form-status.error { color: var(--sold); }
.form-status.ok { color: var(--ok); }
.name-row { display: grid; gap: 0.8rem; }
@media (min-width: 600px) {
  .name-row { grid-template-columns: 1fr 1fr; }
}

/* Cart page & drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 28, 0.28);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: var(--bg);
  z-index: 90;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.drawer.open { transform: translateX(0); }
.drawer-head, .drawer-foot {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-foot { border-bottom: 0; border-top: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0.7rem; }
.drawer-body { flex: 1; overflow: auto; padding: 0.6rem 1.2rem 1.2rem; }
.cart-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.8rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.cart-row img { width: 72px; height: 90px; object-fit: cover; background: #ece6de; }
.cart-row h3 { font-size: 1.05rem; margin: 0 0 0.2rem; }
.cart-remove {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.85rem;
}
.cart-empty { color: var(--muted); padding: 1.4rem 0; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.05rem; }
.muted { color: var(--muted); }
.tiny { font-size: 0.88rem; color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding: 3rem 0 2rem;
  background: #efe8df;
}
.footer-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 800px) {
  .footer-grid { grid-template-columns: 1.2fr 0.8fr 1fr; gap: 3rem; }
}
.footer-brand { display: flex; gap: 0.7rem; align-items: center; margin-bottom: 0.7rem; text-decoration: none; }
.footer-brand img { width: 40px; height: 40px; }
.footer-brand span { font-family: var(--font-display); font-size: 1.3rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.newsletter { display: grid; gap: 0.6rem; }
.newsletter-row { display: flex; gap: 0.4rem; }
.newsletter-row input {
  flex: 1;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  padding: 0.7rem 0.8rem;
  border-radius: 6px;
}
.social { display: inline-flex; gap: 0.6rem; margin-top: 0.8rem; }
.social a { display: inline-flex; }
.social svg { width: 22px; height: 22px; }
.legal {
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  justify-content: space-between;
}

/* 404 / utility */
.center-page { padding: 5rem 0 6rem; text-align: left; max-width: 36rem; }

.coming-soon {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.9rem 1rem;
  border-radius: 8px;
}

/* Related */
.related { padding-top: 1rem; }
.related h2 { margin-bottom: 1.2rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
