/* ================================================================
   Cactus — Styles (v2 — Bold Red & Green)
   ================================================================ */

/* --- Reset & Variables --- */

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

:root {
  /* Brand — vibrant red & green */
  --red: #C62828;
  --red-dark: #8E0000;
  --red-light: #FF5F52;
  --green: #2E7D32;
  --green-dark: #005005;
  --green-light: #60AD5E;
  --gold: #FFB300;
  --gold-light: #FFE54C;

  /* Neutrals */
  --white: #FFFFFF;
  --off-white: #FAFAFA;
  --cream: #FFF8E1;
  --grey-50: #F5F5F5;
  --grey-100: #EEEEEE;
  --grey-200: #E0E0E0;
  --grey-400: #BDBDBD;
  --grey-600: #757575;
  --grey-800: #424242;
  --dark: #1B1B1B;

  /* Functional */
  --bg: var(--off-white);
  --text: var(--dark);
  --text-muted: var(--grey-600);
  --card-bg: var(--white);
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);

  /* Typography */
  --font-display: 'Georgia', 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  display: block;
  max-width: 100%;
}

/* --- Container --- */

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

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 50px;
  transition: all 0.25s ease;
  letter-spacing: 0.02em;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(198, 40, 40, 0.35);
}

.btn-primary:hover {
  background: var(--red-dark);
  box-shadow: 0 6px 20px rgba(198, 40, 40, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.3);
}

.btn-secondary:hover {
  background: var(--green-dark);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

/* ================================================================
   Header
   ================================================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.logo-icon {
  font-size: 1.4rem;
}

.logo-dot {
  color: var(--green);
}

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

.header-hours {
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-hours::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.cart-toggle {
  position: relative;
  color: var(--text);
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s;
}

.cart-toggle:hover {
  background: var(--grey-50);
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.625rem;
  font-weight: 800;
  background: var(--red);
  color: var(--white);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--white);
}

/* ================================================================
   Hero
   ================================================================ */

.hero {
  position: relative;
  padding: 60px 0 40px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -30%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198,40,40,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46,125,50,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cream);
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
  border: 1px solid rgba(198,40,40,0.12);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--dark);
  letter-spacing: -1px;
}

.hero h1 em {
  font-style: normal;
  color: var(--red);
}

.hero-sub {
  margin-top: 14px;
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.hero-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--grey-800);
  font-weight: 500;
}

.hero-info-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.hero-info-icon.red {
  background: rgba(198,40,40,0.08);
  color: var(--red);
}

.hero-info-icon.green {
  background: rgba(46,125,50,0.08);
  color: var(--green);
}

/* ================================================================
   Menu
   ================================================================ */

.menu-section {
  padding: 0 0 60px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--grey-200), transparent);
}

.menu-grid {
  display: grid;
  gap: 12px;
}

/* --- Menu Card --- */

.menu-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.menu-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--red), var(--green));
  opacity: 0;
  transition: opacity 0.25s;
}

.menu-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.menu-card:hover::before {
  opacity: 1;
}

.menu-card-info {
  flex: 1;
  min-width: 0;
}

.menu-card-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark);
}

.menu-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.menu-card-price {
  font-weight: 800;
  font-size: 1.0625rem;
  color: var(--green);
  white-space: nowrap;
}

.menu-card-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.add-btn {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--white);
  background: var(--red);
  border-radius: 50px;
  padding: 9px 20px;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(198,40,40,0.25);
}

.add-btn:hover {
  background: var(--red-dark);
  box-shadow: 0 4px 12px rgba(198,40,40,0.35);
  transform: translateY(-1px);
}

.add-btn:active {
  transform: scale(0.95);
}

/* ================================================================
   Cart Sidebar
   ================================================================ */

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  backdrop-filter: blur(4px);
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: var(--white);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 30px rgba(0,0,0,0.1);
}

.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(--grey-100);
}

.cart-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-close {
  font-size: 1.5rem;
  color: var(--grey-400);
  padding: 4px;
  line-height: 1;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.cart-close:hover {
  background: var(--grey-50);
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

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

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

.cart-empty-hint {
  font-size: 0.8125rem;
  margin-top: 4px;
}

/* --- Cart Item --- */

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--grey-100);
}

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

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

.cart-item-name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.cart-item-price {
  font-size: 0.8125rem;
  color: var(--green);
  font-weight: 600;
  margin-top: 2px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--grey-200);
  background: var(--white);
  font-size: 1rem;
  font-weight: 700;
  color: var(--grey-600);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.qty-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(198,40,40,0.04);
}

.cart-item-qty {
  font-weight: 700;
  font-size: 0.9375rem;
  min-width: 20px;
  text-align: center;
}

/* --- Cart Footer --- */

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--grey-100);
  background: var(--white);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 16px;
}

.cart-total span:last-child {
  color: var(--green);
}

/* ================================================================
   Modals (shared)
   ================================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  backdrop-filter: blur(6px);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: var(--shadow-xl);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.modal-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 1.5rem;
  color: var(--grey-400);
  line-height: 1;
  padding: 4px;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover {
  background: var(--grey-50);
}

/* ================================================================
   Auth Forms
   ================================================================ */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--grey-600);
}

.field input,
.field select {
  font-family: inherit;
  font-size: 0.9375rem;
  padding: 12px 16px;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius);
  background: var(--grey-50);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.1);
}

.auth-error {
  font-size: 0.8125rem;
  color: var(--red);
  min-height: 1.2em;
}

.auth-switch {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 20px;
}

.auth-switch button {
  color: var(--red);
  font-weight: 700;
  text-decoration: underline;
  font-size: inherit;
}

/* ================================================================
   Checkout Modal
   ================================================================ */

.checkout-summary {
  margin: 20px 0;
  border: 1.5px solid var(--grey-100);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--grey-50);
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--grey-100);
}

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

.checkout-item-name {
  color: var(--grey-600);
}

.checkout-item-price {
  font-weight: 700;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1.125rem;
  padding: 0 0 20px;
}

.checkout-total span:last-child {
  color: var(--green);
}

/* ================================================================
   Confirmation Modal
   ================================================================ */

.modal-confirm {
  text-align: center;
}

.confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: var(--white);
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 14px rgba(46,125,50,0.3);
}

.confirm-ref {
  font-size: 1rem;
  margin: 14px 0 8px;
  color: var(--grey-600);
}

.confirm-ref strong {
  color: var(--red);
  font-size: 1.125rem;
  letter-spacing: 0.05em;
}

.confirm-msg {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ================================================================
   Footer
   ================================================================ */

.footer {
  border-top: 1px solid var(--grey-100);
  padding: 28px 0;
  background: var(--white);
}

.footer-inner {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--grey-800);
}

/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 640px) {
  .header-hours {
    display: none;
  }

  .hero {
    padding: 40px 0 28px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-info {
    gap: 16px;
  }

  .hero-info-item {
    font-size: 0.8125rem;
  }

  .hero-info-icon {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }

  .menu-card {
    padding: 14px 16px;
    gap: 12px;
  }

  .menu-card-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

  .cart-sidebar {
    max-width: 100%;
  }

  .modal {
    padding: 28px 22px;
    border-radius: var(--radius-lg);
  }

  .section-title {
    font-size: 1.25rem;
  }
}
