/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #f5f5f7;
  --primary: #b33b3b;
  --primary-dark: #8e2e2e;
  --accent: #f2d16b;
  --text: #222;
  --muted: #666;
  --card-bg: #ffffff;
  --border: #e0e0e0;
  --shadow-soft: 0 6px 16px rgba(0, 0, 0, 0.08);
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
}
/* ---------- Logo ---------- */
/* Limit logo height on all screens */
.logo-image {
  display: block;
  max-width: 90%;
  height: auto;
  max-height: 160px;   /* desktop limit */
  object-fit: contain;
}

/* Smaller on mobile */
@media (max-width: 600px) {
  .logo-image {
    max-height: 110px;  /* reduce logo height */
  }
}



/* ---------- Header ---------- */
.site-header {
  position: relative;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

.menu-header {
  padding: 0.75rem 1rem 0.5rem;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;   /* center everything horizontally */
}

.header-brand {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;   /* center the logo inside the div */
}



/* ---------- FIXED/Sticky Horizontal categories bar ---------- */
/* -> appears under header, then sticks to top when you scroll */
.category-scroll {
  overflow-x: auto;
  white-space: nowrap;
  padding: 0.6rem 1rem;
  position: sticky;
  top: 0;
  z-index: 9999;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.category-row {
  display: flex;
  gap: 0.75rem;
}

.category-card {
  flex: 0 0 auto;
  width: 110px;
  background: #fff;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  text-align: center;
  padding: 0.6rem 0.4rem;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.category-card img {
  width: 70px;
  height: 70px;
  border-radius: 0.5rem;
  object-fit: cover;
  margin-bottom: 0.35rem;
}

.category-card span {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
}

.category-card:hover {
  transform: translateY(-3px);
}

/* Hide scrollbar (iPhone style) */
.category-scroll::-webkit-scrollbar {
  display: none;
}

/* ---------- Reusable Links / Buttons ---------- */
.cart-link,
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.3rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  transition: background 0.15s ease, transform 0.1s ease;
}

.cart-link:hover,
.back-link:hover {
  background: rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.cart-count {
  background: var(--accent);
  color: #000;
  border-radius: 999px;
  padding: 0 0.4rem;
  font-weight: 700;
  min-width: 1.5rem;
  text-align: center;
}

/* ---------- Layout ---------- */
.content {
  max-width: 1100px;
  margin: 1.5rem auto 2rem;
  padding: 0 1rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Menu ---------- */
.menu-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.menu-category {
  background: var(--card-bg);
  border-radius: 1rem;
  padding: 1rem 1rem 0.8rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.menu-category-title {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
  color: var(--primary-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ✅ WITH IMAGE LIKE YOUR SCREENSHOT */
.menu-item {
  display: grid;
  grid-template-columns: auto 1fr auto; /* image | text | button */
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-top: 1px dashed #e3e3e3;
}

.menu-item:first-of-type {
  border-top: none;
}

/* Image on the left */
.menu-item-image-wrapper {
  grid-row: 1 / span 2;
  width: 72px;
  height: 72px;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
}

.menu-item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Name + price on first row */
.menu-item-main {
  grid-column: 2 / 4; /* span text + button columns */
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.menu-item-name {
  font-weight: 600;
  font-size: 0.98rem;
}

.menu-item-price {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-dark);
}

/* Description under name (middle column) */
.menu-item-description {
  grid-column: 2 / 3;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Button in the right column */
.menu-item-actions {
  grid-column: 3 / 4;
  display: flex;
  justify-content: flex-end;
  align-self: start;
  margin-top: 0.25rem;
}


/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(179, 59, 59, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  color: var(--primary-dark);
  border: 1px solid var(--primary);
}

.btn-secondary:hover {
  background: #fdf4f4;
}

/* ---------- Cart ---------- */
.cart-section {
  background: transparent;
}

.cart-empty {
  background: var(--card-bg);
  border-radius: 0.9rem;
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-soft);
  border: 1px dashed var(--border);
  font-size: 0.95rem;
  color: var(--muted);
}

.cart-table-wrapper {
  background: var(--card-bg);
  border-radius: 1rem;
  padding: 1.2rem 1rem 1rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.cart-table th,
.cart-table td {
  padding: 0.6rem 0.4rem;
  border-bottom: 1px solid #eee;
}

.cart-table th {
  font-weight: 600;
  color: var(--muted);
}

.cart-table td.right,
.cart-table th.right {
  text-align: right;
}

.cart-table td.center,
.cart-table th.center {
  text-align: center;
}

.cart-item-name {
  font-weight: 600;
}

.cart-qty-input {
  width: 60px;
  padding: 0.25rem 0.3rem;
  border-radius: 999px;
  border: 1px solid #ddd;
  text-align: center;
  font-size: 0.85rem;
}

.cart-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 1rem;
}

.cart-totals {
  min-width: 220px;
}

.cart-totals .line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.cart-totals .total-line {
  font-weight: 700;
  margin-top: 0.3rem;
  padding-top: 0.4rem;
  border-top: 1px solid #ddd;
}

.cart-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Utilities ---------- */
.hidden {
  display: none !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .site-header {
    height: 180px;
  }

  .header-overlay {
    padding: 0 1rem;
  }

  .header-content h1 {
    font-size: 1.4rem;
  }

  .menu-container {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* Floating cart button beside Back-to-top */
.floating-cart {
  position: fixed;
  bottom: 20px;
  right: 80px;              /* little to the left of the arrow */
  height: 42px;
  padding: 0 0.9rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 9999;
}

.floating-cart:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ------ CART BOTTOM PANEL ------ */
.cart-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60%;
  background: white;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -5px 25px rgba(0,0,0,0.25);
  padding: 1rem;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 9999;
}

.cart-panel.show {
  transform: translateY(0);
}

.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.close-cart-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}
/* ------ CART BOTTOM PANEL ------ */
.cart-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55vh;
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
  padding: 1rem 1.25rem 1.25rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 9999;
  overflow-y: auto;
}

.cart-panel.show {
  transform: translateY(0);
}

.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.cart-panel-header h3 {
  font-size: 1.1rem;
  margin: 0;
}

.close-cart-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

/* ------ FLOATING BUTTONS (CART + BACK TO TOP) ------ */
#open-cart {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 10000;
}

.back-to-top {
  position: fixed;
  bottom: 1rem;
  right: 5.2rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  display: none; /* JS will change to flex */
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
}
/* ------ CART BOTTOM PANEL ------ */
.cart-panel {
  display: none;                  /* hidden by default */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55vh;
  background: #f0f0f0;           /* light grey like screenshot */
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
  padding: 0.75rem 0 0.75rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 9999;
  overflow: hidden;
}

/* show state */
.cart-panel.show {
  display: block;
  transform: translateY(0);
}

.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1rem 0.6rem;
  font-size: 0.9rem;
}

.cart-subtotal-text {
  font-weight: 600;
}

.close-cart-btn {
  background: none;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
}

/* inner grey box with "Your Order" + items */
.cart-panel-body {
  background: #f6f6f6;
  border-radius: 16px 16px 0 0;
  padding: 0.75rem 1rem 0.75rem;
  height: calc(55vh - 38px); /* panel height minus header */
  overflow-y: auto;
}

.cart-title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.cart-divider {
  border: none;
  border-top: 1px solid #ddd;
  margin: 0 0 0.75rem;
}

/* cart items list */
#cart-items-list {
  margin-bottom: 0.5rem;
}

.cart-item-row {
  background: #ffffff;
  border-radius: 12px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cart-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.cart-item-price {
  font-size: 0.9rem;
  font-weight: 600;
}

/* quantity pill */
.cart-item-qty-row {
  display: flex;
}

.qty-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 999px;
  border: 1px solid #ccc;
  padding: 0.25rem 0.75rem;
  min-width: 120px;
  background: #fff;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid #444;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  padding: 0;
  cursor: pointer;
}

.qty-value {
  margin: 0 0.5rem;
  min-width: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

/* footer subtotal */
.cart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid #ddd;
  font-weight: 600;
  margin-top: 0.25rem;
}

/* cart empty */
.cart-empty {
  font-size: 0.9rem;
  color: #666;
}

/* ------ FLOATING BUTTONS (CART + BACK TO TOP) ------ */
#open-cart {
  position: fixed;
  /* keep away from Safari bottom bar on iPhone */
  bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
  right: 1rem;
  z-index: 10000;
}

.back-to-top {
  position: fixed;
  bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
  right: 5.2rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  display: none; /* JS will change to flex */
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
}


/* === FINAL LOGO OVERRIDE (put at the very bottom of the file) === */
.header-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 0;
}

/* default (desktop/tablet) */
.logo-image {
  height: 120px !important;
  max-height: 120px !important;
  width: auto !important;
  max-width: 90%;
  object-fit: contain;
}

/* mobile */
@media (max-width: 600px) {
  .logo-image {
    height: 130px !important;
    max-height: 130px !important;
  }
}
.menu-category-description {
  font-size: 0.9rem;
  color: var(--muted);
  margin: -0.4rem 0 0.8rem 0;
}

/* ---------- IMAGE POPUP MODAL ---------- */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.85);
}

.image-modal-content {
  display: block;
  margin: auto;
  max-width: 85%;
  max-height: 85%;
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
}

.image-modal-close {
  position: absolute;
  top: 25px;
  right: 40px;
  color: #ffffff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}
.image-modal-close:hover {
  color: #ffdddd;
}

/* Make menu images clickable */
.menu-item-image {
  cursor: pointer;
  transition: transform 0.2s;
}
.menu-item-image:hover {
  transform: scale(1.05);
}
