@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;1,400;1,500&family=Lora:ital,wght@0,400;0,500;1,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --bg: #f0ece0;
  --page-bg: #faf7f0;
  --matcha: #6a9462;
  --matcha-deep: #4a7042;
  --matcha-light: #a8c89e;
  --matcha-pale: #ddecd7;
  --matcha-wash: #eef5eb;
  --gold: #c4924a;
  --gold-light: #e8c882;
  --cream: #f8f4ec;
  --stone: #8a8278;
  --border: rgba(106,148,98,0.2);
  --ink: #2e2a24;
  --modal-bg: rgba(30,26,20,0.55);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--page-bg);
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  /* Hide Scrollbar */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Hide Scrollbar Globals */
::-webkit-scrollbar { display: none; }
* { -ms-overflow-style: none; scrollbar-width: none; }

/* ---- TOP NAV ---- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(250,247,240,0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; flex-direction: column; }
.nav-eyebrow { font-size: 9px; font-weight: 500; letter-spacing: 4px; text-transform: uppercase; color: var(--matcha); }
.nav-title { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 500; font-style: italic; color: var(--matcha-deep); }
.cart-btn {
  position: relative;
  background: var(--matcha-deep);
  border: none;
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  padding: 10px 22px;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: flex; align-items: center; gap: 8px;
}
.cart-btn:hover { background: var(--matcha); transform: scale(1.03); }
.cart-count {
  background: var(--gold);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  display: none;
}
.cart-count.visible { display: flex; }

/* ---- HERO ---- */
.hero {
  text-align: center;
  padding: 56px 24px 32px;
  position: relative;
  overflow: hidden;
}
.hero-deco {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: 0.35;
  background:
    radial-gradient(circle at 15% 30%, rgba(106,148,98,0.18) 0%, transparent 50%),
    radial-gradient(circle at 85% 70%, rgba(196,146,74,0.12) 0%, transparent 50%);
}
.hero-eyebrow { font-size: 10px; font-weight: 500; letter-spacing: 5px; text-transform: uppercase; color: var(--matcha); margin-bottom: 6px; position: relative; z-index: 1; }
.hero-script { font-family: 'Playfair Display', serif; font-style: italic; font-size: 18px; color: var(--stone); position: relative; z-index: 1; }
.hero-title { font-family: 'Playfair Display', serif; font-size: 56px; font-weight: 500; color: var(--matcha-deep); letter-spacing: -1.5px; line-height: 1; text-transform: lowercase; position: relative; z-index: 1; }
.hero-title em { font-style: italic; color: var(--matcha); }
.h-divider { width: 56px; height: 1.5px; background: var(--matcha-light); margin: 10px auto; border-radius: 2px; }
.hero-sub { font-family: 'Lora', serif; font-style: italic; font-size: 14px; color: var(--stone); position: relative; z-index: 1; }

/* ---- TAB BAR ---- */
.tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 16px 24px 0;
}
.tab-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--stone);
  background: none;
  border: 1px solid transparent;
  border-radius: 30px;
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn:hover { color: var(--matcha); border-color: var(--matcha-light); }
.tab-btn.active {
  color: white;
  background: var(--matcha-deep);
  border-color: var(--matcha-deep);
}

/* ---- SECTION LABEL ---- */
.sec-row {
  display: flex; align-items: center; gap: 12px;
  padding: 28px 40px 8px;
}
.sec-label { font-size: 9px; font-weight: 500; letter-spacing: 3.5px; text-transform: uppercase; color: var(--matcha); white-space: nowrap; }
.sec-line { flex: 1; height: 1px; background: linear-gradient(to right, var(--matcha-light), transparent); }
.sec-size { font-size: 9px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--stone); padding-left: 8px; }

/* ---- DRINK GRID ---- */
.category-panel { display: none; }
.category-panel.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.drink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 8px 40px 40px;
}

.drink-card {
  background: var(--cream);
  border: 1px solid rgba(168,200,158,0.3);
  border-radius: 20px;
  padding: 20px 16px 16px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  position: relative;
  overflow: hidden;
}
.drink-card::before {
  content: '';
  position: absolute; inset: 0; border-radius: 20px;
  background: radial-gradient(circle at 60% 30%, rgba(106,148,98,0.07) 0%, transparent 70%);
}
.drink-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(74,112,66,0.14);
  border-color: var(--matcha-light);
}
.drink-card:hover .card-hint { opacity: 1; }

