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

/* ===========================
   VARIABLES & RESET
   =========================== */
:root {
  /* Primary Colors */
  --primary: #ffb36b; /* saffron */
  --primary-hover: #ff9d41;
  --primary-light: #ffe8ce;
  --accent: #7c3f3f; /* rosewood */

  /* Text Colors */
  --text: #2f2b28;
  --text-dark: #2b2521;
  --text-light: #5d5550;
  --text-lighter: #8a7f78;

  /* Background Colors */
  --bg: #f6f0e9;
  --bg-light: #fff9f0;
  --bg-card: #ffffff;
  --white: #fff;

  /* Border & Divider Colors */
  --border: #e5d8c9;
  --border-light: #ede2d6;
  --border-dark: #cbb9a7;

  /* State Colors */
  --success: #2c8c5c;
  --success-bg: #d9f1e4;
  --success-border: #c2e5d2;
  --error: #d63031;
  --error-bg: #f8d7da;
  --error-border: #f5c6cb;
  --warning: #ffc107;
  --warning-bg: #fff3cd;
  --warning-border: #ffeaa7;
  --info: #0c5460;
  --info-bg: #d1ecf1;
  --info-border: #bee5eb;

  /* Shadows */
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);

  /* Border Radius */
  --radius: 12px;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
}

html, body {
  min-height: 100vh;
}

body {
  font-family: "DM Sans", "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  max-width: 1100px;
  margin: auto;
  padding: 24px;
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: clamp(16px, 3vw, 32px);
}

h1, h2, h3, h4 {
  color: var(--text-dark);
  margin: 0 0 1rem 0;
  font-family: "Playfair Display", "DM Sans", serif;
}

.cute-title {
  font-family: "Baloo 2", "Playfair Display", "DM Sans", cursive;
  letter-spacing: 0.4px;
}

.cute-subtitle {
  font-family: "Baloo 2", "Playfair Display", "DM Sans", cursive;
  letter-spacing: 0.2px;
}

.rainbow-text {
  animation: rainbowShift 12s linear infinite, floatBlink 2.8s ease-in-out infinite;
  background: linear-gradient(90deg, #ffb36b, #ff9dd4, #9b6bff, #6bd3ff, #7ce8b6, #ffb36b);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: block;
  width: fit-content;
  margin: 0 auto;
  text-align: center;
  transform-origin: center;
  font-size: 36px;
}

@keyframes rainbowShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes floatBlink {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  45% { transform: translateY(-2px) scale(1.01); opacity: 0.95; }
  55% { transform: translateY(-2px) scale(1.01); opacity: 0.95; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.menu-category-block, .music-category-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px 10px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.menu-category-block h2,
.music-category-block h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

/* ===========================
   LAYOUT & CONTAINERS
   =========================== */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Home sections */
.home-section {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  box-shadow: var(--shadow);
  margin: 32px auto;
}

.home-section.home-section-alt {
  background: #ffffff;
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-dark);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: nowrap;
  flex: 1;
  margin-left: 16px;
  min-width: 0;
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  flex: 1;
  min-width: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ===========================
   TYPOGRAPHY & LINKS
   =========================== */
.logo {
  font-weight: 700;
  font-size: 22px;
  text-decoration: none;
  color: var(--text-dark);
}

.nav-link {
  margin-left: 12px;
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
  color: var(--text-light);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:first-child {
  margin-left: 0;
}

.nav-link:hover {
  color: var(--text-dark);
}

.nav-user {
  margin-right: 12px;
  font-weight: 600;
  color: var(--text);
}

/* ===========================
   BUTTONS & INTERACTIVE
   =========================== */
.btn, button {
  background: var(--primary);
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: bold;
  transition: all 0.25s ease;
  text-decoration: none;
  display: inline-block;
  color: inherit;
}

.btn:hover, button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.9rem;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-dark);
  color: var(--text-dark);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* ===========================
   CARDS & GRIDS
   =========================== */
.menu-grid, .track-grid, .music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin: 24px auto 0;
  max-width: 1040px;
  width: 100%;
}

.music-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.menu-card, .music-track-card, .order-card,
.order-summary, .order-section, .order-total-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
  position: relative;
}

.menu-card {
  padding: 0 0 20px 0;
  overflow: hidden;
}

.menu-card > *:not(.item-image-link):not(.item-qty-badge) {
  padding-left: 20px;
  padding-right: 20px;
}

.menu-card:hover, .music-track-card:hover, .order-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

/* ===========================
   SPECIFIC COMPONENTS
   =========================== */
/* Cart Badge */
.cart-badge, .item-qty-badge {
  background: var(--accent);
  color: var(--white);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.cart-badge {
  margin-left: 4px;
  display: inline-flex;
}

.item-qty-badge {
  position: absolute;
  top: 8px;
  right: 12px;
}

/* Menu Images */
.menu-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
}

.music-cover-img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg);
  margin: 0 auto 12px;
  display: block;
  transition: transform 0.2s ease;
}

