:root {
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-sans: Manrope, "Segoe UI", sans-serif;
  --ink: #1b1712;
  --forest: #17342b;
  --moss: #2f5a45;
  --sage: #5b8a6d;
  --blush: #c45c6a;
  --rose: #e8b4b8;
  --gold: #c6a15b;
  --cream: #f6efe4;
  --petal: #fbf6ef;
  --paper: #fffdf9;
  --line: #e6d9c8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--petal);
  color: var(--ink);
  font-family: var(--font-sans);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
::selection { background: #ead7a8; color: var(--forest); }

body.shop { padding-top: 5.5rem; }
.grain {
  min-height: 100vh;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E");
}

.wrap { width: min(1120px, calc(100% - 2.5rem)); margin: 0 auto; }
.main { padding: 1.25rem 0 2rem; }
@media (min-width: 640px) { .main { padding: 2rem 0; } }

.soft-card {
  background: linear-gradient(180deg, rgba(255,253,249,.96), rgba(251,244,234,.92));
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -28px rgba(23,52,43,.45);
}

.shop-input, .admin-input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: .9rem;
  padding: .75rem .95rem;
  outline: none;
}
.shop-input:focus, .admin-input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 4px rgba(91,138,109,.15);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: .75rem 1.4rem; border: 0; cursor: pointer;
}
.btn-forest { background: var(--forest); color: var(--cream); }
.btn-line { background: transparent; border: 1px solid var(--forest); color: var(--forest); }
.btn-blush { color: var(--blush); background: none; }
.btn[disabled] { background: var(--line); color: rgba(27,23,18,.45); cursor: not-allowed; }

