:root {
  --bg: #F9DDE1;
  --card: #FFFFFF;
  --ink: #4A3530;
  --ink-soft: #7A615A;
  --accent: #EFA3B4;
  --accent-ink: #4A3530;
  --line: #EBC3CB;
  --radius: 16px;
  --gutter: clamp(16px, 4vw, 40px);
  --serif: 'Lora', Georgia, serif;
  --script: 'Great Vibes', cursive;
  --sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(16px, 15px + .25vw, 18px);
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: var(--ink); }
img { max-width: 100%; display: block; }

main { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter) 40px; }

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 12px var(--gutter);
}
.site-header.home { justify-content: flex-end; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.logo { width: clamp(44px, 6vw, 60px); height: auto; aspect-ratio: 1; border-radius: 50%; flex: none; }
.wordmark { font-family: var(--serif); font-size: clamp(1.1rem, .9rem + 1vw, 1.5rem); font-weight: 600; white-space: nowrap; }
.script { font-family: var(--script); font-weight: 400; font-size: 1.6em; line-height: 1; }
.tiktok {
  flex: none; font-weight: 700; font-size: .9rem; text-decoration: none;
  padding: 8px 16px; border: 1.5px solid var(--ink); border-radius: 999px;
}
.tiktok:hover { background: var(--ink); color: #fff; }

/* ---------- Hero (home page) ---------- */
.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  margin: 0 auto 28px; max-width: 900px;
}
.hero-logo { width: clamp(140px, 30vw, 220px); height: auto; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 6px 24px rgba(74, 53, 48, .12); }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.6rem); line-height: 1.2; margin: 4px 0 0; }
.hero p { margin: 0; color: var(--ink-soft); max-width: 36em; font-size: clamp(1rem, .95rem + .3vw, 1.15rem); }
.hero-link { font-weight: 700; }
@media (min-width: 760px) {
  .hero { flex-direction: row; text-align: left; gap: 40px; justify-content: center; margin-top: 8px; }
  .hero-text { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ---------- Titles, chips ---------- */
.page-title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem); margin: 8px 0 12px; text-align: center; }
.section-title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.25rem, 1.1rem + .8vw, 1.6rem); margin: 8px 0 12px; text-align: center; }

.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px var(--gutter) 14px; margin: 0 calc(-1 * var(--gutter));
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 760px) { .chips { flex-wrap: wrap; justify-content: center; overflow: visible; } }
.chip {
  flex: none; padding: 8px 16px; border-radius: 999px; background: var(--card); text-decoration: none;
  font-weight: 600; font-size: .9rem; border: 1.5px solid var(--line); min-height: 42px; display: inline-flex; align-items: center;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-current='page'] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Search + sort ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0;
}
.shop-controls {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; max-width: 760px; margin: 0 auto 14px;
}
.shop-controls .search-box { grid-column: 1 / -1; }
@media (min-width: 600px) {
  .shop-controls { grid-template-columns: 1fr auto auto; align-items: center; }
  .shop-controls .search-box { grid-column: auto; }
}
.shop-controls input[type='search'], .shop-controls select {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--card); border: 1.5px solid var(--line);
  border-radius: 999px; min-height: 44px; padding: 8px 16px; width: 100%;
}
.shop-controls input[type='search']:focus, .shop-controls select:focus { outline: 3px solid var(--accent); border-color: var(--ink); }
.sort-box { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; }
.sort-box select { width: auto; padding-right: 32px; }
.search-btn {
  font: inherit; font-weight: 700; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 0;
  background: var(--ink); color: #fff; cursor: pointer;
}
.search-summary { text-align: center; color: var(--ink-soft); margin: 0 0 12px; }

/* ---------- Product grids ---------- */
/* Phones: two columns that fill the width. Bigger screens: as many ~240px cards as fit, centred,
   so one or two products never look stranded in a corner. */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(200px, 260px)); justify-content: center; gap: 20px; }
}


