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

:root {
  --bg:         #FFFFFF;
  --bg-panel:   #FFFFFF;
  --bg-raised:  #FFF7E6;
  --line:       #FFE0B2;
  --gold:       #FFB000;
  --gold-soft:  #FFD54F;
  --ember:      #FF4B00;
  --ember-soft: #FF7A33;
  --cream:      #172033;
  --muted:      #667085;
  --success:    #16A34A;
  --radius:     14px;
  --shadow:     0 8px 28px rgba(255, 120, 0, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: 'Manrope', system-ui, sans-serif;
  line-height: 1.5;
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Burst signature motif ---------- */
.burst {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(18,16,14,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo small {
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-weight: 700;
  display: block;
}
.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: color .15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-soft); }

.nav-actions { display: flex; align-items: center; gap: 16px; }
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--cream);
  transition: border-color .15s ease, transform .15s ease;
}
.icon-btn:hover { border-color: var(--gold); transform: translateY(-1px); }
.cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--ember);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.admin-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 999px;
  transition: border-color .15s ease;
}
.admin-link:hover { border-color: var(--gold); }

.hamburger { display: none; background: none; border: none; color: var(--cream); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--ember), var(--ember-soft));
  color: #fff5ea;
  box-shadow: 0 8px 20px rgba(200,73,44,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(200,73,44,0.45); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-gold {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold-soft);
}
.btn-gold:hover { background: rgba(216,171,82,0.1); }
.btn-ghost {
  background: var(--bg-raised);
  border-color: var(--line);
  color: var(--cream);
}
.btn-ghost:hover { border-color: var(--gold); }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: transparent; border-color: #7a3327; color: #e97a52; }
.btn-danger:hover { background: rgba(200,73,44,0.12); }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 70px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 700px 420px at 82% 10%, rgba(200,73,44,0.18), transparent 60%),
    radial-gradient(ellipse 600px 500px at 10% 100%, rgba(216,171,82,0.12), transparent 60%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}
.hero h1 {
  font-size: 56px;
  line-height: 1.04;
  color: var(--cream);
  animation: rise .7s ease both;
}
.hero h1 em { font-style: normal; color: var(--gold-soft); }
.hero p.tagline {
  margin-top: 18px;
  font-size: 18px;
  color: var(--muted);
  max-width: 480px;
  animation: rise .7s .1s ease both;
}
.hero-ctas { margin-top: 32px; display: flex; gap: 14px; animation: rise .7s .2s ease both; }
.hero-visual { animation: rise .8s .15s ease both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stat-row { display: flex; gap: 34px; margin-top: 40px; }
.stat-row .stat b { display: block; font-family: 'Fraunces', serif; font-size: 26px; color: var(--gold-soft); }
.stat-row .stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Sections ---------- */
section.section { padding: 64px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 30px; flex-wrap: wrap; gap: 14px; }
.section-head h2 { font-size: 32px; color: var(--cream); }

/* ---------- Category pills ---------- */
.category-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 34px; }
.category-pill {
  flex: 0 0 auto;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: all .15s ease;
}
.category-pill:hover { border-color: var(--gold); color: var(--gold-soft); }
.category-pill.active { background: var(--gold); border-color: var(--gold); color: #1c1712; }

/* ---------- Search / filter bar ---------- */
.filter-bar {
  display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; align-items: center;
}
.input, select.input {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--cream);
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
}
.input:focus, select.input:focus, textarea.input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.search-wrap { position: relative; flex: 1; min-width: 220px; }
.search-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-wrap input { width: 100%; padding-left: 40px; }