.music-cover-img:hover {
  transform: scale(1.05);
}

/* Quantity Controls */
.qty-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.qty-btn {
  padding: 6px 12px;
  font-size: 18px;
  min-width: 36px;
}

.qty-display {
  font-weight: bold;
  min-width: 28px;
  text-align: center;
}

.old-price {
  text-decoration: line-through;
  color: #999;
  margin-right: 6px;
}

.free-pill {
  display: inline-block;
  background: linear-gradient(135deg, #ffe7c4, #ffd39a);
  color: #8a4b00;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  border: 1px solid #f1b46b;
}

.free-pill.large {
  font-size: 16px;
  padding: 6px 14px;
}

.payment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.payment-badges img {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  padding: 5px 9px;
}

.payment-strip {
  margin: 0 auto 0 auto;
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 0;
  padding: 22px 12px 28px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: auto;
}

.payment-strip-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 12px;
}

.payment-label {
  margin: 0;
  color: var(--text-lighter);
  font-weight: 700;
  letter-spacing: 0.3px;
  text-align: center;
  font-size: 0.95rem;
}

.sponsor-strip {
  margin: 0 auto;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 24px 12px 30px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.sponsor-strip-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.sponsor-label {
  margin: 0 0 12px 0;
  color: var(--text-lighter);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.sponsor-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.sponsor-badges img {
  height: 72px;
  max-height: 90px;
  max-width: 180px;
  width: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  padding: 8px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  object-fit: contain;
}

.payment-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.payment-col {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  min-height: 86px;
}

.payment-col + .payment-col {
  border-left: 1px solid var(--border);
  padding-left: 18px;
}

.payment-col + .payment-col {
  border-left: 1px solid var(--border);
  padding-left: 18px;
}

.payment-col.left {
  justify-content: flex-start;
  text-align: left;
  padding-left: 6px;
}

.payment-col.center {
  justify-content: center;
  text-align: center;
  flex-direction: column;
  gap: 10px;
}

.payment-col.right {
  justify-content: flex-end;
  text-align: right;
  padding-right: 6px;
}

.registrar-note {
  color: var(--text-lighter);
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
}

.badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.badge-inline img {
  height: 48px;
}

.right-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.right-badges img {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  padding: 5px 9px;
}

.payment-tail {
  display: none;
}

@media (min-width: 1024px) {
  .payment-badges,
  .right-badges {
    flex-wrap: nowrap;
  }
}

@media (max-width: 768px) {
  .payment-strip-inner {
    justify-content: center;
    text-align: center;
  }
  .payment-col {
    justify-content: center !important;
    text-align: center !important;
    padding-left: 0;
    padding-right: 0;
  }
  .badge-inline {
    justify-content: center;
  }
  .right-badges {
    justify-content: center;
  }
}

/* Status Badges */
.status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  border: 1px solid;
}

.status.pending {
  background: var(--warning-bg);
  color: #856404;
  border-color: var(--warning-border);
}

.status.confirmed {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info-border);
}

