:root {
  --ink: #2b2323;
  --paper: #fffdf8;
  --paper-deep: #faf5ea;
  --card: #ffffff;
  --wine: #6d1f3a;
  --wine-dark: #501629;
  --gold: #c8963e;
  --gold-light: #e8c877;
  --blush: #f6ede0;
  --line: #ece3d2;
  --muted: #7a6a5a;
  --danger: #b3432b;
  --ok: #3c6e47;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Shared "dignified" card treatment: a soft ambient shadow plus a crisp close
     shadow, with a faint inset highlight along the top edge for a gently
     embossed, raised-off-the-page feel. */
  --shadow-soft: 0 1px 0 rgba(255,255,255,0.9) inset, 0 1px 2px rgba(43,35,35,0.05), 0 10px 24px -12px rgba(80,22,41,0.18);
  --shadow-lift: 0 1px 0 rgba(255,255,255,0.9) inset, 0 2px 4px rgba(43,35,35,0.06), 0 18px 32px -14px rgba(80,22,41,0.28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

a { color: var(--wine-dark); }

h1, h2, h3 { font-family: var(--font-display); }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; flex-wrap: wrap; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { height: 58px; width: auto; flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(80,22,41,0.18)); }
.brand-word { display: flex; flex-direction: column; line-height: 1.1; }
.brand-word strong { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.04em; color: var(--wine); }
.brand-word em { font-style: normal; font-size: 0.68rem; letter-spacing: 0.28em; color: var(--gold); font-weight: 600; }
.main-nav a { margin-left: 18px; text-decoration: none; color: var(--ink); font-size: 0.95rem; }
.main-nav a:first-child { margin-left: 0; }
.main-nav a:hover { color: var(--wine); }
.cart-link { font-weight: 600; }

main { max-width: 1120px; margin: 0 auto; padding: 0 20px 80px; }

/* ---------- hero ---------- */
.hero { position: relative; margin: 0 -20px 20px; overflow: hidden; min-height: 460px; display: flex; align-items: center; justify-content: center; }
.hero-slides { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.6s ease; }
.hero-slide.active { opacity: 1; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(80,22,41,0.55), rgba(43,25,20,0.65)); }
.hero-content { position: relative; z-index: 1; text-align: center; padding: 50px 20px 60px; color: #fff; max-width: 640px; }
.hero-badge { width: 132px; height: 132px; border-radius: 50%; background: #fffdf8; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 32px rgba(0,0,0,0.35), 0 2px 0 rgba(255,255,255,0.6) inset; padding: 8px; }
.hero-badge img { width: 100%; height: 100%; object-fit: contain; }
.hero-eyebrow { text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.72rem; color: var(--gold-light); margin-bottom: 14px; }
.hero-content h1 { font-size: 2.6rem; margin: 0 0 14px; }
.hero-content p { font-size: 1.1rem; opacity: 0.92; max-width: 520px; margin: 0 auto 26px; }

.btn { display: inline-block; padding: 11px 24px; background: var(--wine); color: #fff; border-radius: 999px; text-decoration: none; font-weight: 600; border: none; cursor: pointer; font-size: 0.95rem; letter-spacing: 0.01em; box-shadow: 0 6px 14px -4px rgba(109,31,58,0.55); transition: transform 0.12s, box-shadow 0.12s; }
.btn:hover { background: var(--wine-dark); transform: translateY(-1px); box-shadow: 0 10px 18px -4px rgba(109,31,58,0.55); }
.btn.secondary { background: transparent; color: var(--wine); border: 1px solid var(--wine); box-shadow: none; }
.btn.secondary.light { color: #fff; border-color: rgba(255,255,255,0.7); }
.btn.secondary.light:hover { background: rgba(255,255,255,0.12); }
.btn.danger { background: var(--danger); box-shadow: none; }
.btn.wa-btn { background: #25D366; box-shadow: 0 6px 14px -4px rgba(37,211,102,0.5); }
.btn.wa-btn:hover { background: #1ebc59; }
.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- category tiles ---------- */
.section-title { font-size: 1.5rem; margin: 56px 0 20px; }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.cat-tile { display: block; text-align: center; padding: 22px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; box-shadow: var(--shadow-soft); transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s; }
.cat-tile:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow-lift); }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 26px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-soft); transition: box-shadow 0.18s, transform 0.18s; }
.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-4px); }
.card img, .product-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; background: var(--blush); }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; }
.card-body h3 a { text-decoration: none; color: var(--ink); }
.card-body h3 a:hover { color: var(--wine); }
.card-body .price { font-weight: 700; color: var(--wine); }
.card-body .muted, .muted { color: var(--muted); font-size: 0.9rem; }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.card-actions form { flex: 1; }
.card-actions .btn { width: 100%; text-align: center; padding: 9px; }