/* ---------- Product grid / card ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}
.product-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  animation: rise .5s ease both;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--shadow); }
.product-media {
  aspect-ratio: 4/3;
  background: linear-gradient(160deg, var(--bg-raised), #17130e);
  display: flex; align-items: center; justify-content: center;
  font-size: 42px;
  position: relative;
}
.badge-discount {
  position: absolute; top: 10px; left: 10px;
  background: var(--ember); color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 4px 9px; border-radius: 999px;
}
.badge-oos {
  position: absolute; inset: 0;
  background: rgba(18,16,14,0.72);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-soft); font-weight: 700; font-size: 13px; letter-spacing: .06em;
  text-transform: uppercase;
}
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-cat { font-size: 11px; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.product-name { font-family: 'Fraunces', serif; font-size: 17px; color: var(--cream); }
.product-desc { font-size: 13px; color: var(--muted); flex: 1; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.price-sell { font-size: 19px; font-weight: 800; color: var(--gold-soft); }
.price-orig { font-size: 13px; color: var(--muted); text-decoration: line-through; }

.qty-stepper {
  display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.qty-stepper button {
  background: var(--bg-raised); border: none; color: var(--cream); width: 32px; height: 32px; font-size: 16px;
}
.qty-stepper button:hover { background: #2a2216; }
.qty-stepper span { width: 32px; text-align: center; font-weight: 700; font-size: 14px; }

.add-cart-row { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-state .burst-icon { color: var(--gold); margin-bottom: 14px; }
.empty-state h3 { color: var(--cream); margin-bottom: 8px; font-size: 22px; }

/* ---------- Modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(10,8,6,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px; animation: fadeIn .18s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
  max-width: 560px; width: 100%; max-height: 88vh; overflow-y: auto;
  animation: rise .22s ease both; box-shadow: var(--shadow);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 22px; }
.modal-close { background: none; border: none; color: var(--muted); }
.modal-close:hover { color: var(--cream); }

/* ---------- Cart page ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.cart-line {
  display: grid; grid-template-columns: 64px 1fr auto auto auto; gap: 14px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.cart-thumb {
  width: 64px; height: 64px; border-radius: 10px; background: var(--bg-raised);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.summary-card {
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  position: sticky; top: 90px;
}
.summary-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.summary-total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; color: var(--gold-soft); margin: 16px 0; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 7px; }
.form-group textarea.input { width: 100%; min-height: 90px; resize: vertical; font-family: inherit; }
.form-group input.input { width: 100%; }
.field-error { color: var(--ember-soft); font-size: 12px; margin-top: 6px; }
.form-group.has-error input, .form-group.has-error textarea { border-color: var(--ember); }

/* ---------- Steps ---------- */
.step-row { display: flex; gap: 8px; margin-bottom: 32px; }
.step-pill {
  flex: 1; text-align: center; padding: 10px; border-radius: 10px; font-size: 12px; font-weight: 700;
  background: var(--bg-raised); color: var(--muted); border: 1px solid var(--line);
}
.step-pill.active { background: var(--gold); color: #1c1712; border-color: var(--gold); }
.step-pill.done { color: var(--success); border-color: var(--success); }

/* ---------- Order summary table ---------- */
.order-table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.order-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); }
.order-table td { padding: 10px 6px; border-bottom: 1px solid var(--line); font-size: 14px; }

/* ---------- Success page ---------- */
.success-wrap { text-align: center; padding: 90px 20px; max-width: 560px; margin: 0 auto; }
.success-icon { color: var(--success); margin-bottom: 18px; }
.order-id-chip {
  display: inline-block; margin-top: 14px; padding: 10px 22px; border-radius: 999px;
  background: var(--bg-raised); border: 1px solid var(--gold); color: var(--gold-soft); font-weight: 800; letter-spacing: .04em;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 60px; color: var(--muted); font-size: 13px; }
.site-footer .foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-raised); border: 1px solid var(--gold); color: var(--cream);
  padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 200;
  display: flex; align-items: center; gap: 8px;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 38px; }
  .cart-layout { grid-template-columns: 1fr; }
  .summary-card { position: static; }
}
@media (max-width: 720px) {
  .nav-links { position: fixed; top: 68px; left: 0; right: 0; background: var(--bg-panel); flex-direction: column;
    padding: 18px 20px; gap: 16px; border-bottom: 1px solid var(--line); transform: translateY(-130%); transition: transform .2s ease; }
  .nav-links.open { transform: translateY(0); }
  .hamburger { display: block; }
  .admin-link span { display: none; }
  .cart-line { grid-template-columns: 48px 1fr; grid-template-areas: "thumb name" "thumb price" "thumb qty"; row-gap: 6px; }
}

