@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #1C1410;
  --bg-panel: #241A14;
  --bg-panel-raised: #2C2019;
  --cream: #EFE6D8;
  --cream-dim: #C9BCA9;
  --tan: #B5794B;
  --tan-bright: #D6A56D;
  --brass: #C9A227;
  --oxblood: #8A3324;
  --line: rgba(239, 230, 216, 0.14);
  --radius: 3px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

a { color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(28, 20, 16, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--brass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--brass);
  flex-shrink: 0;
}

.brand-name {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--cream);
  line-height: 1;
}

.brand-sub {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--tan-bright);
  text-transform: uppercase;
  margin-top: 3px;
}

.cart-btn {
  position: relative;
  background: none;
  border: 1px solid var(--line);
  color: var(--cream);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.cart-btn:hover { border-color: var(--tan); }

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--oxblood);
  color: var(--cream);
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 90px 32px 70px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at top, rgba(197, 149, 89, 0.10), transparent 60%);
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tan-bright);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(34px, 5.5vw, 64px);
  line-height: 1.08;
  max-width: 820px;
  margin: 0 auto;
  color: var(--cream);
}

.hero h1 em {
  font-style: italic;
  color: var(--tan-bright);
}

.hero p {
  max-width: 480px;
  margin: 22px auto 0;
  color: var(--cream-dim);
  font-size: 15.5px;
  line-height: 1.6;
}

/* ---------- Category tabs (styled like tag loops) ---------- */
.category-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 28px 32px;
  border-bottom: 1px solid var(--line);
}

.category-tab {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  color: var(--cream-dim);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.category-tab:hover { color: var(--cream); border-color: var(--tan); }
.category-tab.active {
  background: var(--tan);
  border-color: var(--tan);
  color: #201206;
  font-weight: 500;
}

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 26px;
  padding: 44px 32px 90px;
  max-width: 1280px;
  margin: 0 auto;
}

.product-card {
  background: var(--bg-panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--tan);
}

.product-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2px;
  background: var(--bg-panel-raised);
  display: block;
}

.product-info { padding: 14px 4px 4px; }

.product-category {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tan-bright);
  margin-bottom: 6px;
}

.product-name {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 8px;
}

.product-price {
  color: var(--brass);
  font-size: 15px;
  font-weight: 600;
}

.product-stock-low {
  color: var(--tan-bright);
  font-size: 11.5px;
  margin-top: 4px;
}
.product-stock-out {
  color: #8a7a6a;
  font-size: 11.5px;
  margin-top: 4px;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--cream-dim);
}

/* ---------- Cart drawer ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 4, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 90;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--bg-panel);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--cream-dim);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.cart-line {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cart-line img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}
.cart-line-info { flex: 1; }
.cart-line-name { font-size: 14px; margin-bottom: 4px; }
.cart-line-price { color: var(--brass); font-size: 13px; }
.qty-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.qty-controls button {
  width: 22px; height: 22px;
  background: var(--bg-panel-raised);
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 3px;
  cursor: pointer;
}
.remove-line {
  background: none;
  border: none;
  color: var(--cream-dim);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  align-self: flex-start;
}

.drawer-footer {
  padding: 22px 24px 26px;
  border-top: 1px solid var(--line);
}
.drawer-total {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  margin-bottom: 16px;
}
.drawer-total strong { color: var(--brass); font-family: 'Fraunces', serif; font-size: 20px; }

.btn-primary {
  width: 100%;
  background: var(--oxblood);
  color: var(--cream);
  border: none;
  padding: 14px;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-primary:hover { background: #a13d29; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Product modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 4, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 110;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 640px) { .modal { grid-template-columns: 1fr; } }

.modal img { width: 100%; height: 100%; object-fit: cover; min-height: 260px; }
.modal-body { padding: 30px; position: relative; }
.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none; border: none;
  color: var(--cream-dim);
  font-size: 22px;
  cursor: pointer;
}
.modal-body h2 { font-size: 24px; margin-bottom: 10px; }
.modal-desc { color: var(--cream-dim); font-size: 14px; line-height: 1.65; margin: 14px 0 22px; }
.modal-price { color: var(--brass); font-size: 22px; font-family: 'Fraunces', serif; margin-bottom: 20px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 32px;
  text-align: center;
  color: var(--cream-dim);
  font-size: 12.5px;
}
.site-footer a { color: var(--tan-bright); text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