.category-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.category-filters.sub { margin-top: -6px; margin-bottom: 24px; }
.category-filters a { padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 0.9rem; background: var(--card); }
.category-filters.sub a { font-size: 0.82rem; padding: 5px 13px; background: var(--blush); border-color: transparent; }
.category-filters a.active { background: var(--wine); color: #fff; border-color: var(--wine); }

.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.product-detail img { width: 100%; border-radius: 14px; background: var(--blush); aspect-ratio: 4/5; object-fit: cover; box-shadow: var(--shadow-lift); border: 1px solid var(--line); }
.stock-low { color: var(--danger); font-weight: 600; }
.stock-out { color: var(--muted); font-weight: 600; }

table { width: 100%; border-collapse: collapse; margin: 20px 0; background: var(--card); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-soft); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); background: var(--paper-deep); }

.cart-table img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.qty-form { display: flex; gap: 6px; align-items: center; }
.qty-form input[type=number] { width: 56px; padding: 4px; border: 1px solid var(--line); border-radius: 4px; }
.cart-total { text-align: right; font-size: 1.2rem; font-weight: 700; margin: 20px 0; color: var(--wine); }

form.stacked { display: flex; flex-direction: column; gap: 14px; max-width: 480px; }
form.stacked label { font-weight: 600; font-size: 0.9rem; }
form.stacked input, form.stacked textarea, form.stacked select {
  width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 6px; font-family: inherit; font-size: 1rem; background: #fff;
  box-shadow: 0 1px 2px rgba(43,35,35,0.04) inset;
}
form.stacked textarea { resize: vertical; }

.contact-options { display: flex; gap: 14px; flex-wrap: wrap; margin: 20px 0 10px; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; }
.flash.ok { background: #e5f0e7; color: var(--ok); }
.flash.error { background: #f6e4de; color: var(--danger); }

.blog-list article { padding: 24px 0; border-bottom: 1px solid var(--line); }
.blog-list h2 { margin: 0 0 6px; font-size: 1.3rem; }
.post-body { white-space: pre-wrap; font-size: 1.05rem; max-width: 680px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: #eee; }
.badge.new { background: #fdeccd; color: #8a5a12; }
.badge.confirmed { background: #d9e8f5; color: #23577f; }
.badge.shipped { background: #d9e8f5; color: #23577f; }
.badge.delivered { background: #dcefe0; color: var(--ok); }
.badge.cancelled { background: #f4d9d1; color: var(--danger); }

/* ---------- WhatsApp floating button ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25); z-index: 20; text-decoration: none;
}
.wa-float:hover { background: #1ebc59; }

/* ---------- admin ---------- */
.admin { background: var(--paper-deep); }
.admin main { max-width: 1150px; }
.admin-header { background: #2b1420; border-bottom: none; }
.admin-header .brand-mark { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); }
.admin-header .brand-word strong { color: #f4efe6; }
.admin-header .brand-word em { color: var(--gold-light); }
.admin-header .main-nav a { color: #f0e6da; }
.admin-header .main-nav a:hover { color: #fff; text-decoration: underline; }
.dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 24px 0 40px; }
.dash-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; box-shadow: var(--shadow-soft); }
.dash-card .num { font-size: 1.8rem; font-weight: 700; color: var(--wine); }
.login-box { max-width: 380px; margin: 60px auto; background: var(--card); padding: 36px 32px; border-radius: 14px; border: 1px solid var(--line); text-align: center; box-shadow: var(--shadow-lift); }
.login-box img { width: 96px; margin-bottom: 14px; filter: drop-shadow(0 4px 10px rgba(80,22,41,0.2)); }
.row-actions a { margin-right: 10px; font-size: 0.9rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }

/* ---------- reviews & ratings ---------- */
.stars { color: var(--gold); letter-spacing: 2px; }
.rating-line { margin: 4px 0 10px; font-size: 0.9rem; color: var(--ink); }
.rating-line .stars { font-size: 0.95rem; }
.reviews { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 28px; }
.review { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow-soft); }
.review-form { margin-top: 20px; background: var(--paper-deep); border-radius: 12px; padding: 4px 18px 18px; }
.review-form summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--wine); }
.badge.approved { background: #dcefe0; color: var(--ok); }
.badge.rejected { background: #f4d9d1; color: var(--danger); }
.badge.pending { background: #fdeccd; color: #8a5a12; }

/* ---------- account gate / auth pages ---------- */
.login-box ul.muted { text-align: left; font-size: 0.9rem; }

@media (max-width: 720px) {
  .product-detail { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .main-nav a { margin-left: 0; margin-right: 14px; }
  .hero-content h1 { font-size: 2rem; }
  .hero { min-height: 380px; }
  .hero-badge { width: 104px; height: 104px; }
}