.display { font-family: var(--font-display); color: var(--forest); line-height: 1.15; }
.h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
.h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
.muted { color: rgba(27,23,18,.7); }
.blush { color: var(--blush); }
.moss { color: var(--moss); }

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(230,217,200,.8);
  background: rgba(251,246,239,.96);
  backdrop-filter: blur(12px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .75rem 0;
}
.header-inner > a:first-child { flex: 0 0 auto; }
.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 2rem;
  font-size: .95rem;
  color: var(--forest);
}
.nav a:hover { color: var(--blush); }
.header-actions { display: flex; align-items: center; gap: .75rem; flex: 0 0 auto; }
.menu-toggle { display: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 999px; display: inline-flex;
  align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff;
  flex: 0 0 auto; z-index: 2;
}
.cart-btn { background: var(--forest); color: var(--cream); border: 0; position: relative; }
.cart-btn svg { display: block; pointer-events: none; }
.badge {
  position: absolute; right: -4px; top: -4px; min-width: 20px; padding: 0 4px;
  border-radius: 999px; background: var(--blush); color: #fff; font-size: 11px; line-height: 20px; text-align: center;
  pointer-events: none;
}
.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--paper); padding: 1rem 0; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: .4rem 0; color: var(--forest); }
@media (max-width: 767px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (min-width: 1024px) {
  #header-phone { display: inline !important; font-size: .9rem; color: var(--moss); }
}

.logo { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.logo img, .logo svg { width: 40px; height: 40px; flex: 0 0 auto; }
@media (min-width: 640px) { .logo img, .logo svg { width: 48px; height: 48px; } }
.logo-name { font-family: var(--font-display); letter-spacing: .12em; font-size: 1.35rem; color: var(--forest); }
.logo-sub { margin-top: 4px; font-size: .52rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(47,90,69,.8); max-width: 9.5rem; }
@media (min-width: 640px) {
  .logo-name { font-size: 1.7rem; letter-spacing: .22em; }
  .logo-sub { font-size: .62rem; letter-spacing: .34em; max-width: none; }
}
.logo.hero .logo-name { font-size: 2.4rem; }
.logo.hero img, .logo.hero svg { width: 64px; height: 64px; }
@media (min-width: 640px) {
  .logo.hero .logo-name { font-size: 3rem; }
  .logo.hero img, .logo.hero svg { width: 96px; height: 96px; }
  .logo.hero .logo-sub { font-size: .75rem; letter-spacing: .28em; max-width: none; }
}

.hero { display: grid; gap: 2rem; align-items: center; padding: 1.6rem; border-radius: 1.6rem; }
.hero-bouquet { width: 100%; max-width: 440px; margin: 0 auto; }
.hero-bouquet-svg, .hero-bouquet svg { width: 100%; height: auto; display: block; }
@media (min-width: 960px) { .hero { grid-template-columns: 1.1fr .9fr; padding: 3rem; } }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.grid-4 { display: grid; gap: 1.1rem; }
.grid-4 > * { min-width: 0; }
@media (min-width: 640px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.grid-2 { display: grid; gap: 1.25rem; }
@media (min-width: 960px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.cat-card, .product-card { border-radius: 1.5rem; overflow: hidden; display: block; min-width: 0; transition: transform .3s ease, box-shadow .3s ease; }
.cat-card { padding: 1.3rem; }
.cat-card:hover, .product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px -22px rgba(23, 52, 43, .45);
}
.accent-bar { height: 8px; width: 48px; border-radius: 999px; margin-bottom: 1.4rem; }
.product-card .thumb { aspect-ratio: 4/5; background: var(--cream); position: relative; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .thumb img { transform: scale(1.05); }
.chip { position: absolute; left: 12px; top: 12px; background: rgba(255,253,249,.9); border-radius: 999px; padding: 4px 12px; font-size: 12px; }
.soldout { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(27,23,18,.45); color: #fff; }
.product-body { padding: .9rem 1rem 1.05rem; min-width: 0; }
.product-body h3 {
  font-size: 1.2rem;
  margin: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.product-body .muted {
  font-size: .85rem;
  margin: .4rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}
.product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .35rem .6rem;
  margin-top: .7rem;
}
.product-meta .price { font-size: 1rem; color: var(--forest); white-space: nowrap; }
.product-meta .more { font-size: .85rem; color: var(--blush); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0; }
.chip-link { border-radius: 999px; padding: .45rem 1rem; font-size: .9rem; border: 1px solid var(--line); background: #fff; color: var(--forest); }
.chip-link.active { background: var(--forest); color: var(--cream); border-color: var(--forest); }

.crumbs { font-size: .9rem; color: rgba(27,23,18,.5); display: flex; flex-wrap: wrap; gap: .35rem; }
.product-layout { display: grid; gap: 2rem; margin-top: 1.4rem; }
@media (min-width: 960px) { .product-layout { grid-template-columns: 1.05fr .95fr; } }
.gallery-main { border-radius: 1.8rem; overflow: hidden; aspect-ratio: 4/5; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: .75rem; }
@media (min-width: 640px) { .thumbs { grid-template-columns: repeat(5, 1fr); } }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: 12px; overflow: hidden; background: none; cursor: pointer; }
.thumbs button.active { border-color: var(--forest); }
.thumbs img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.qty button { border: 0; background: none; padding: .7rem 1rem; cursor: pointer; }

.cart-row { display: flex; gap: .8rem; padding: .8rem; border-radius: 1.3rem; min-width: 0; }
.cart-row img { width: 80px; height: 80px; object-fit: cover; border-radius: 1rem; flex: 0 0 auto; }
.cart-layout { display: grid; gap: 1.5rem; }
@media (min-width: 960px) { .cart-layout { grid-template-columns: 1.3fr .7fr; } }

.footer { margin-top: 4rem; background: var(--forest); color: var(--cream); }
.footer-grid { display: grid; gap: 2rem; padding: 2.5rem 0; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer a { color: rgba(246,239,228,.8); }
.footer .logo-name { color: var(--cream); }
.footer .logo-sub { color: rgba(232,180,184,.8); max-width: none; }
.copy { border-top: 1px solid rgba(255,255,255,.1); padding: 1rem 0; text-align: center; font-size: 12px; color: rgba(246,239,228,.5); }

.admin-shell { min-height: 100vh; }
@media (min-width: 768px) { .admin-shell { display: grid; grid-template-columns: 220px 1fr; } }
.admin-aside { background: var(--forest); color: var(--cream); padding: 1rem; }
.admin-aside a { color: var(--cream); }
.admin-nav { display: flex; gap: .25rem; overflow-x: auto; margin-top: 1rem; }
.admin-nav a { white-space: nowrap; border-radius: 12px; padding: .5rem .75rem; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.1); }
@media (min-width: 768px) { .admin-nav { flex-direction: column; overflow: visible; } }
.admin-main { padding: 1rem; min-width: 0; }
@media (min-width: 768px) { .admin-main { padding: 2rem; } }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th { background: var(--cream); color: rgba(27,23,18,.6); padding: .75rem; }
td { padding: .75rem; border-top: 1px solid var(--line); }
.form-card { max-width: 46rem; padding: 1.2rem; border-radius: 1.4rem; display: grid; gap: 1rem; }
label span { display: block; margin-bottom: .35rem; font-size: .9rem; }
.check { display: flex; gap: .5rem; align-items: center; }
.ok { color: var(--moss); }
.notice { margin: .75rem 0; color: var(--moss); }
.err { color: var(--blush); }
.map { min-height: 280px; border-radius: 1.6rem; overflow: hidden; }
.map iframe { width: 100%; height: 280px; border: 0; }
@media (min-width: 640px) { .map iframe { height: 420px; } }
.space { height: 1.5rem; }
.mt { margin-top: 1.5rem; }
.page-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  margin-bottom: 1.25rem;
}
.btn-home {
  padding: .45rem 1rem;
  font-size: .9rem;
}
.to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 60;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--forest);
  color: var(--cream);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: 0 12px 28px rgba(23, 52, 43, .28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--moss); }
