/* Pizza Theme Modern Styling */
:root {
  --pizza-red: #ff4444;
  --pizza-orange: #ff8c00;
  --pizza-yellow: #ffd700;
  --pizza-dark: #1a1a1a;
  --pizza-light: #fff8f0;
  --pizza-green: #25D366; /* WhatsApp green */
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
  background-color: #fcfcfc; /* Slightly off-white */
  background-image: url('data:image/svg+xml,%3Csvg width="6" height="6" viewBox="0 0 6 6" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="%239C92AC" fill-opacity="0.05" fill-rule="evenodd"%3E%3Cpath d="M5 0h1L0 6V5zm1 5v1H5z"/%3E%3C/g%3E%3C/svg%3E'); /* Subtle pattern */
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== HEADER ===== */
.header {
  background: linear-gradient(135deg, var(--pizza-dark) 0%, #2a2a2a 100%);
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(255, 68, 68, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--pizza-red), var(--pizza-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav a {
  margin-left: 2rem;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.nav a:hover {
  color: var(--pizza-orange);
}

.cart-btn {
  background: linear-gradient(135deg, var(--pizza-red), var(--pizza-orange));
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

.cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 68, 68, 0.4);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--pizza-red) 0%, var(--pizza-orange) 100%);
  color: white;
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '🍕';
  position: absolute;
  font-size: 20rem;
  opacity: 0.1;
  top: -50%;
  right: -10%;
  transform: rotate(-20deg);
  animation: spin 20s linear infinite; /* Added subtle animation */
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -1px;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 1.3rem;
  opacity: 0.95;
  position: relative;
  z-index: 1;
}

.hero__meta {
  margin-top: 2.5rem;
  font-size: 0.95rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.hero__meta span {
  margin: 0 1.5rem;
  display: inline-block;
}

/* ===== SECTIONS ===== */
.section {
  padding: 4rem 0;
}

.section--gray {
  background-color: #f5f5f5;
}

h2 {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 3.5rem;
  color: var(--pizza-dark);
  font-weight: 800;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block; /* To allow pseudo-elements to align */
  padding-bottom: 0.5rem; /* Space for underline */
}

h2::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--pizza-red), var(--pizza-orange));
  border-radius: 2px;
}

/* ===== SIZE SELECTION ===== */
#pizza-size-selection {
  padding: 4rem 0;
  text-align: center;
}

#pizza-size-selection h2 {
  margin-bottom: 2.5rem;
}

.size-options {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.size-btn {
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 12px;
  padding: 1.2rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #555;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.size-btn:hover {
  border-color: var(--pizza-orange);
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(255, 140, 0, 0.2);
}

.size-btn.active {
  background: linear-gradient(135deg, var(--pizza-red), var(--pizza-orange));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 25px rgba(255, 68, 68, 0.3);
  transform: translateY(-4px);
}

/* ===== FLAVOR SELECTION (Sim/Não) ===== */
#two-flavors-option {
  padding: 4rem 0;
  text-align: center;
}

#two-flavors-option h2 {
  margin-bottom: 2.5rem;
}

.flavor-options {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.flavor-btn {
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 12px;
  padding: 1.2rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #555;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.flavor-btn:hover {
  border-color: var(--pizza-orange);
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(255, 140, 0, 0.2);
}

.flavor-btn.active {
  background: linear-gradient(135deg, var(--pizza-red), var(--pizza-orange));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 25px rgba(255, 68, 68, 0.3);
  transform: translateY(-4px);
}


/* ===== MENU ===== */
.filters {
  text-align: center;
  margin-bottom: 3rem;
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.filter {
  background-color: #fff;
  border: 2px solid #ddd;
  padding: 0.7rem 1.5rem;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.filter:hover {
  border-color: var(--pizza-orange);
  color: var(--pizza-orange);
}

.filter.active {
  background: linear-gradient(135deg, var(--pizza-red), var(--pizza-orange));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.menu-item {
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  padding-bottom: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.menu-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(255, 68, 68, 0.2);
}

.menu-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  margin-bottom: 1rem;
}

.menu-item h3 {
  font-size: 1.5rem;
  margin: 0.5rem 1rem;
  color: var(--pizza-dark);
  font-weight: 800;
}

.menu-item p {
  font-size: 0.9rem;
  color: #777;
  margin: 0.5rem 1rem 1rem;
  line-height: 1.4;
}

.menu-item__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  margin-top: 1rem;
}

.menu-item__footer span {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--pizza-red), var(--pizza-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.menu-item .add-to-cart {
  background: linear-gradient(135deg, var(--pizza-red), var(--pizza-orange));
  color: white;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.2);
}

.menu-item .add-to-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 68, 68, 0.3);
}

.add-bebida-btn {
  background: linear-gradient(135deg, var(--pizza-red), var(--pizza-orange));
  color: white;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.2);
}

.add-bebida-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 68, 68, 0.3);
}

