@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

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

:root {
  --yellow: #FDE021;
  --yellow-dark: #E5C800;
  --yellow-light: #FFF3A0;
  --yellow-glow: rgba(253, 224, 33, 0.3);
  --brown: #582C03;
  --brown-light: #7A3F05;
  --brown-lighter: #D4A574;
  --brown-pale: #F5E6D3;
  --cream: #FFFDF5;
  --cream-dark: #FFF8E1;
  --white: #FFFFFF;
  --gray: #F0EDE8;
  --text-dark: #2C1810;
  --text-med: #5C3D2E;
  --text-light: #8B6F5E;
  --green: #2ECC71;
  --red: #E74C3C;
  --shadow-sm: 0 2px 8px rgba(88,44,3,0.08);
  --shadow-md: 0 4px 20px rgba(88,44,3,0.12);
  --shadow-lg: 0 8px 40px rgba(88,44,3,0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brown);
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--yellow);
}

.header-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 0.5px;
}

.header-hours {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(253,224,33,0.15);
  padding: 6px 14px;
  border-radius: 20px;
  color: var(--yellow-light);
  font-size: 0.8rem;
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-btn {
  position: relative;
  background: var(--yellow);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: var(--transition);
  box-shadow: 0 2px 12px var(--yellow-glow);
}

.cart-btn:hover { transform: scale(1.1); }

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--red);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition);
}

.cart-badge.show {
  opacity: 1;
  transform: scale(1);
}

.cart-badge.bounce {
  animation: bounce 0.4s ease;
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}

/* ===== HERO ===== */
.hero {
  position: relative;
  height: 340px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('assets/hero.png') center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(88,44,3,0.85) 0%, rgba(88,44,3,0.6) 50%, rgba(88,44,3,0.8) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  padding: 20px;
}

.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 800;
  color: var(--yellow);
  margin-bottom: 8px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--brown-pale);
  font-weight: 300;
  max-width: 500px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-radius: 30px;
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

/* ===== DATE BAR ===== */
.date-bar {
  background: var(--cream-dark);
  border-bottom: 1px solid rgba(88,44,3,0.08);
  padding: 12px 24px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-med);
  font-weight: 500;
}

.date-bar span {
  color: var(--brown);
  font-weight: 600;
}

/* ===== PRODUCTS SECTION ===== */
.products-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.section-title {
  text-align: center;
  margin-bottom: 28px;
}

.section-title h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--brown);
  margin-bottom: 4px;
}

.section-title p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* ===== PRODUCT CARD ===== */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  animation: fadeUp 0.5s ease both;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-card.sold-out {
  opacity: 0.55;
  filter: grayscale(0.3);
}

.product-card.sold-out:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

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

.product-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--gray);
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-badge.ready {
  background: var(--green);
  color: white;
}

.product-badge.habis {
  background: var(--red);
  color: white;
}

.product-info {
  padding: 16px;
}

.product-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.product-price {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brown);
  margin-bottom: 4px;
}

.product-note {
  font-size: 0.75rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 10px;
}

.add-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.add-btn.active {
  background: var(--yellow);
  color: var(--brown);
}

.add-btn.active:hover {
  background: var(--yellow-dark);
  transform: scale(1.02);
}

.add-btn.disabled {
  background: var(--gray);
  color: var(--text-light);
  cursor: not-allowed;
}

/* ===== OVERLAY ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ===== CART SIDEBAR ===== */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 100%;
  height: 100vh;
  background: var(--white);
  z-index: 300;
  transform: translateX(100%);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 30px rgba(0,0,0,0.15);
}

.cart-sidebar.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray);
  background: var(--brown);
  color: var(--yellow);
}

.cart-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
}

.cart-close {
  background: rgba(253,224,33,0.2);
  border: none;
  color: var(--yellow);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}

.cart-close:hover { background: rgba(253,224,33,0.3); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--text-light);
}

.cart-empty .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray);
  animation: fadeUp 0.3s ease;
}

