:root {
  --bg: #f4f0ea;
  --bg-2: #ebe4d8;
  --surface: #fffcf8;
  --ink: #161412;
  --ink-soft: #3d3832;
  --muted: #7a736a;
  --line: rgba(22, 20, 18, 0.1);
  --accent: #8a3d24;
  --accent-2: #c4a574;
  --accent-dark: #6e2e1a;
  --success: #2f6b4f;
  --danger: #a33b32;
  --shadow: 0 18px 50px rgba(22, 20, 18, 0.08);
  --radius: 18px;
  --header: 76px;
  --max: 1240px;
  --font: "DM Sans", system-ui, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; margin: 0; line-height: 1.15; }
p { margin: 0; }

.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.muted { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 13px 22px; font-weight: 600; letter-spacing: 0.02em;
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); color: #f7f1e8; }
.btn-primary:hover { background: var(--accent); }
.btn-accent { background: var(--accent); color: #fff7f2; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-line { background: transparent; border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #f7f1e8; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 14px; font-size: 13px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; position: relative;
  transition: border-color .2s, transform .2s var(--ease);
}
.icon-btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.badge-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}

/* Promo + header */
.promo-bar {
  background: var(--ink); color: #f3eadc; font-size: 13px; letter-spacing: 0.08em;
  text-align: center; padding: 10px 16px; text-transform: uppercase;
}
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 240, 234, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header); display: flex; align-items: center; gap: 28px;
}
.logo {
  font-family: var(--serif); font-size: 30px; letter-spacing: 0.12em;
  font-weight: 600; flex: none;
}
.nav-links { display: flex; gap: 22px; flex: 1; }
.nav-links a { font-size: 14px; color: var(--ink-soft); position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after,
.nav-links a:hover::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 1px; background: var(--accent);
}
.header-search { flex: 1; max-width: 420px; position: relative; }
.header-search input {
  width: 100%; height: 44px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); padding: 0 18px 0 42px; outline: none;
}
.header-search input:focus { border-color: var(--ink); }
.header-search svg { position: absolute; left: 14px; top: 12px; opacity: 0.55; }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); display: none; overflow: hidden; z-index: 20;
}
.search-results.open { display: block; }
.search-hit {
  display: flex; gap: 12px; align-items: center; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.search-hit:hover { background: var(--bg-2); }
.search-hit img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; }
.header-actions { display: flex; gap: 8px; margin-left: auto; }
.menu-toggle { display: none; }
.mobile-drawer {
  display: none; position: fixed; inset: 0; z-index: 80; background: rgba(22,20,18,.45);
}
.mobile-drawer.open { display: block; }
.drawer-panel {
  width: min(340px, 88vw); height: 100%; background: var(--surface); padding: 24px;
  display: flex; flex-direction: column; gap: 18px; animation: slideIn .35s var(--ease);
}
.drawer-panel a { font-size: 18px; }

