/* HoneyMe shared design system — used by every page (index.html, bakery.html,
   custom-cake.html, workshop.html). Palette/type matched against real
   screenshots of honeymebakery.com / honeymecake.com / honeymeworkshop.com
   (all Square Online sites): warm cream background, gold/mustard-brown
   accent (the circular "hm HONEYME" logo mark), soft blush for the cake
   ordering section, warm dark-brown body text. */

:root {
  --bg: #faf6ee;
  --card: #ffffff;
  --text: #3a2f22;
  --muted: #8a7a63;
  --border: #ece1cd;
  --accent: #a3841c;
  --accent-dark: #7d6516;
  --accent-light: #c8863a;
  --blush-bg: #faf1ee;
  --blush-border: #f0dcd6;
  --good: #4a8f3c;
  --danger: #b3452f;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #221c14;
    --card: #2c241a;
    --text: #f1ebe0;
    --muted: #b8a98d;
    --border: #453a2a;
    --accent: #e0b84a;
    --accent-dark: #f0cc6e;
    --accent-light: #e2a463;
    --blush-bg: #2e2320;
    --blush-border: #4a352f;
    --good: #6cc96f;
    --danger: #d9705a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
h1, h2, h3 { font-family: "Fredoka", "Poppins", sans-serif; text-wrap: balance; margin: 0 0 8px; }
a { color: var(--accent-dark); }
img { max-width: 100%; display: block; }

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

/* ---------- header / nav ---------- */
.site-header {
  background: var(--card); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px; gap: 20px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.logo-badge {
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.68rem; text-align: center; line-height: 1.1;
  font-family: "Fredoka", sans-serif;
}
.logo-text { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.05rem; }
.logo-text small { display: block; font-size: 0.6rem; letter-spacing: 0.12em; color: var(--muted); font-weight: 500; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none; color: var(--text); font-size: 0.88rem; font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a.active { color: var(--accent-dark); border-color: var(--accent-light); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 360px; display: flex; align-items: center;
  background-size: cover; background-position: center; color: #fff;
  border-radius: 0 0 28px 28px; overflow: hidden;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(40,28,10,0.62), rgba(40,28,10,0.15)); }
.hero-content { position: relative; padding: 48px 20px; max-width: 560px; }
.hero-content h1 { font-size: 2.2rem; margin-bottom: 10px; }
.hero-content p { font-size: 1rem; opacity: 0.95; margin: 0 0 20px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600;
  font-size: 0.88rem; padding: 10px 20px; border-radius: 999px; border: none;
  cursor: pointer; text-decoration: none; transition: transform 0.1s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid #fff; }
.btn-outline.dark { color: var(--text); border-color: var(--border); }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- section framing ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.5rem; }
.section-head .sub { color: var(--muted); font-size: 0.9rem; }

/* ---------- category / feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  overflow: hidden; text-decoration: none; color: var(--text); display: flex; flex-direction: column;
}
.feature-card img { aspect-ratio: 4/3; object-fit: cover; }
.feature-card .body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.feature-card h3 { font-size: 1.05rem; }
.feature-card p { color: var(--muted); font-size: 0.85rem; margin: 0; flex: 1; }

/* ---------- product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.product-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
}
.product-card .thumb { aspect-ratio: 1; object-fit: cover; background: var(--border); }
.product-card .body { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-card h4 { margin: 0; font-size: 0.9rem; line-height: 1.3; }
.product-card .price { font-weight: 700; color: var(--accent-dark); font-variant-numeric: tabular-nums; }
.product-card .btn { margin-top: auto; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.tab-btn {
  font: inherit; font-size: 0.84rem; padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer;
}
.tab-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 32px 0; color: var(--muted); font-size: 0.85rem; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

/* ---------- cart ---------- */
.cart-btn {
  position: relative; background: none; border: none; cursor: pointer;
  font-size: 1.25rem; padding: 4px 2px; color: var(--text); display: flex; align-items: center;
  line-height: 1;
}
.cart-badge {
  position: absolute; top: -4px; right: -8px; background: var(--accent); color: #fff;
  font-size: 0.62rem; font-weight: 700; border-radius: 999px; min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
  font-variant-numeric: tabular-nums; font-family: "Poppins", sans-serif;
}
.cart-badge[hidden] { display: none; }
.cart-overlay {
  position: fixed; inset: 0; background: rgba(20, 14, 6, 0.45); z-index: 40;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(400px, 100%);
  background: var(--card); z-index: 41; box-shadow: -12px 0 30px rgba(0, 0, 0, 0.18);
  transform: translateX(100%); transition: transform 0.25s ease;
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.cart-drawer-head h3 { margin: 0; font-size: 1.1rem; }
.cart-close { background: none; border: none; font-size: 1.15rem; cursor: pointer; color: var(--muted); }
.cart-items { flex: 1; overflow-y: auto; padding: 6px 22px; }
.cart-line { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-info .name { font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.cart-line-info .note { font-size: 0.76rem; color: var(--muted); margin-bottom: 8px; }
.cart-line-controls { display: flex; align-items: center; gap: 10px; }
.cart-qty-btn {
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); cursor: pointer; font: inherit; line-height: 1;
}
.cart-line-price { font-weight: 600; color: var(--accent-dark); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart-remove { background: none; border: none; color: var(--danger); font-size: 0.76rem; cursor: pointer; text-decoration: underline; padding: 0; }
.cart-empty { color: var(--muted); text-align: center; padding: 60px 16px; font-size: 0.9rem; }
.cart-footer { border-top: 1px solid var(--border); padding: 16px 22px 22px; }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 12px; font-size: 1.02rem; }
.cart-checkout-error { color: var(--danger); font-size: 0.82rem; margin-top: 8px; display: none; }
.cart-checkout-error.show { display: block; }

/* ---------- sold out ---------- */
.sold-out-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 600; color: #fff; background: var(--danger);
  border-radius: 999px; padding: 2px 10px; margin-bottom: 4px; width: fit-content;
}
.product-card.sold-out .thumb, .product-card.sold-out img { filter: grayscale(70%); opacity: 0.75; }
.product-card.sold-out .btn[disabled] { opacity: 0.6; }

/* ---------- misc ---------- */
.empty-note { color: var(--muted); font-size: 0.9rem; padding: 24px; text-align: center; }
.skeleton { background: linear-gradient(90deg, var(--border) 25%, var(--card) 50%, var(--border) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

@media (max-width: 720px) {
  .site-nav { display: none; }
  .hero-content h1 { font-size: 1.6rem; }
}