.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 1px 3px rgba(74, 53, 48, .08); transition: transform .15s ease, box-shadow .15s ease;
}
@media (hover: hover) { .card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(74, 53, 48, .12); } }
.card-photo { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; background: #f3e6e8; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-name { font-size: 1rem; font-weight: 700; margin: 0; line-height: 1.3; overflow-wrap: anywhere; }
.card-note { font-size: .9rem; color: var(--ink-soft); margin: 0; flex: 1; overflow-wrap: anywhere; }
@media (min-width: 600px) { .card-body { padding: 14px 16px 16px; gap: 8px; } }

.buy {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none;
  border-radius: 999px; text-align: center; margin-top: auto;
}
.buy:hover { filter: brightness(.96); }
.card .buy { white-space: nowrap; font-size: .9rem; padding: 10px 8px; }
@media (min-width: 600px) { .card .buy { font-size: 1rem; padding: 10px 16px; } }
.buy:active { transform: scale(.98); }

/* ---------- Disclosure, empty ---------- */
.disclosure { font-size: .8rem; color: var(--ink-soft); margin: 0 0 12px; text-align: center; }
.empty { text-align: center; padding: 48px 16px; background: var(--card); border-radius: var(--radius); max-width: 640px; margin: 0 auto; }

/* ---------- Footer ---------- */
.site-footer { text-align: center; padding: 24px var(--gutter) 40px; border-top: 1px solid var(--line); }
.site-footer .disclosure { margin-bottom: 4px; }
.site-footer .small { font-size: .8rem; color: var(--ink-soft); margin: 4px 0 12px; }
.site-footer nav { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Admin ---------- */
.admin main { max-width: 640px; padding-bottom: 96px; }
.admin-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  max-width: 640px; margin: 0 auto; padding: 10px 16px;
}
.admin-header .logo { width: 40px; height: 40px; }
.admin-header .brand span { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.admin-nav { display: flex; gap: 12px; flex-wrap: wrap; font-weight: 600; font-size: .95rem; }
.toast {
  max-width: 608px; margin: 0 auto 8px; padding: 10px 14px; background: #E3F4E6; color: #24502E;
  border-radius: 12px; font-weight: 700;
}
.form-error { background: #FFF1F1; color: #8A1F1F; padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.admin-form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; }
.field > span, .field > legend { font-weight: 700; }
.admin-form input[type='url'], .admin-form input[type='text'], .admin-form textarea {
  font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink); width: 100%;
}
.admin-form input:focus, .admin-form textarea:focus { outline: 3px solid var(--accent); border-color: var(--ink); }
.hint { color: var(--ink-soft); font-size: .85rem; }
.field-error { color: #A12A2A; font-weight: 700; font-size: .9rem; margin: 0; }
.photo-pick {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 140px; border: 2px dashed var(--accent); border-radius: var(--radius); background: #fff; padding: 12px; cursor: pointer;
}
.photo-pick input[type='file'] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-pick img { max-height: 260px; width: auto; border-radius: 12px; }
.photo-btn { font-weight: 700; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--line);
  border-radius: 999px; padding: 8px 14px; min-height: 44px; font-weight: 600;
}
.check input { width: 20px; height: 20px; accent-color: var(--ink); }
.save-bar {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(249, 221, 225, .95); border-top: 1px solid var(--line); display: flex; justify-content: center;
}
.save { width: 100%; max-width: 608px; border: 0; font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.save:disabled { opacity: .6; }
.add-btn { width: 100%; margin: 4px 0 12px; font-size: 1.05rem; }
.admin-list { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 12px; background: #fff; border-radius: var(--radius); padding: 10px; }
.row.is-hidden { opacity: .65; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: .75rem; font-weight: 700; background: #EEE3E5; padding: 2px 8px; border-radius: 999px; }
.badge.warn { background: #FFF3CD; color: #6B4E00; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.row-actions form { margin: 0; }
.small-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; min-width: 44px; padding: 6px 12px;
  border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 700;
  font-size: .9rem; text-decoration: none; cursor: pointer;
}
.small-btn.danger { color: #A12A2A; }
.new-category { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.new-category input {
  font: inherit; font-size: 16px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink); width: 100%;
}
.small-btn:disabled { opacity: .35; }
.inline-form { display: flex; gap: 8px; margin: 8px 0; }
.inline-form input {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 8px 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
}