.card-svg { flex-shrink: 0; }
.card-body { text-align: center; }
.card-name { font-family: 'Lora', serif; font-size: 15px; font-weight: 500; color: var(--ink); line-height: 1.2; margin-bottom: 4px; }
.card-desc { font-size: 11px; font-weight: 300; color: var(--stone); line-height: 1.45; }
.tag-seasonal {
  display: inline-block; background: rgba(196,146,74,0.12); border: 1px solid rgba(196,146,74,0.3);
  color: var(--gold); font-size: 8px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 1px 6px; border-radius: 20px; margin-left: 4px; vertical-align: middle;
}
.card-hint {
  font-size: 10px; letter-spacing: 1px; text-transform: uppercase; font-weight: 500;
  color: var(--matcha); opacity: 0; transition: opacity 0.2s; margin-top: 2px;
}
.card-price { font-size: 13px; font-weight: 500; color: var(--matcha-deep); }

/* ---- FOOTER ---- */
.site-footer { text-align: center; font-family: 'Playfair Display', serif; font-style: italic; font-size: 14px; color: var(--matcha-light); padding: 24px 24px 40px; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: var(--modal-bg);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--page-bg);
  border-radius: 28px;
  max-width: 480px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  padding: 32px;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s;
  position: relative;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute; top: 18px; right: 18px;
  background: rgba(106,148,98,0.1); border: none; border-radius: 50%;
  width: 34px; height: 34px; font-size: 18px; color: var(--matcha-deep);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.modal-close:hover { background: rgba(106,148,98,0.2); }

.modal-header { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.modal-svg { flex-shrink: 0; }
.modal-info {}
.modal-name { font-family: 'Lora', serif; font-size: 22px; font-weight: 500; color: var(--ink); line-height: 1.2; margin-bottom: 4px; }
.modal-desc { font-size: 13px; font-weight: 300; color: var(--stone); line-height: 1.5; }
.modal-price { font-family: 'Playfair Display', serif; font-size: 16px; color: var(--gold); margin-top: 6px; }

.modal-divider { height: 1px; background: var(--border); margin: 18px 0; }

/* Sugar slider */
.section-label {
  font-size: 8.5px; font-weight: 500; letter-spacing: 4px; text-transform: uppercase;
  color: var(--matcha-deep); margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between;
}
.sugar-val { font-family: 'Playfair Display', serif; font-size: 20px; color: var(--matcha-deep); }

.sugar-slider-wrap { position: relative; padding: 4px 0 12px; }

input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px;
  background: linear-gradient(to right, var(--matcha-deep) 0%, var(--matcha-deep) var(--val, 30%), var(--matcha-pale) var(--val, 30%), var(--matcha-pale) 100%);
  border-radius: 6px; outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--matcha-deep);
  box-shadow: 0 2px 8px rgba(74,112,66,0.25);
  cursor: pointer; transition: transform 0.15s;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }

.sugar-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--stone); letter-spacing: 0.5px; margin-top: 4px; }

.sugar-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sugar-preset {
  font-size: 11px; color: var(--stone); background: none; border: 1px solid rgba(106,148,98,0.35);
  border-radius: 20px; padding: 4px 12px; cursor: pointer; transition: all 0.15s;
  font-family: 'Lora', serif; font-style: italic;
}
.sugar-preset:hover, .sugar-preset.active { background: var(--matcha-wash); border-color: var(--matcha); color: var(--matcha-deep); }

/* Toppings */
.toppings-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.topping-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--page-bg); border: 1px solid rgba(106,148,98,0.4); border-radius: 20px;
  font-family: 'Lora', serif; font-style: italic; font-size: 12px; color: var(--ink);
  padding: 6px 14px; cursor: pointer; transition: all 0.15s; user-select: none;
}
.topping-chip:hover { border-color: var(--matcha-light); background: var(--matcha-wash); }
.topping-chip.selected { background: var(--matcha-deep); border-color: var(--matcha-deep); color: white; }
.topping-chip .check { font-size: 12px; }

/* Milk */
.milk-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.milk-opt {
  background: var(--page-bg); border: 1px solid rgba(106,148,98,0.4); border-radius: 20px;
  font-family: 'Lora', serif; font-style: italic; font-size: 12px; color: var(--ink);
  padding: 6px 16px; cursor: pointer; transition: all 0.15s;
}
.milk-opt:hover { border-color: var(--matcha-light); background: var(--matcha-wash); }
.milk-opt.selected { background: var(--matcha-deep); border-color: var(--matcha-deep); color: white; }

/* Add to order */
.modal-footer { margin-top: 24px; display: flex; align-items: center; gap: 12px; }
.qty-control { display: flex; align-items: center; gap: 10px; }
.qty-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--matcha-light);
  background: none; font-size: 18px; color: var(--matcha-deep); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.qty-btn:hover { background: var(--matcha-wash); border-color: var(--matcha); }
