:root {
  --bg: #faf6f3;
  --card: #ffffff;
  --ink: #2a1a1f;
  --muted: #7a646c;
  --rose: #5c2a3a;
  --rose-soft: #8b4a5c;
  --blush: #f3e4e8;
  --gold: #c4a35a;
  --ok: #0a7a3e;
  --err: #b42318;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(92, 42, 58, 0.08);
  font-family: "Segoe UI", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, #f8e9ee, transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, #efe6dc, transparent),
    var(--bg);
  min-height: 100vh;
  line-height: 1.5;
}
a { color: var(--rose); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; }
.muted { color: var(--muted); }

.site-header {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #eadfd8;
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}
.brand { display: flex; align-items: center; gap: 0.75rem; color: inherit; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--rose), var(--rose-soft));
  color: #fff; font-weight: 700; font-size: 1.2rem;
}
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 1.05rem; letter-spacing: 0.01em; }
.brand-text small { color: var(--muted); font-size: 0.78rem; }
.nav { display: flex; gap: 1rem; font-size: 0.95rem; }

.main { padding: 1.75rem 0 3rem; }

.hero {
  background: linear-gradient(135deg, #fff 0%, var(--blush) 100%);
  border: 1px solid #eadfd8;
  border-radius: calc(var(--radius) + 4px);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow);
}
.hero h1 { margin: 0 0 0.4rem; font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--rose); }
.hero p { margin: 0; color: var(--muted); max-width: 40rem; }

.flash {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.flash-ok { background: #e8f7ee; color: var(--ok); border: 1px solid #b7e4c7; }
.flash-error { background: #fdecea; color: var(--err); border: 1px solid #f5c2c0; }
.flash-info { background: #eef4ff; color: #1e4a8c; border: 1px solid #c9d9f5; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--card);
  border: 1px solid #eadfd8;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card-img {
  aspect-ratio: 1;
  background: var(--blush);
  object-fit: cover;
  width: 100%;
  display: block;
}
.card-body { padding: 1rem 1rem 1.15rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.card-body h2 { margin: 0; font-size: 1.05rem; }
.price { font-size: 1.15rem; font-weight: 700; color: var(--rose); }
.card-desc { color: var(--muted); font-size: 0.88rem; flex: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: linear-gradient(145deg, var(--rose), var(--rose-soft));
  color: #fff;
}
.btn-primary:hover { color: #fff; }
.btn-ghost {
  background: #fff;
  color: var(--rose);
  border: 1px solid #d8bcc5;
}
.btn-block { width: 100%; }

.checkout-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 800px) {
  .checkout-layout { grid-template-columns: 1fr; }
}

.panel {
  background: var(--card);
  border: 1px solid #eadfd8;
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}
.panel h1, .panel h2 { margin-top: 0; color: var(--rose); }

label { display: block; font-size: 0.88rem; margin: 0.75rem 0 0.3rem; color: var(--muted); }
input, textarea, select {
  width: 100%;
  border: 1px solid #dcc8ce;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  background: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(92, 42, 58, 0.25);
  border-color: var(--rose-soft);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px dashed #eadfd8;
  font-size: 0.95rem;
}
.summary-line.total {
  border-bottom: none;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--rose);
  padding-top: 0.75rem;
}
.thumb-sm {
  width: 88px; height: 88px; border-radius: 12px; object-fit: cover;
  background: var(--blush); border: 1px solid #eadfd8;
}
.product-row { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }

.site-footer {
  border-top: 1px solid #eadfd8;
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0.25rem 0; }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.admin-table th, .admin-table td {
  text-align: left; padding: 0.65rem 0.5rem; border-bottom: 1px solid #eadfd8; vertical-align: top;
}
.admin-table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: .04em; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.badge {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px;
  font-size: 0.75rem; background: var(--blush); color: var(--rose);
}
.badge-off { background: #eee; color: #666; }
.admin-thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }

.status-page { text-align: center; padding: 2rem 1rem; }
.status-page h1 { color: var(--rose); }