.status.completed {
  background: var(--success-bg);
  color: #155724;
  border-color: var(--success-border);
}

.status.cancelled {
  background: var(--error-bg);
  color: #721c24;
  border-color: var(--error-border);
}

/* ===========================
   ORDER SPECIFIC STYLES
   =========================== */
.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.order-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-item strong {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 600;
}

.order-id {
  font-family: monospace;
  color: var(--text-dark);
  font-weight: 500;
}

/* Order Items */
.order-items {
  background: #fafafa;
  border-radius: 8px;
  overflow: hidden;
}

.items-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 16px 20px;
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
}

.items-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.order-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  align-items: center;
}

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

.item-col {
  padding: 4px 0;
}

.item-name-header, .item-quantity-header,
.item-price-header, .item-total-header {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.item-name {
  font-weight: 500;
  color: var(--text-dark);
}

.item-quantity, .item-price {
  text-align: center;
  color: var(--text-light);
}

.item-total {
  text-align: center;
  font-weight: 600;
  color: var(--text-dark);
}

/* Simple Order Items (for list page) */
.order-items-simple ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.order-item-simple {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f8f8f8;
}

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

.item-name-simple {
  flex: 1;
  font-weight: 500;
  color: var(--text-dark);
}

.item-quantity-simple {
  margin: 0 16px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.item-price-simple {
  font-weight: 500;
  color: var(--text-dark);
  min-width: 80px;
  text-align: right;
}

/* Order Actions & Footer */
.order-footer {
  margin-top: 20px;
  text-align: right;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.order-actions {
  text-align: center;
  margin-top: 32px;
}

.total-display h3 {
  margin: 0;
  color: var(--text-dark);
  font-size: 1.5rem;
}

/* ===========================
   MODALS & OVERLAYS
   =========================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  width: 320px;
  text-align: center;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-content input {
  width: 100%;
  padding: 10px;
  margin: 6px 0;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
}

.social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.1s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.social-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.social-btn .social-icon img {
  height: 18px;
  width: 18px;
  display: block;
}

.google-btn {
  color: var(--text-dark);
  background: #fff;
}

.facebook-btn {
  background: #1877f2;
  color: #fff;
  border: 1px solid #1560c9;
}

/* ===========================
   CHAT WIDGET
   =========================== */
.chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary);
  border-radius: 50%;
  width: 72px;
  height: 72px;
  border: none;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 10000;
  transition: all 0.25s ease;
}

.chat-toggle:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.chat-box {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 340px;
  height: 460px;
  background: #fffdf9;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 10000;
  border: 1px solid #f3e8dd;
}

.chat-header {
  background: var(--primary);
  padding: 12px 16px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #3b2d1f;
  font-size: 15px;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(0,0,0,0.05);
  background: #fff;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-messages {
  display: flex;
  flex-direction: column;
}

.msg-bot, .msg-user {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  max-width: 100%;
}

.msg-bot {
  justify-content: flex-start;
}

.msg-bot::before {
  content: "";
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: url('/static/images/logo_black.jpg') center/cover no-repeat;
  flex-shrink: 0;
  border: 1px solid #f0e6dc;
}

.msg-user {
  justify-content: flex-end;
  margin-left: auto;
}

.msg-bot span, .msg-user span {
  background: #fffdf9;
  border: 1px solid #f0e6dc;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--text);
  line-height: 1.4;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.msg-user span {
  background: var(--primary-light);
  border-color: var(--primary);
}

.close-chat {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  transition: background 0.2s;
}

.close-chat:hover {
  background: rgba(0, 0, 0, 0.08);
}

/* Memory Panel */
.chat-memory {
  background: #f0f8ff;
  border-bottom: 1px solid #d0e8ff;
  padding: 8px 12px;
  font-size: 11px;
  line-height: 1.4;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  to {
    max-height: 100px;
    opacity: 1;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

.chat-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.4;
  background: #fffaf4;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 6px;
}

.msg-user {
  text-align: right;
  margin: 6px 0;
}

.msg-user span {
  background: #ffe2b5;
  padding: 8px 12px;
  border-radius: 14px 14px 0 14px;
  display: inline-block;
  max-width: 80%;
}

.msg-bot {
  text-align: left;
  margin: 6px 0;
}

.msg-bot span {
  background: #eee;
  padding: 8px 12px;
  border-radius: 14px 14px 14px 0;
  display: inline-block;
  max-width: 80%;
}

.chat-input {
  display: flex;
  border-top: 1px solid #f3e8dd;
  background: #fff9f3;
  padding: 8px;
  gap: 8px;
}

.chat-input input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  outline: none;
}

.chat-input input:focus {
  border-color: var(--primary);
}

/* ===========================
   UTILITY CLASSES
   =========================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 40px 0;
}

.empty-state p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

.price, .total-amount {
  font-weight: bold;
  color: var(--text-dark);
}

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

/* ===========================
   NAV COLLAPSE (prevents wrapping)
   =========================== */
@media (max-width: 1100px) {
  .nav-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .nav-brand {
    width: 100%;
    justify-content: space-between;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 2px;
    background: var(--white);
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-left: 0;
  }

  .nav-links.nav-open {
    display: flex;
  }

  .nav-primary {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
  }

  .nav-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    flex-shrink: 0;
  }

  .nav-link {
    margin: 0;
  }
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 768px) {
  body {
    padding: 16px;
  }

  .container {
    padding: 0 16px;
  }

  .menu-grid, .track-grid, .music-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Order List Responsive */
  .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .order-meta {
    align-items: flex-start;
    gap: 6px;
  }

  .order-item-simple {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .item-quantity-simple, .item-price-simple {
    margin-left: 0;
    text-align: left;
  }

  /* Order Detail Responsive */
  .summary-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .items-header {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  .order-item {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
    padding: 12px 16px;
  }

  .item-quantity, .item-price, .item-total {
    text-align: center;
  }

  .menu-card, .music-track-card, .order-card,
  .order-summary, .order-section, .order-total-section {
    padding: 16px;
  }

  .chat-box {
    width: calc(100vw - 32px);
    right: 16px;
  }

  .free-pill {
    font-size: 11px;
    padding: 3px 9px;
  }
}

@media (max-width: 480px) {
  .order-header h3 {
    font-size: 1.1rem;
  }

  .order-section h2 {
    font-size: 1.2rem;
  }

  .total-display h3 {
    font-size: 1.3rem;
  }

  .music-cover-img {
    width: 120px;
    height: 120px;
  }
}

/* Reset Password Styles */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
}

.auth-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #ffb36b;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #ffb36b;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #ffa04b;
}

.error-message {
    background: #ffe6e6;
    color: #d63031;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #ffcccc;
}

.success-message {
    background: #e6ffe6;
    color: #27ae60;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #ccffcc;
}

.success-message a {
    color: #27ae60;
    text-decoration: underline;
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: #666;
    text-decoration: none;
}

.back-link a:hover {
    color: #333;
    text-decoration: underline;
}

/* Menu item title links */
.item-title-link {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 600;
}

.item-title-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Clickable menu item images */
.item-image-link {
    display: block;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    transition: transform 0.3s ease;
    position: relative;
    cursor: pointer;
}

.item-image-link:hover {
    transform: scale(1.05);
}

.item-image-link img {
  width: 100%;
  height: auto;
  max-height: 220px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--border);
  border-radius: 12px 12px 0 0;
  transition: transform 0.3s ease;
}

