:root {
  --bg: #fff7ee;
  --paper: #ffffff;
  --ink: #2b1e12;
  --accent: #d2772a; /* warm caramel */
  --accent-dark: #a2581a;
  --muted: #7b5c45;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  position: relative;
}

.background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 25vh;
  /* background-image: url('./assets/background-hero.jpg'); */
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 1;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 480px) {
  .container {
    padding: 0 20px;
  }
}

/* Header */
.header { position: sticky; top: 0; z-index: 100; background: var(--paper); border-bottom: 1px solid #f1e6d8; }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__logo { width: 48px; height: 48px; object-fit: contain; border-radius: 999px; background: #fff3e3; border: 1px solid #f1e6d8; flex-shrink: 0; }

/* Cart Count Badge */
.cart-count {
  /* Base styles - display controlled by JavaScript via inline styles */
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  z-index: 10;
}
.brand__name { margin: 0; font-family: "Playfair Display", serif; font-weight: 700; font-size: 16px; letter-spacing: 0.2px; line-height: 1.2; }
.brand__tag { margin: 2px 0 0; color: var(--muted); font-size: 11px; display: none; }
.nav-toggle { display: flex; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 8px; z-index: 101; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: all 0.3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }
.nav { display: flex; gap: 0; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-top: 1px solid #f1e6d8; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.nav.active { max-height: 300px; padding: 16px 0; }
.nav a { text-decoration: none; color: var(--ink); padding: 12px 16px; font-weight: 500; display: block; border-bottom: 1px solid #f1e6d8; }
.nav a:last-child { border-bottom: none; }
.nav a:hover { color: var(--accent); background: #fff7ee; }

@media (min-width: 768px) {
  .brand__logo { width: 56px; height: 56px; }
  .brand__name { font-size: 20px; }
  .brand__tag { display: block; font-size: 12px; }
  .brand { gap: 14px; }
  .nav-toggle { display: none; }
  .nav { position: static; flex-direction: row; max-height: none; padding: 0; border: none; background: transparent; }
  .nav a { padding: 0; margin-left: 18px; border-bottom: none; display: inline; }
  .nav a:hover { background: transparent; }
}

@media (min-width: 1024px) {
  .brand__logo { width: 72px; height: 72px; }
  .brand__name { font-size: 22px; }
  .brand__tag { font-size: 13px; }
}

/* Hero */
.hero { background: radial-gradient(80% 80% at 20% 0%, #ffe7cc 0%, rgba(255,231,204,0) 60%), var(--bg); position: relative; z-index: 2; }
.hero__inner { padding-top: 32px; padding-bottom: 32px; }
.hero__content { max-width: 720px; }
.hero__title { font-family: "Playfair Display", serif; font-size: 28px; line-height: 1.2; margin: 0 0 12px; }
.hero__subtitle { margin: 0 0 20px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero__note { margin-top: 16px; color: var(--muted); font-size: 12px; }

@media (min-width: 480px) {
  .hero__inner { padding-top: 40px; padding-bottom: 40px; }
  .hero__title { font-size: 32px; }
  .hero__subtitle { font-size: 16px; }
}

@media (min-width: 768px) {
  .hero__inner { padding-top: 56px; padding-bottom: 56px; }
  .hero__title { font-size: 38px; }
  .hero__subtitle { font-size: 17px; }
  .hero__actions { gap: 12px; }
}

@media (min-width: 1024px) {
  .hero__title { font-size: 44px; }
  .hero__subtitle { font-size: 18px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 20px; border-radius: 10px; text-decoration: none; font-weight: 600; border: 1px solid transparent; font-size: 15px; min-height: 44px; touch-action: manipulation; transition: opacity 0.2s ease; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover, .btn--primary:active { background: var(--accent-dark); }
.btn--primary:disabled { opacity: 0.5; cursor: not-allowed; background: var(--accent); }
.btn--primary:disabled:hover { background: var(--accent); }
.btn--whatsapp { background: #25d366; color: #fff; }
.btn--whatsapp:hover, .btn--whatsapp:active { filter: brightness(0.95); }
.btn--thin { padding: 10px 14px; border-radius: 8px; font-size: 13px; min-height: 40px; }

@media (min-width: 480px) {
  .btn { padding: 12px 18px; font-size: 15px; }
  .btn--thin { padding: 8px 12px; font-size: 14px; }
}

/* Sections */
.section { padding: 40px 0; }
.section--alt { background: var(--paper); }
.section__title { font-family: "Playfair Display", serif; font-size: 24px; margin: 0 0 16px; }

@media (min-width: 480px) {
  .section { padding: 48px 0; }
  .section__title { font-size: 26px; }
}

@media (min-width: 768px) {
  .section { padding: 56px 0; }
  .section__title { font-size: 28px; margin: 0 0 18px; }
}

/* Grid & Cards */
.grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 480px) { .grid { gap: 18px; } }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: #fff; border: 1px solid #f1e6d8; border-radius: 14px; padding: 0; overflow: hidden; box-shadow: 0 4px 14px rgba(210,119,42,0.08); display: flex; flex-direction: column; }
.card__image { width: 100%; height: 180px; object-fit: cover; display: block; }
.card__title { margin: 16px 16px 6px; font-weight: 700; font-size: 17px; }
.card__desc { margin: 0 16px 12px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.card__meta { display: flex; align-items: center; justify-content: space-between; margin: 0 16px 16px; gap: 12px; flex-wrap: wrap; }
.price { font-weight: 700; color: var(--accent-dark); font-size: 15px; }
.allergen { margin-top: 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }

@media (min-width: 480px) {
  .card__image { height: 200px; }
  .card__title { margin: 18px 18px 6px; font-size: 18px; }
  .card__desc { margin: 0 18px 12px; }
  .card__meta { margin: 0 18px 18px; }
  .price { font-size: 16px; }
  .allergen { font-size: 13px; }
}

/* Contact */
.contact { list-style: none; padding: 0; margin: 0 0 16px; }
.contact li { margin: 6px 0; }
.contact a { color: var(--accent-dark); text-decoration: none; }
.contact a:hover { text-decoration: underline; }

/* Footer */
.footer { border-top: 1px solid #f1e6d8; background: var(--paper); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; color: var(--muted); font-size: 12px; flex-wrap: wrap; gap: 12px; }
.footer__link { color: var(--muted); text-decoration: none; }
.footer__link:hover { color: var(--accent); }

@media (min-width: 480px) {
  .footer__inner { padding: 18px 0; font-size: 13px; }
}

@media (min-width: 768px) {
  .footer__inner { font-size: 14px; }
}

/* Cart Notification */
.cart-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--accent);
  color: white;
  padding: 16px 24px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.cart-notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* Checkout Page */
.checkout-page {
  padding: 40px 0;
}

.cart-items {
  background: var(--paper);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(210,119,42,0.08);
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f1e6d8;
}

.cart-item:last-child {
  border-bottom: none;
}

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

.cart-item-name {
  font-weight: 700;
  font-size: 18px;
  color: var(--accent-dark);
  margin-bottom: 6px;
  line-height: 1.3;
}

.cart-item-price {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.cart-item-total {
  font-weight: 700;
  font-size: 18px;
  color: var(--accent-dark);
  white-space: nowrap;
  text-align: right;
  min-width: 80px;
}

@media (max-width: 480px) {
  .cart-item {
    flex-direction: column;
    gap: 12px;
  }
  
  .cart-item-total {
    text-align: left;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid #f1e6d8;
  }
  
  .cart-item-name {
    font-size: 16px;
  }
}

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

.quantity-btn {
  background: #f1e6d8;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background: var(--accent);
  color: white;
}

.remove-item {
  background: none;
  border: none;
  color: #d32f2f;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  margin-top: 8px;
}

.checkout-summary {
  background: var(--paper);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 4px 14px rgba(210,119,42,0.08);
  position: sticky;
  top: 100px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.summary-row.total {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-dark);
  padding-top: 12px;
  border-top: 2px solid #f1e6d8;
  margin-top: 12px;
}

.checkout-form {
  margin-top: 32px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--ink);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #f1e6d8;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

@media (min-width: 768px) {
  .checkout-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
  }
}

/* Address form grid on mobile */
@media (max-width: 480px) {
  .checkout-form div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* Payment Method Selection */
.payment-option {
  transition: all 0.3s ease;
}

.payment-option:hover {
  border-color: var(--accent) !important;
  background: #fff7ee;
}

.payment-option input[type="radio"]:checked ~ div strong {
  color: var(--accent-dark);
}

.payment-option:has(input[type="radio"]:checked) {
  border-color: var(--accent) !important;
  background: #fff7ee;
}

/* QR Code Modal */
#qr-payment-modal {
  display: none;
}

#qr-payment-modal[style*="flex"] {
  display: flex !important;
}

/* Reviews Page */
.reviews-page {
  padding: 40px 0;
}

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.review-card {
  background: var(--paper);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(210,119,42,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(210,119,42,0.12);
}

.review-image-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f5f5f5;
}

.review-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.review-content {
  padding: 24px;
}

.review-stars {
  font-size: 20px;
  margin-bottom: 12px;
  color: #ffb400;
}

.review-text {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 12px;
}

.review-text:last-of-type {
  margin-bottom: 16px;
}

.review-date {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  font-style: italic;
}

.review-card-text-only {
  border-left: 4px solid var(--accent);
}

.review-card-text-only .review-content {
  padding-left: 28px;
}

@media (min-width: 640px) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
  
  .reviews-page {
    padding: 60px 0;
  }
}
