/* === Reset & Base === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --red: #cf142b;
  --red-dark: #a8101f;
  --white: #ffffff;
  --cream: #fdf6ec;
  --gold: #d4a843;
  --gold-light: #f5e6c8;
  --text: #2d2d2d;
  --text-light: #666666;
  --border: #e0d5c7;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family:
    "Nunito",
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* === Header === */
.header {
  background: var(--red);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-brand h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.header-tagline {
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.9;
  margin-top: 0.15rem;
}

.cart-button {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
  cursor: pointer;
  position: relative;
  transition:
    transform 0.2s,
    background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-button:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.3);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--gold);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-banner {
  background: var(--red-dark);
  text-align: center;
  padding: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* === Hero === */
.hero {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.hero h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--red);
}

.hero > p:first-of-type {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 0.5rem;
}

/* === Main Content === */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

/* === Menu Sections === */
.menu-section {
  margin-bottom: 2.5rem;
}

.menu-section-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--red);
}

.menu-section-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--red);
}

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

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* === Menu Card === */
.menu-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

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

.menu-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--gold-light);
}

.menu-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.menu-card:hover .menu-card-image img {
  transform: scale(1.05);
}

.menu-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.menu-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.menu-card-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  flex: 1;
  margin-bottom: 0.75rem;
  font-style: italic;
}

.menu-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-card-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--red);
}

.add-to-cart-btn {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.1s;
}

.add-to-cart-btn:hover {
  background: var(--red-dark);
}

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

/* === Cart Drawer === */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 90vw);
  height: 100vh;
  background: var(--white);
  z-index: 300;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

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

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 2px solid var(--border);
}

.cart-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
}

.cart-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 0.25rem;
}

.cart-sarcasm {
  padding: 0.75rem 1.5rem;
  font-style: italic;
  color: var(--text-light);
  font-size: 0.9rem;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}

.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  font-size: 1rem;
  gap: 0.5rem;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 1.5rem;
}

.cart-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

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

.cart-item-price {
  font-weight: 700;
  color: var(--red);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-item-controls button {
  background: var(--cream);
  border: 1px solid var(--border);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.cart-item-controls button:hover {
  background: var(--gold-light);
}

.cart-item-qty {
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

.cart-item-remove {
  margin-left: auto;
}

.cart-footer {
  padding: 1.25rem 1.5rem;
  border-top: 2px solid var(--border);
  background: var(--cream);
}

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

.cart-total-price {
  color: var(--red);
  font-size: 1.3rem;
}

.checkout-btn {
  width: 100%;
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.checkout-btn:hover {
  background: var(--red-dark);
}

.cart-delivery-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.75rem;
}

/* === Order Form === */
.order-form-container {
  max-width: 600px;
  margin: 2rem auto;
}

.order-form-container h2 {
  font-size: 1.5rem;
  color: var(--red);
  margin-bottom: 0.25rem;
}

.order-form-container .subtitle {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-light);
}

.back-btn {
  background: none;
  border: none;
  color: var(--red);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1rem;
  padding: 0;
}

.back-btn:hover {
  text-decoration: underline;
}

.order-summary-mini {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1rem 0 1.5rem;
  box-shadow: var(--shadow);
}

.order-summary-mini h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.order-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.9rem;
}

.order-summary-total {
  display: flex;
  justify-content: space-between;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 1rem;
  color: var(--red);
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

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

.payment-reminder {
  background: var(--gold-light);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.95rem;
}

.payment-reminder small {
  color: var(--text-light);
}

.submit-order-btn {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.submit-order-btn:hover {
  background: var(--red-dark);
}

/* === Order Confirmation === */
.confirmation-container {
  max-width: 600px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.confirmation-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.confirmation-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.confirmation-card h1 {
  font-size: 1.8rem;
  color: var(--red);
  margin-bottom: 0.5rem;
}

.confirmation-subtitle {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.confirmation-order-id {
  background: var(--cream);
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.confirmation-items {
  text-align: left;
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.confirmation-item {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.9rem;
}

.confirmation-total {
  display: flex;
  justify-content: space-between;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 1rem;
  color: var(--red);
}

.confirmation-delivery {
  margin-bottom: 1.5rem;
}

.delivery-estimate {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0.25rem 0;
}

.delivery-subtext {
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
}

.confirmation-footer-note {
  background: var(--gold-light);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.new-order-btn {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.new-order-btn:hover {
  background: var(--red-dark);
}

/* === Footer === */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.8);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-tagline {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-warning {
  font-size: 0.8rem;
  font-style: italic;
  opacity: 0.7;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.footer-attribution {
  font-size: 0.75rem;
  opacity: 0.5;
  margin-bottom: 0.5rem;
}

.footer-copy {
  font-size: 0.75rem;
  opacity: 0.5;
}

/* === Responsive === */
@media (max-width: 640px) {
  .header-brand h1 {
    font-size: 1.2rem;
  }

  .header-tagline {
    font-size: 0.75rem;
  }

  .hero h2 {
    font-size: 1.5rem;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .cart-drawer {
    width: 100vw;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.25rem;
  }

  .footer-links span:nth-child(even) {
    display: none;
  }
}