.item-image-link:hover img {
    transform: scale(1.1);
}

.item-image-link::after {
    content: "View details";
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.2px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.item-image-link:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.detail-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    margin: 4px 0 8px 0;
}

.detail-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Review summary on menu cards */
.review-summary {
    margin: 8px 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
}

.stars-small {
    font-size: 0.9em;
    line-height: 1;
}

.review-info {
    color: #666;
    font-size: 0.9em;
    font-weight: 500;
}

.no-reviews-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9em;
    font-style: italic;
    transition: color 0.2s;
}

.no-reviews-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.item-description {
    color: #555;
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* ===========================
   MENU ITEM DETAIL PAGE
   =========================== */
.menu-item-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.item-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.item-main {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.item-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.item-main h1 {
    margin: 0 0 10px 0;
    color: var(--text-dark);
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.stars {
    font-size: 1.2em;
}

.rating-text {
    font-weight: bold;
    color: var(--primary);
}

.reviews-section {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.reviews-section h2 {
    margin-top: 0;
    color: var(--text-dark);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

.review-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.review-form h3 {
    margin-top: 0;
    color: var(--primary);
}

.login-prompt {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 20px;
}

.login-prompt a {
    color: var(--primary);
    font-weight: bold;
}

.reviews-list {
    margin-top: 20px;
}

.review-card {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.review-author {
    font-weight: bold;
    color: var(--text-dark);
}

.review-date {
    color: #999;
    font-size: 0.9em;
}

.review-rating {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.review-comment {
    color: #555;
    line-height: 1.5;
    margin: 0;
}

/* Menu filters */
.filter-shell {
  margin: 12px 0 18px;
}

.filter-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 10px 12px;
  box-shadow: var(--shadow);
}

.filter-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.filter-section summary::-webkit-details-marker {
  display: none;
}

.filter-title {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.filter-chevron {
  font-size: 0.9rem;
  color: var(--text-light);
  transition: transform 0.2s ease;
}

.filter-section[open] .filter-chevron {
  transform: rotate(180deg);
}

.filter-body {
  margin-top: 12px;
}

.filter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-shell .checkbox-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 10px;
}

.filter-shell .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px;
  border-radius: 8px;
  background: #fffdf8;
  font-size: 0.9rem;
  line-height: 1.25;
}

.filter-shell .checkbox-label input {
  margin: 0;
}

.filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .filter-shell .checkbox-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .filter-shell .checkbox-group {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
    .item-container {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   CART PAGE
   =========================== */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}
.cart-table th, .cart-table td {
  border-bottom: 1px solid #eee;
  padding: 10px;
  text-align: center;
}
.cart-table th {
  background-color: #ffead0;
  font-weight: 700;
}
.cart-summary {
  text-align: right;
  margin-top: 20px;
}
.checkout-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 18px;
  background: var(--primary);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  color: #222;
  transition: background 0.2s;
}
.checkout-btn:hover {
  background: var(--primary-hover);
}

/* ===========================
   CHECKOUT PAGE
   =========================== */

.checkout-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px 32px;
}

.checkout-title {
  text-align: left;
  margin-bottom: 25px;
  font-size: 2rem;
  color: #3b2a1a;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
}

.card-section {
  background: #fff7ec;
  border-radius: 14px;
  padding: 20px 20px 22px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  border: 1px solid #ffe0b8;
}

.card-section h3 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 1.1rem;
  color: #4a321f;
}

.section-subtitle {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #8a6a4b;
}

/* FORM */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.checkout-form label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a321f;
  margin-bottom: 4px;
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #e1c9a8;
  padding: 10px 12px;
  font-size: 0.95rem;
  box-sizing: border-box;
  background-color: #fffdf8;
}

.checkout-form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #b27f47 50%), linear-gradient(135deg, #b27f47 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.checkout-form textarea {
  resize: vertical;
  min-height: 70px;
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
  outline: none;
  border-color: #f4a261;
  box-shadow: 0 0 0 2px rgba(244, 162, 97, 0.2);
}

.address-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

/* ORDER SUMMARY TABLE */

.checkout-summary {
  display: flex;
  flex-direction: column;
}

.checkout-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.93rem;
}