#bebidas-section {
  background-color: #fff8f0;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  font-size: 0.95rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn--small {
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 6px;
  background-color: #f0f0f0;
  color: #555;
  font-weight: 600;
}

.btn--small:hover {
  background-color: #e0e0e0;
}

.btn--whatsapp {
  background: linear-gradient(135deg, var(--pizza-green), #20c261);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn--whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn--dark {
  background: linear-gradient(135deg, var(--pizza-dark), #2a2a2a);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn--dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ===== FORM & CART ===== */
.order-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .order-layout {
    grid-template-columns: 1fr 1.5fr;
  }
}

.panel {
  background-color: #fff;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.panel h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  color: var(--pizza-dark);
  font-weight: 800;
}

.cart-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cart-empty {
  text-align: center;
  color: #999;
  padding: 2rem 0;
  font-size: 1rem;
}

.cart-item {
  padding: 1rem 0;
  border-bottom: 1px dashed #eee;
  animation: slideIn 0.3s ease;
}

.cart-item:last-child {
  border-bottom: none;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cart-total {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-top: 2px solid #f0f0f0;
  font-size: 1.1rem;
  font-weight: 600;
}

.cart-total strong {
  background: linear-gradient(135deg, var(--pizza-red), var(--pizza-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.delivery-info {
  margin-top: 1.5rem;
}

.order-form label {
  display: block;
  margin-bottom: 1.2rem;
  font-weight: 600;
  color: #555;
}

.order-form input[type="text"],
.order-form input[type="tel"],
.order-form select,
.order-form textarea {
  width: 100%;
  padding: 0.9rem;
  margin-top: 0.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus {
  outline: none;
  border-color: var(--pizza-orange);
  box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

.form-row {
  display: flex;
  gap: 1.5rem;
}

.form-row label {
  flex: 1;
}

.order-form button[type="submit"] {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem;
  font-size: 1.1rem;
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, var(--pizza-dark) 0%, #2a2a2a 100%);
  color: white;
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
}

/* ===== CART DRAWER ===== */
.cart-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.3s ease;
}

.cart-drawer.open {
  visibility: visible;
  opacity: 1;
}

.cart-drawer__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.cart-drawer__panel {
  background-color: #fff;
  width: 100%;
  max-width: 420px;
  height: 100%;
  position: relative;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.cart-drawer.open .cart-drawer__panel {
  transform: translateX(0);
}

.cart-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.cart-drawer__header h3 {
  margin: 0;
  font-size: 1.8rem;
  color: var(--pizza-dark);
  font-weight: 800;
}

.cart-drawer__close {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #999;
  transition: color 0.3s ease;
}

.cart-drawer__close:hover {
  color: var(--pizza-red);
}

.cart-drawer__panel .cart-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.cart-drawer__footer {
  padding: 1.5rem;
  border-top: 2px solid #f0f0f0;
}

.cart-drawer__footer .btn {
  width: 100%;
  margin-top: 1rem;
}

/* ===== CHECKOUT BAR ===== */
.checkout-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #fff 0%, #f9f9f9 100%);
  border-top: 2px solid #f0f0f0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 1200;
  padding: 0.8rem 0;
}

.checkout-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkout-info {
  color: var(--pizza-dark);
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-weight: 700;
  font-size: 1rem;
}

.checkout-info div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkout-info strong {
  background: linear-gradient(135deg, var(--pizza-red), var(--pizza-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.checkout-actions {
  display: flex;
  gap: 0.8rem;
}

body {
  padding-bottom: 72px;
}

@media (min-width: 900px) {
  body {
    padding-bottom: 0;
  }
  .checkout-bar {
    max-width: 1200px;
    margin: 0 auto;
    left: 0;
    right: 0;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .size-btn, .flavor-btn {
    padding: 1rem 1.8rem;
    font-size: 1rem;
  }

  .menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
  }

  .menu-item img {
    height: 180px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .checkout-info {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .checkout-actions {
    gap: 0.5rem;
  }

  .checkout-actions .btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  .size-btn, .flavor-btn {
    padding: 0.9rem 1.5rem;
    font-size: 0.95rem;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .logo {
    font-size: 1.4rem;
  }
}

/* New styles for selectable pizza items */
.selectable-pizza {
  cursor: pointer;
  border: 2px solid transparent; /* Default transparent border */
  position: relative; /* For checkmark positioning */
}

.selectable-pizza:hover {
  border-color: var(--pizza-orange); /* Highlight on hover */
}

.selectable-pizza.selected-for-half {
  border-color: var(--pizza-red); /* Red border when selected */
  box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.3); /* Subtle glow */
}

.selectable-pizza .flavor-checkbox {
  display: none; /* Hide the actual checkbox */
}

/* Optional: Add a checkmark for selected items */
.selectable-pizza.selected-for-half::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--pizza-red);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  z-index: 10;
}