@keyframes slideIn { from { transform: translateX(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.reveal { animation: fadeUp .7s var(--ease) both; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .16s; } .d3 { animation-delay: .24s; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; min-height: 78vh;
  background: linear-gradient(120deg, #efe8dc 0%, #f7f1e8 48%, #e7d7c4 100%);
  overflow: hidden;
}
.hero-copy { padding: 72px 8vw 72px 0; display: flex; flex-direction: column; justify-content: center; }
.hero-copy .wrap { width: min(640px, 100%); margin: 0 0 0 auto; padding-left: 40px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.22em; font-size: 12px; color: var(--accent); font-weight: 700;
}
.hero h1 { font-size: clamp(48px, 6vw, 86px); margin: 14px 0 18px; }
.hero p { font-size: 18px; max-width: 46ch; color: var(--ink-soft); }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 28px; margin-top: 40px; }
.hero-meta strong { display: block; font-size: 22px; font-family: var(--serif); }
.hero-visual { position: relative; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; min-height: 520px; }
.hero-chip {
  position: absolute; bottom: 32px; left: 32px; background: rgba(255,252,248,.92);
  padding: 16px 18px; border-radius: 16px; box-shadow: var(--shadow); max-width: 240px;
}

/* Sections */
.section { padding: 88px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(32px, 4vw, 48px); }
.kicker { letter-spacing: 0.18em; text-transform: uppercase; font-size: 12px; color: var(--accent); font-weight: 700; margin-bottom: 8px; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

/* Cards */
.product-card {
  position: relative;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  border: 1px solid transparent; transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--line); }
.card-media { position: relative; aspect-ratio: 4/5; overflow: hidden; background: #e8dfd2; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.product-card:hover .card-media img { transform: scale(1.06); }
.pill {
  position: absolute; top: 14px; left: 14px; background: var(--surface);
  padding: 5px 10px; border-radius: 999px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
}
.wish {
  position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(255,252,248,.9); display: grid; place-items: center; font-size: 18px; z-index: 2;
}
.wish.on { color: var(--accent); }
.card-body { padding: 16px 16px 18px; }
.card-body h3 { font-size: 22px; margin-bottom: 6px; }
.price { display: flex; align-items: baseline; gap: 8px; font-weight: 700; }
.price s { color: var(--muted); font-weight: 500; font-size: 14px; }
.price .off { color: var(--accent); font-size: 12px; }
.stars { color: #d9c2a0; letter-spacing: 1px; }
.stars .on { color: #b8893a; }
.rating-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 6px 0 12px; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.cat-card {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 280px; color: #fff;
}
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.cat-card:hover img { transform: scale(1.08); }
.cat-card span {
  position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(16,12,9,.72));
  display: flex; flex-direction: column; justify-content: flex-end; padding: 22px;
}
.cat-card h3 { font-size: 32px; color: #fff; }

.offer-banner {
  display: grid; grid-template-columns: 1.2fr 1fr; background: var(--ink); color: #f4eadc; border-radius: 28px; overflow: hidden;
}
.offer-banner img { height: 100%; object-fit: cover; min-height: 320px; }
.offer-copy { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.offer-copy h2 { font-size: 48px; color: #fff; margin: 10px 0 14px; }

.review-card {
  background: var(--surface); border-radius: var(--radius); padding: 28px; min-height: 240px;
  display: flex; flex-direction: column; gap: 14px;
}
.review-card footer { margin-top: auto; display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--bg-2);
  display: grid; place-items: center; font-family: var(--serif); font-size: 20px;
}

.newsletter {
  background: linear-gradient(135deg, #1c1814, #3a2a22);
  color: #f6ecdf; border-radius: 28px; padding: 56px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center;
}
.newsletter h2 { font-size: 42px; color: #fff; }
.newsletter form { display: flex; gap: 8px; }
.newsletter input {
  flex: 1; height: 52px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08); padding: 0 18px; color: #fff; outline: none;
}

/* Footer */
.site-footer { background: #141210; color: #d9cfc2; padding: 64px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.site-footer h4 { color: #fff; font-size: 20px; margin-bottom: 14px; }
.site-footer a { display: block; color: #cbbba8; margin: 8px 0; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15);
  display: grid; place-items: center; margin: 0;
}
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px; display: flex; justify-content: space-between; font-size: 13px; color: #9c9083; }

/* Shop layout */
.page-hero { padding: 48px 0 12px; }
.page-hero h1 { font-size: clamp(40px, 6vw, 64px); }
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding-bottom: 80px; }
.filter-card { background: var(--surface); border-radius: var(--radius); padding: 22px; position: sticky; top: 96px; }
.filter-card h3 { font-size: 22px; margin: 18px 0 10px; }
.filter-card label { display: flex; gap: 8px; align-items: center; margin: 8px 0; font-size: 14px; cursor: pointer; }
.filter-card input[type="number"], .filter-card select, .field input, .field select, .field textarea {
  width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; padding: 0 12px; outline: none;
}
.field textarea { height: 110px; padding: 12px; resize: vertical; }
.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Product detail */
.pdp { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; padding: 40px 0 80px; }
.gallery-main { border-radius: 24px; overflow: hidden; background: #e8dfd2; aspect-ratio: 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumbs button { width: 76px; height: 76px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: none; }
.thumbs button.active, .thumbs button:hover { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.qty {
  display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff;
}
.qty button { width: 40px; height: 42px; border: 0; background: transparent; font-size: 18px; }
.qty span { min-width: 28px; text-align: center; font-weight: 600; }
.pdp-actions { display: flex; gap: 10px; margin: 22px 0; flex-wrap: wrap; }
.specs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.specs span { background: var(--bg-2); padding: 8px 12px; border-radius: 999px; font-size: 13px; }

/* Cart / checkout */
.table-like { display: flex; flex-direction: column; gap: 14px; }
.cart-row, .summary-card, .auth-card, .dash-card {
  background: var(--surface); border-radius: var(--radius); padding: 18px;
}
.cart-row { display: grid; grid-template-columns: 92px 1fr auto auto; gap: 16px; align-items: center; }
.cart-row img { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; }
.summary-card { position: sticky; top: 96px; }
.line { display: flex; justify-content: space-between; margin: 8px 0; color: var(--ink-soft); }
.line.total { color: var(--ink); font-size: 20px; font-family: var(--serif); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.checkout-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; padding-bottom: 80px; }
.pay-options { display: grid; gap: 10px; }
.pay-options label, .ship-options label {
  display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; cursor: pointer;
}
.pay-options label:has(input:checked), .ship-options label:has(input:checked) { border-color: var(--ink); background: #f8f1e8; }
.field { margin-bottom: 14px; }
.field span { display: block; font-size: 13px; margin-bottom: 6px; color: var(--muted); }

/* Auth */
.auth-shell { min-height: 70vh; display: grid; place-items: center; padding: 48px 20px; }
.auth-card { width: min(460px, 100%); padding: 36px; }
.auth-card h1 { font-size: 40px; margin: 8px 0 18px; }
.demo-note { background: var(--bg-2); border-radius: 12px; padding: 12px 14px; font-size: 13px; margin-bottom: 18px; }

/* Account */
.dash-grid { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding-bottom: 80px; }
.side-nav { background: var(--surface); border-radius: var(--radius); padding: 12px; height: fit-content; position: sticky; top: 96px; }
.side-nav a, .side-nav button {
  display: block; width: 100%; text-align: left; background: none; border: 0; padding: 12px 14px; border-radius: 12px; color: var(--ink-soft);
}
.side-nav a.active, .side-nav button.active, .side-nav a:hover, .side-nav button:hover { background: var(--bg-2); color: var(--ink); }
.order-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.status { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.status.delivered { color: var(--success); }
.status.shipped { color: #355f8a; }
.status.processing { color: var(--accent); }

/* Admin */
.admin-app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: #11110f; color: #efe8dc; }
.admin-side { padding: 24px 16px; border-right: 1px solid rgba(255,255,255,.08); }
.admin-side a, .admin-side button {
  display: block; width: 100%; text-align: left; background: none; border: 0; color: #cfc3b3; padding: 12px 14px; border-radius: 10px;
}
.admin-side a.active, .admin-side button.active, .admin-side a:hover, .admin-side button:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-main { background: #f4f0ea; color: var(--ink); padding: 28px; overflow: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 28px; }
.stat { background: #fff; border-radius: 16px; padding: 18px; }
.stat b { display: block; font-size: 28px; font-family: var(--serif); margin-top: 6px; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.data-table th { background: #f7f1e8; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.admin-toolbar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 16px; align-items: center; }
.modal-back {
  position: fixed; inset: 0; background: rgba(16,12,9,.5); display: none; place-items: center; z-index: 90; padding: 20px;
}
.modal-back.open { display: grid; }
.modal { background: #fff; width: min(640px, 100%); border-radius: 20px; padding: 24px; max-height: 90vh; overflow: auto; }
.bars { display: flex; align-items: flex-end; gap: 12px; height: 180px; padding: 12px 0; }
.bars div { flex: 1; background: linear-gradient(180deg, var(--accent), #d7b48a); border-radius: 10px 10px 4px 4px; position: relative; min-height: 8px; }
.bars span { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--muted); }

/* Toast */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--ink); color: #f6ecdf; padding: 12px 16px; border-radius: 12px;
  box-shadow: var(--shadow); animation: fadeUp .35s var(--ease);
}

.empty { text-align: center; padding: 60px 20px; background: var(--surface); border-radius: var(--radius); }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 4px 0 10px; }
.success-banner { background: #e7f3ea; color: var(--success); padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.hidden { display: none !important; }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.breadcrumbs a:hover { color: var(--ink); }

@media (max-width: 980px) {
  .hero, .offer-banner, .newsletter, .pdp, .shop-layout, .checkout-grid, .dash-grid, .grid-4, .grid-3, .admin-app, .footer-grid, .stat-grid {
    grid-template-columns: 1fr;
  }
  .nav-links { display: none; }
  .menu-toggle { display: grid; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0 14px; }
  .header-search { max-width: none; width: 100%; flex: 1 1 100%; order: 5; }
  .hero-copy .wrap { margin: 0; padding: 48px 24px; }
  .section { padding: 56px 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 72px 1fr; }
  .newsletter form { flex-direction: column; }
  .filter-card { position: static; }
}
@media (max-width: 640px) {
  .wrap { width: min(var(--max), calc(100% - 28px)); }
  .card-actions, .pdp-actions { grid-template-columns: 1fr; display: grid; }
  .hero-actions { flex-direction: column; align-items: stretch; }
}