.checkout-table thead th {
  text-align: left;
  padding: 8px;
  color: #77563a;
  border-bottom: 1px solid #f0d3ae;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.checkout-table th.text-center,
.checkout-table td.text-center {
  text-align: center;
}

.checkout-table th.text-right,
.checkout-table td.text-right {
  text-align: right;
}

.checkout-table tbody td {
  padding: 8px;
  border-bottom: 1px solid #f7e4c7;
  color: #4a321f;
}

.checkout-table tbody tr:nth-child(even):not(.total-row) {
  background-color: #fffaf1;
}

.item-title {
  font-weight: 500;
}

.total-row td {
  border-top: 2px solid #e9c89a;
  background: #ffe9c4;
}

.total-amount {
  font-size: 1.05rem;
  color: #3b2a1a;
}

/* BUTTONS */

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  border: none;
  padding: 11px 18px;
  font-size: 0.95rem;
  cursor: pointer;
  background: #f4a261;
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(244, 162, 97, 0.45);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.1s ease;
}

.btn:hover {
  background: #f08a4b;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(244, 162, 97, 0.6);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 6px rgba(244, 162, 97, 0.5);
}

.confirm-btn {
  margin-top: 18px;
  width: 100%;
}

/* Empty cart state */

.empty-cart {
  text-align: center;
  padding: 40px 20px;
}