/* =====================================================================
   FESTIVE THEME + MOBILE-FIRST POLISH (override layer)
   ===================================================================== */
:root {
  --bg:        #FFFBF4;
  --bg-raised: #FFF1D6;
  --line:      #F3D9A8;
  --maroon:    #2b0a0a;
  --maroon-2:  #4a1010;
  --price:     #C2410C;
  --gold-dark: #B45309;
  --shadow:    0 10px 30px rgba(194, 65, 12, 0.14);
}
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { background: var(--bg); padding-bottom: env(safe-area-inset-bottom, 0); }
a, button { -webkit-tap-highlight-color: transparent; }

/* ---------- Header (dark maroon) ---------- */
.site-header { background: rgba(43,10,10,0.96); border-bottom: 2px solid var(--gold); }
.site-header .logo { color: var(--gold-soft); }
.site-header .logo small { color: #d9b98a; }
.nav-links a { color: #f3dcb8; }
.nav-links a:hover, .nav-links a.active { color: var(--gold-soft); }
.site-header .icon-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.site-header .admin-link { color: var(--gold-soft); border-color: rgba(255,255,255,.25); }
.hamburger { color: #fff; width: 44px; height: 44px; align-items: center; justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse 600px 380px at 85% 0%, rgba(255,75,0,0.35), transparent 60%),
    radial-gradient(ellipse 500px 400px at 5% 100%, rgba(255,176,0,0.22), transparent 60%),
    linear-gradient(160deg, var(--maroon), var(--maroon-2));
  border-bottom: 3px solid var(--gold);
  color: #fff;
}
.hero h1 { color: #fff; }
.hero h1 em { color: var(--gold-soft); }
.hero p.tagline { color: #f1d9b5; }
.hero .stat-row .stat span { color: #e6c99a; }
.hero .btn-gold { color: var(--gold-soft); border-color: var(--gold-soft); }
.hero .btn-gold:hover { background: rgba(255,213,79,.12); }
.eyebrow { color: var(--gold-soft); }

/* ---------- Readable text colours on light backgrounds ---------- */
.price-sell, .summary-total, .order-id-chip { color: var(--price); }
.js-cart-subtotal { color: var(--price) !important; }
.product-cat { color: var(--gold-dark); }
.btn-gold { color: var(--gold-dark); border-color: var(--gold); }
.btn-gold:hover { background: rgba(255,176,0,.14); }
.category-pill { background: #fff; color: #5b4636; }
.category-pill:hover { color: var(--gold-dark); }
.category-pill.active { background: var(--ember); border-color: var(--ember); color: #fff; }
.section-head h2 { position: relative; padding-bottom: 10px; }
.section-head h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 54px; height: 4px;
  border-radius: 4px; background: linear-gradient(90deg, var(--ember), var(--gold));
}

/* ---------- Cards ---------- */
.product-card { background: #fff; }
.product-media { background: linear-gradient(160deg, #fff4dc, #ffe2b0); overflow: hidden; }
.product-media img { transition: transform .3s ease; }
.product-card:hover .product-media img { transform: scale(1.05); }
.badge-discount { background: linear-gradient(135deg, var(--ember), #ff8a00); box-shadow: 0 4px 10px rgba(255,75,0,.35); }
.badge-oos { background: rgba(43,10,10,.72); }
.qty-stepper { background: #fff; }
.qty-stepper button { background: var(--bg-raised); color: var(--cream); }
.qty-stepper button:hover, .qty-stepper button:active { background: #ffe0a8; }
.step-pill.active { background: var(--ember); border-color: var(--ember); color: #fff; }

/* ---------- Footer (dark) ---------- */
.site-footer { background: var(--maroon); color: #e6c99a; border-top: 3px solid var(--gold); margin-top: 60px; }

/* ---------- Products page filter bar ---------- */
.shop-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.shop-tools .search-wrap { flex: 1 1 240px; }
.shop-tools select.input { flex: 0 0 auto; }

/* ---------- Mobile floating cart bar ---------- */
.mobile-cart-bar { display: none; }

/* ---------- Tables never break the layout ---------- */
.order-table { display: block; overflow-x: auto; white-space: nowrap; }
.order-table thead, .order-table tbody { display: table; width: 100%; }

/* ---------- Tablet ---------- */
@media (max-width: 860px) {
  section.section { padding: 40px 0; }
  .hero { padding: 48px 0 40px; }
  .hero-visual { display: none; }
  .hero-ctas { flex-wrap: wrap; }
  .stat-row { gap: 22px; flex-wrap: wrap; }
  .section-head h2 { font-size: 26px; }
}

/* ---------- Phone ---------- */
@media (max-width: 720px) {
  .container { padding: 0 14px; }
  .site-header .bar { height: 60px; }
  .logo { font-size: 18px; }
  .logo small { display: none; }
  .nav-actions { gap: 10px; }
  .nav-links { top: 60px; background: var(--maroon); border-bottom: 2px solid var(--gold); }
  .nav-links a { color: #f3dcb8; font-size: 16px; padding: 6px 0; }
  .hamburger { display: inline-flex; }

  .hero h1 { font-size: 34px; }
  .hero p.tagline { font-size: 15px; }
  .hero-ctas .btn { flex: 1; justify-content: center; }
  .stat-row { margin-top: 28px; }
  .stat-row .stat b { font-size: 22px; }

  /* 2-column product grid */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-media { font-size: 34px; }
  .product-body { padding: 10px; gap: 5px; }
  .product-name { font-size: 14px; line-height: 1.25; }
  .product-desc { display: none; }
  .price-sell { font-size: 16px; }
  .price-orig { font-size: 12px; }
  .add-cart-row { flex-direction: column; gap: 8px; margin-top: 6px; }
  .add-cart-row .qty-stepper { width: 100%; justify-content: space-between; }
  .add-cart-row .btn { width: 100%; padding: 10px; }

  /* Bigger tap targets */
  .qty-stepper button { width: 42px; height: 40px; font-size: 18px; }
  .qty-stepper span { width: auto; flex: 1; min-width: 34px; }
  .btn { padding: 12px 20px; }
  .btn-sm { padding: 10px 14px; }

  /* Inputs: 16px stops iOS from zooming in */
  .input, select.input, textarea.input { font-size: 16px; padding: 12px 14px; }
  .shop-tools select.input { flex: 1 1 45%; }

  /* Cart line */
  .cart-line {
    grid-template-columns: 64px 1fr auto; grid-template-areas: none; gap: 8px 12px;
  }
  .cart-line .cart-thumb { grid-row: 1 / span 2; width: 64px; height: 64px; }
  .cart-line > :nth-child(2) { grid-column: 2 / 4; }
  .cart-line > :nth-child(3) { grid-column: 2; grid-row: 2; justify-self: start; }
  .cart-line > :nth-child(4) { grid-column: 3; grid-row: 2; text-align: right; }
  .cart-line > :nth-child(5) { grid-column: 3; grid-row: 1; justify-self: end; }

  /* Product details page */
  .step-pill { font-size: 11px; padding: 9px 4px; }
  .summary-card { padding: 16px; }

  /* Sticky "View Cart" bar */
  .mobile-cart-bar {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 60; display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, var(--ember), #ff8a00); color: #fff;
    padding: 14px 18px; border-radius: 999px; font-weight: 800; font-size: 15px;
    box-shadow: 0 10px 26px rgba(255,75,0,.45);
  }
  .mobile-cart-bar.is-empty { display: none; }
  body { padding-bottom: 84px; }
  #toast { bottom: 90px; max-width: 90vw; text-align: center; }
  .site-footer { padding: 28px 0; }
  .site-footer .foot-row { flex-direction: column; text-align: center; }
}
@media (max-width: 360px) {
  .product-grid { gap: 8px; }
  .hero h1 { font-size: 30px; }
}
