/* ==========================================================================
   Beezi — storefront + admin design system
   Warm, modern, honey-and-hive palette. Single stylesheet, no build step.
   ========================================================================== */

:root {
  --honey-50:  #fffaf0;
  --honey-100: #fdf1d6;
  --honey-200: #f9e2a8;
  --honey-300: #f2b705;
  --honey-400: #e0a400;
  --honey-500: #c98f00;
  --bark-900:  #221a10;
  --bark-800:  #2c2114;
  --bark-700:  #3a2e1f;
  --bark-500:  #5a4a34;
  --bark-300:  #8a7a5c;
  --cream:     #faf6ee;
  --cream-2:   #f3ecdc;
  --white:     #ffffff;
  --green-600: #4b7a3a;
  --green-100: #e7f0e1;
  --red-600:   #b3382c;
  --red-100:   #fbe9e7;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(44, 33, 20, 0.08);
  --shadow-md: 0 10px 30px rgba(44, 33, 20, 0.12);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--bark-700);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--bark-800);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.text-center { text-align: center; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--honey-500); font-weight: 700; margin-bottom: 10px;
}
.muted { color: var(--bark-300); }
.mt-0 { margin-top: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--bark-800); color: var(--honey-200); }
.btn-primary:hover { background: var(--bark-900); box-shadow: var(--shadow-sm); }
.btn-honey { background: var(--honey-300); color: var(--bark-900); }
.btn-honey:hover { background: var(--honey-400); box-shadow: var(--shadow-sm); }
.btn-outline { background: transparent; border-color: var(--bark-800); color: var(--bark-800); }
.btn-outline:hover { background: var(--bark-800); color: var(--honey-200); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,0.6); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.15); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 999px; }
.btn-danger { background: var(--red-600); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Top banner + header ---------- */
.top-banner {
  background: var(--bark-900); color: var(--honey-200); text-align: center;
  font-size: 0.82rem; padding: 8px 16px; letter-spacing: 0.02em;
}
.site-header {
  position: sticky; top: 0; z-index: 40; background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--cream-2);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--bark-800); }
.brand .dot { color: var(--honey-400); }
.brand-logo { display: none; height: 40px; width: auto; }
.brand-logo.loaded { display: block; }
.brand-logo.loaded ~ .brand-text { display: none; }
.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a { font-weight: 600; font-size: 0.95rem; color: var(--bark-700); }
.main-nav a:hover { color: var(--honey-500); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.cart-link { position: relative; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.cart-count {
  background: var(--honey-300); color: var(--bark-900); border-radius: 999px; font-size: 0.75rem;
  min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }

@media (max-width: 860px) {
  .main-nav { position: fixed; inset: 84px 0 0 0; background: var(--cream); flex-direction: column; padding: 32px 24px; gap: 20px; transform: translateX(100%); transition: transform .25s ease; }
  .main-nav.open { transform: translateX(0); }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; background: linear-gradient(135deg, var(--bark-900), var(--bark-700));
  color: #fff; border-radius: 0 0 40px 40px;
}
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero h1 { color: #fff; }
.hero p.lead { color: rgba(255,255,255,0.82); font-size: 1.1rem; max-width: 480px; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 24px; margin-top: 40px; flex-wrap: wrap; }
.hero-badge { font-size: 0.85rem; color: rgba(255,255,255,0.75); display: flex; align-items: center; gap: 8px; }
.hero-image-wrap { position: relative; }
.hero-image-wrap img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.hero-blob {
  position: absolute; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, var(--honey-300), transparent 70%); opacity: .35; top: -80px; right: -80px; filter: blur(10px);
}
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-badges { justify-content: center; }
}

/* ---------- Feature strip ---------- */
.feature-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-card { background: var(--white); border-radius: var(--radius-md); padding: 28px 22px; box-shadow: var(--shadow-sm); text-align: left; }
.feature-card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--honey-100); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--honey-500); }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature-card p { color: var(--bark-300); font-size: 0.92rem; margin: 0; }
@media (max-width: 900px) { .feature-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-strip { grid-template-columns: 1fr; } }