.cart-item-img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.cart-item-price {
  font-size: 0.8rem;
  color: var(--text-med);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border: 2px solid var(--gray);
  border-radius: 8px;
  background: white;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brown);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.qty-btn:hover {
  border-color: var(--yellow);
  background: var(--yellow-light);
}

.qty-num {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-footer {
  border-top: 2px solid var(--gray);
  padding: 20px 24px;
  background: var(--cream);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-total-label {
  font-weight: 600;
  color: var(--text-med);
}

.cart-total-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brown);
}

.checkout-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--yellow);
  color: var(--brown);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.checkout-btn:hover {
  background: var(--yellow-dark);
  transform: scale(1.02);
}

.checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ===== ORDER MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9) translateY(20px);
  transition: var(--transition);
}

.modal.show .modal-content {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--brown);
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--yellow);
}

.modal-close {
  background: rgba(253,224,33,0.2);
  border: none;
  color: var(--yellow);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover { background: rgba(253,224,33,0.3); }

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: var(--text-dark);
  transition: var(--transition);
  background: var(--white);
}

.form-input:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-glow);
}

.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: var(--text-dark);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235C3D2E' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.form-select:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-glow);
}

.radio-group {
  display: flex;
  gap: 10px;
}

.radio-option {
  flex: 1;
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  border: 2px solid var(--gray);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-med);
}

.radio-label .radio-icon {
  font-size: 1.4rem;
}

.radio-option input:checked + .radio-label {
  border-color: var(--yellow);
  background: var(--cream-dark);
  color: var(--brown);
  font-weight: 600;
  box-shadow: 0 0 0 3px var(--yellow-glow);
}

.form-group.hidden {
  display: none;
}

.submit-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brown) 0%, var(--brown-light) 100%);
  color: var(--yellow);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.submit-btn:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

/* ===== QRIS MODAL ===== */
.qris-modal-content {
  max-width: 420px;
}

.qris-body {
  text-align: center;
}

.qris-amount {
  background: var(--cream-dark);
  border: 2px solid var(--yellow);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qris-amount span {
  font-size: 0.9rem;
  color: var(--text-med);
  font-weight: 500;
}

.qris-amount strong {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--brown);
}

.qris-img-wrap {
  background: var(--white);
  border: 2px solid var(--gray);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  display: inline-block;
}

.qris-img {
  width: 260px;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.qris-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 4px;
}

/* ===== VARIANT PICKER ===== */
.variant-modal-content {
  max-width: 360px;
}

.variant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.variant-btn {
  padding: 10px 20px;
  border: 2px solid var(--gray);
  border-radius: 30px;
  background: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
}

.variant-btn:hover {
  border-color: var(--yellow);
  background: var(--cream-dark);
}

.variant-btn:active {
  transform: scale(0.95);
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--brown);
  font-weight: 600;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--brown);
  color: var(--yellow);
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 500;
  opacity: 0;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--brown);
  color: var(--brown-pale);
  text-align: center;
  padding: 32px 20px;
}

.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--yellow);
  margin-bottom: 8px;
}

.footer p {
  font-size: 0.8rem;
  color: var(--brown-lighter);
  margin-bottom: 4px;
}

.footer-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 20px;
  background: #25D366;
  color: white;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.footer-wa:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(37,211,102,0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header { padding: 0 16px; height: 60px; }
  .header-brand { font-size: 1.1rem; }
  .header-hours { display: none; }
  .hero { height: 260px; }
  .hero-content h1 { font-size: 2rem; }
  .hero-content p { font-size: 0.9rem; }
  .products-section { padding: 24px 16px 40px; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .product-img-wrap { height: 150px; }
  .product-info { padding: 12px; }
  .product-name { font-size: 0.9rem; }
  .product-price { font-size: 1rem; margin-bottom: 8px; }
  .cart-sidebar { width: 100%; }
  .modal-content { max-width: 100%; margin: 10px; }
  .radio-group { flex-direction: column; }
}

@media (max-width: 400px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-img-wrap { height: 130px; }
}