.qty-num { font-family: 'Playfair Display', serif; font-size: 18px; color: var(--ink); min-width: 24px; text-align: center; }
.add-btn {
  flex: 1; background: var(--matcha-deep); color: white; border: none;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 1px;
  padding: 14px 24px; border-radius: 30px; cursor: pointer; transition: all 0.2s;
}
.add-btn:hover { background: var(--matcha); transform: scale(1.02); }

/* ============================================================
   CART DRAWER
   ============================================================ */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(30,26,20,0.45);
  z-index: 400;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 380px; max-width: 100vw;
  background: var(--page-bg);
  z-index: 401;
  transform: translateX(100%); transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  box-shadow: -8px 0 40px rgba(74,112,66,0.12);
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.cart-title { font-family: 'Playfair Display', serif; font-size: 22px; font-style: italic; color: var(--matcha-deep); }
.cart-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--stone); }

.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 12px; }

.cart-item {
  background: var(--cream); border: 1px solid rgba(168,200,158,0.25);
  border-radius: 16px; padding: 14px;
  display: flex; gap: 12px; align-items: flex-start;
}
.cart-item-icon { font-size: 28px; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-name { font-family: 'Lora', serif; font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 3px; }
.cart-item-detail { font-size: 11px; color: var(--stone); line-height: 1.5; }
.cart-item-price { font-size: 13px; font-weight: 500; color: var(--matcha-deep); margin-top: 4px; }
.cart-item-remove { background: none; border: none; color: var(--stone); cursor: pointer; font-size: 16px; padding: 2px 4px; transition: color 0.15s; }
.cart-item-remove:hover { color: #c04040; }

.cart-empty { text-align: center; padding: 48px 24px; color: var(--stone); }
.cart-empty .empty-icon { font-size: 48px; margin-bottom: 12px; }
.cart-empty p { font-family: 'Lora', serif; font-style: italic; font-size: 15px; }

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cart-total-label { font-size: 11px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--stone); }
.cart-total-val { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--matcha-deep); }

.place-order-btn {
  width: 100%; background: var(--matcha-deep); color: white; border: none;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 16px; border-radius: 30px; cursor: pointer; transition: all 0.2s;
}
.place-order-btn:hover { background: var(--matcha); }
.place-order-btn:disabled { background: var(--matcha-light); cursor: not-allowed; }

/* ============================================================
   ORDER CONFIRMATION
   ============================================================ */
.confirm-overlay {
  position: fixed; inset: 0; background: var(--modal-bg);
  backdrop-filter: blur(8px); z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.confirm-overlay.open { opacity: 1; pointer-events: all; }
.confirm-box {
  background: var(--page-bg); border-radius: 28px; padding: 48px 36px; text-align: center;
  max-width: 380px; width: 100%;
  transform: scale(0.9); transition: transform 0.3s;
}
.confirm-overlay.open .confirm-box { transform: scale(1); }
.confirm-icon { font-size: 56px; margin-bottom: 16px; animation: bounce 0.6s ease; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-16px); } }
.confirm-title { font-family: 'Playfair Display', serif; font-size: 28px; font-style: italic; color: var(--matcha-deep); margin-bottom: 8px; }
.confirm-sub { font-size: 14px; color: var(--stone); margin-bottom: 28px; font-family: 'Lora', serif; font-style: italic; }
.confirm-close-btn {
  background: var(--matcha-deep); color: white; border: none;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 1px;
  padding: 14px 36px; border-radius: 30px; cursor: pointer; transition: background 0.2s;
}
.confirm-close-btn:hover { background: var(--matcha); }

/* ---- TOAST ---- */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--matcha-deep); color: white;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  padding: 12px 24px; border-radius: 30px;
  box-shadow: 0 8px 24px rgba(74,112,66,0.3);
  z-index: 600; transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

.site-footer { text-align: center; font-family: 'Playfair Display', serif; font-style: italic; font-size: 14px; color: var(--matcha-light); padding: 24px 24px 40px; }

/* ---- MASCOT PEEK ---- */
.mascot-peek {
  position: fixed;
  bottom: 0px;
  right: 0px; /* Aligned box edge with viewport edge */
  width: 300px;
  height: 300px;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.mascot-peek img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 50%; /* Perfect zoom on the bear's head */
  opacity: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.12));
  animation: bearPeek 2.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes bearPeek {
  0% { transform: translateY(100%) rotate(10deg); opacity: 0; }
  100% { transform: translateY(0) rotate(0deg); opacity: 0.95; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .drink-grid { grid-template-columns: 1fr 1fr; padding: 8px 20px 32px; gap: 12px; }
  .hero-title { font-size: 40px; }
  .sec-row { padding: 20px 20px 8px; }
  .cart-drawer { width: 100%; }
  .mascot-peek { width: 140px; height: 140px; right: -15px; }
}