/* ---------- Section headers ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 36px; gap: 20px; flex-wrap: wrap; }
.section-head .copy { max-width: 560px; }
.section-head.centered { flex-direction: column; text-align: center; align-items: center; }

/* ---------- Product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
@media (max-width: 1024px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
  background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card .thumb { aspect-ratio: 1 / 1; background: var(--honey-100); position: relative; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .thumb img { transform: scale(1.06); }
.product-card .badge {
  position: absolute; top: 12px; left: 12px; background: var(--bark-900); color: var(--honey-200);
  font-size: 0.72rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; letter-spacing: .03em;
}
.product-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .cat { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--honey-500); font-weight: 700; }
.product-card h3 { font-size: 1.05rem; margin: 0; }
.product-card h3 a:hover { color: var(--honey-500); }
.product-card .desc { color: var(--bark-300); font-size: 0.88rem; flex: 1; }
.product-card .row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.price { font-weight: 700; font-size: 1.1rem; color: var(--bark-800); font-family: var(--font-display); }
.price .compare { text-decoration: line-through; color: var(--bark-300); font-weight: 500; font-size: 0.9rem; margin-left: 6px; }
.out-of-stock { color: var(--red-600); font-size: 0.82rem; font-weight: 700; }

/* Category filter pills */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.pill {
  padding: 9px 18px; border-radius: 999px; background: var(--white); border: 1px solid var(--cream-2);
  font-size: 0.88rem; font-weight: 600; color: var(--bark-500);
}
.pill.active, .pill:hover { background: var(--bark-800); color: var(--honey-200); border-color: var(--bark-800); }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: flex-start; }
.product-detail .gallery img { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.product-detail .info .price { font-size: 1.6rem; margin: 10px 0 18px; }
.breadcrumbs { font-size: 0.85rem; color: var(--bark-300); margin-bottom: 22px; }
.breadcrumbs a:hover { color: var(--honey-500); }
.qty-input { display: inline-flex; align-items: center; border: 1px solid var(--cream-2); border-radius: 999px; overflow: hidden; }
.qty-input button { width: 40px; height: 44px; background: var(--cream-2); border: none; font-size: 1.1rem; cursor: pointer; }
.qty-input input { width: 50px; text-align: center; border: none; height: 44px; font-size: 1rem; background: #fff; }
.add-to-cart-row { display: flex; align-items: center; gap: 16px; margin: 24px 0; flex-wrap: wrap; }
.variant-select { padding: 12px 16px; border-radius: 10px; border: 1px solid var(--cream-2); font-size: 0.95rem; background: #fff; min-width: 220px; }
.product-desc { color: var(--bark-500); white-space: pre-line; }
.stock-line { font-size: 0.88rem; font-weight: 600; margin-bottom: 4px; }
.stock-line.in { color: var(--green-600); }
.stock-line.out { color: var(--red-600); }
@media (max-width: 840px) { .product-detail { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- Why-us / gallery ---------- */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.why-grid img { border-radius: var(--radius-md); width: 100%; height: 100%; object-fit: cover; box-shadow: var(--shadow-sm); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .why-grid { grid-template-columns: repeat(2,1fr); } }

.cta-band {
  background: var(--bark-800); color: #fff; border-radius: var(--radius-lg); padding: 56px; text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.75); max-width: 520px; margin-left: auto; margin-right: auto; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; color: var(--bark-700); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--cream-2); border-radius: 10px;
  font-size: 0.96rem; font-family: inherit; background: #fff; color: var(--bark-800);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--honey-300); border-color: var(--honey-300); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.checkbox-field { display: flex; align-items: center; gap: 8px; }
.checkbox-field input { width: auto; }
.form-error { color: var(--red-600); font-size: 0.85rem; margin-top: 4px; }
.help-text { color: var(--bark-300); font-size: 0.82rem; margin-top: 4px; }

/* ---------- Alerts / flash ---------- */
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-size: 0.92rem; }
.alert-success { background: var(--green-100); color: var(--green-600); }
.alert-error { background: var(--red-100); color: var(--red-600); }
.alert-info { background: var(--honey-100); color: var(--bark-700); }

/* ---------- Cart page ---------- */
.cart-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: flex-start; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-line { display: grid; grid-template-columns: 80px 1fr auto auto; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--cream-2); }
.cart-line img { width: 80px; height: 80px; object-fit: cover; border-radius: 10px; }
.cart-line .name { font-weight: 700; }
.cart-line .variant { font-size: 0.82rem; color: var(--bark-300); }
.cart-line .remove { color: var(--red-600); font-size: 0.82rem; font-weight: 600; background: none; border: none; cursor: pointer; padding: 0; margin-top: 6px; }
.summary-card { background: var(--white); border-radius: var(--radius-md); padding: 26px; box-shadow: var(--shadow-sm); }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.95rem; }
.summary-row.total { font-weight: 800; font-size: 1.2rem; border-top: 2px solid var(--bark-800); padding-top: 14px; margin-top: 14px; }
.coupon-row { display: flex; gap: 8px; margin: 16px 0; }
.coupon-row input { flex: 1; }
.empty-state { text-align: center; padding: 80px 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bark-900); color: rgba(255,255,255,0.7); padding: 64px 0 28px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-grid a, .footer-grid p { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a:hover { color: var(--honey-300); }
.footer-brand { color: var(--honey-300); font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.82rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Static page content ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose ul { list-style: disc; padding-left: 1.4em; margin-bottom: 1em; }
.prose li { margin-bottom: 6px; }
.page-header { padding: 56px 0 20px; }

/* ---------- Toast (add to cart feedback) ---------- */
#toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--bark-900); color: #fff;
  padding: 14px 22px; border-radius: 12px; box-shadow: var(--shadow-md); font-size: 0.92rem;
  transform: translateY(140%); transition: transform .3s ease; z-index: 100;
}
#toast.show { transform: translateY(0); }

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-body { background: var(--cream-2); min-height: 100vh; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--bark-900); color: rgba(255,255,255,0.8); padding: 28px 18px; }
.admin-sidebar .brand { color: var(--honey-300); margin-bottom: 30px; padding-left: 8px; }
.admin-sidebar a {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; font-size: 0.92rem;
  font-weight: 600; color: rgba(255,255,255,0.75); margin-bottom: 4px;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.08); color: #fff; }
.admin-main { padding: 32px 40px; max-width: 1200px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.admin-card { background: #fff; border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } .admin-shell { grid-template-columns: 1fr; } .admin-sidebar { display:flex; overflow-x:auto; gap: 4px; } }
.stat-card { background: #fff; border-radius: var(--radius-md); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.stat-card .label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bark-300); font-weight: 700; }
.stat-card .value { font-family: var(--font-display); font-size: 1.7rem; margin-top: 6px; color: var(--bark-800); }

table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th { text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bark-300); padding: 10px 12px; border-bottom: 2px solid var(--cream-2); }
table.admin-table td { padding: 12px; border-bottom: 1px solid var(--cream-2); font-size: 0.92rem; vertical-align: middle; }
table.admin-table tr:hover td { background: var(--cream); }
.status-badge { padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; text-transform: capitalize; }
.status-pending { background: #fdf1d6; color: var(--honey-500); }
.status-paid, .status-processing { background: #e0f0fb; color: #2264a3; }
.status-shipped { background: #eee0fb; color: #6a3aa3; }
.status-completed { background: var(--green-100); color: var(--green-600); }
.status-cancelled, .status-refunded { background: var(--red-100); color: var(--red-600); }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bark-900); }
.login-card { background: #fff; border-radius: var(--radius-lg); padding: 44px; width: 100%; max-width: 400px; box-shadow: var(--shadow-md); }
.login-card .brand { justify-content: center; margin-bottom: 20px; }

.action-icons { display: flex; gap: 10px; }
.action-icons a, .action-icons button { color: var(--bark-500); background: none; border: none; cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.action-icons a:hover, .action-icons button:hover { color: var(--honey-500); }