.empty-cart p {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.ghost-btn {
  background: var(--white);
  color: #f08a4b;
  border: 1px solid #f4a261;
  box-shadow: none;
}

.ghost-btn:hover {
  background: #fffbf4;
}

/* Tiny note */

.tiny-note {
  margin-top: 10px;
  font-size: 0.78rem;
  color: #856c4f;
}

/* ===========================
   EVENTS PAGE
   =========================== */

/* Grid layout */
.events-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
}

/* Event card */
.event-card {
  background: var(--white);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

/* Title */
.event-card h3 {
  margin-top: 10px;
  margin-bottom: 10px;
  color: var(--text-dark);
}

/* Event image */
.event-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.event-img:hover { opacity: 0.85; }

/* Text sections */
.event-date,
.event-location { margin: 4px 0; color: var(--text); }
.event-desc { margin: 10px 0 15px; color: #555; }

/* RSVP form */
.rsvp-form input,
.rsvp-form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.rsvp-form button {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  color: var(--white);
  font-weight: bold;
  cursor: pointer;
}
.rsvp-form button:hover { background: #ff9c3a; }

/* MODAL */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 20px;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.85);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 32px;
  font-size: 48px;
  font-weight: bold;
  color: var(--white);
  cursor: pointer;
}

/* ZOOM BUTTONS */
.zoom-controls {
  position: absolute;
  top: 20px;
  left: 30px;
  display: flex;
  gap: 10px;
}

.zoom-controls button {
  font-size: 26px;
  padding: 6px 16px;
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.zoom-controls button:hover {
  background: var(--white);
}

/* Event image modal overrides */
#imgModal {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

#imgModal .modal-content {
  margin: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

#imgModal .modal-close {
  top: 20px;
  right: 24px;
}

#imgModal .zoom-controls {
  top: 20px;
  left: 24px;
}

/* ===========================
   CREATE EVENT PAGE
   =========================== */

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

.btn-main {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  font-size: 17px;
  color: var(--white);
  cursor: pointer;
  transition: 0.3s;
}

.btn-main:hover {
  background: #ff9c3a;
}

/* ===========================
   ADD MENU ITEM PAGE
   =========================== */

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 5px;
  border: 1px solid #e9ecef;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: normal;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.checkbox-label:hover {
  background: #e9ecef;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.checkbox-label span {
  flex: 1;
}
