:root {
  --primary: #9b2c2c; /* Elegant muted red */
  --primary-dark: #741b1b;
  --secondary: #ffca28; /* Warm Yellow */
  --secondary-dark: #ffb300;
  --dark: #121212;
  --surface: #1e1e1e;
  --surface-light: #2c2c2c;
  --text-light: #ffffff;
  --text-dim: #b3b3b3;
  --text-dark: #121212;
  --bg: #0a0a0a;
  --success: #4caf50;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text-light);
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--surface-light);
  border-radius: 10px;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--surface-light);
}

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

.brand-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.brand-name {
  font-size: 1.25rem;
  color: var(--secondary);
  letter-spacing: 0.5px;
}

.cart-toggle {
  background: var(--surface-light);
  border: none;
  color: var(--text-light);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.cart-toggle:active {
  transform: scale(0.95);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* HERO SECTION */
.hero {
  position: relative;
  width: 100%;
  padding-top: 45%; /* adjusts height based on width to keep banner aspect ratio */
  min-height: 250px;
  max-height: 500px;
  background: url('../images/hero_banner.jpg') center/cover no-repeat;
  background-color: var(--surface);
  border-bottom: 3px solid var(--primary);
  overflow: hidden;
}

.hero-art img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 40px rgba(0,0,0,0.7), 0 0 0 2px rgba(255,255,255,0.05);
}

/* INFO SECTION */
.info-section {
  padding: 1rem;
  background: var(--surface);
  margin: -25px 1rem 15px;
  border-radius: var(--radius-md);
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-sm);
  text-align: center;
  border: 1px solid var(--surface-light);
}

.info-address {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.info-address i {
  color: var(--primary);
  font-size: 1.1rem;
}
.info-badges {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.info-badge {
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #3a3a3a;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.info-badge i {
  color: var(--secondary);
  font-size: 1.2rem;
}

/* CATEGORY NAV */
.category-nav {
  position: sticky;
  top: 73px;
  z-index: 99;
  background-color: var(--bg);
  padding: 12px 1rem;
  overflow-x: auto;
  white-space: nowrap;
  border-bottom: 1px solid var(--surface-light);
  display: flex;
  gap: 12px;
  scrollbar-width: none;
}
.category-nav::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  background: var(--surface);
  border: 1px solid var(--surface-light);
  color: var(--text-light);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cat-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* MENU SECTION */
.menu-container {
  padding: 1rem;
}

.category-section {
  margin-bottom: 2rem;
  scroll-margin-top: 140px;
}
.category-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--secondary);
  border-left: 4px solid var(--primary);
  padding-left: 12px;
}

/* PRODUCT CARDS (MOBILE FIRST - HORIZONTAL) */
.product-card {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--surface-light);
  position: relative;
  transition: transform 0.2s;
}
.product-card:active {
  transform: scale(0.98);
}

.product-img {
  width: 100px;
  min-width: 100px;
  height: auto;
  object-fit: cover;
  background-color: var(--surface-light);
}

.product-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.product-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
}
.product-price.pizza-price {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.add-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--primary);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-size: 1.2rem;
}

/* FLOATING CART SUMMARY (BOTTOM) */
.cart-floating-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  padding: 16px;
  border-top: 1px solid var(--surface-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-floating-bar.visible {
  transform: translateY(0);
}

.cart-summary-text {
  display: flex;
  flex-direction: column;
}
.cart-total-price {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--secondary);
}

.checkout-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  font-weight: bold;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end; /* Mobile friendly bottom sheet */
  justify-content: center;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--surface);
  width: 100%;
  max-width: 500px;
  border-radius: 24px 24px 0 0;
  padding: 24px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--surface-light);
  padding-bottom: 16px;
}
.modal-title {
  font-size: 1.25rem;
  color: var(--secondary);
}

.close-modal {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
}

/* PIZZA MODAL SPECIFICS */
.size-selector, .flavor-selector {
  margin-bottom: 24px;
}
.section-title {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--text-light);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.radio-label {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface-light);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.2s;
}
.radio-label.selected {
  border-color: var(--primary);
  background: rgba(211, 47, 47, 0.1);
}
.radio-label span.price {
  color: var(--secondary);
  font-weight: bold;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 8px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-light);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
}
.checkbox-label.selected {
  border-color: var(--primary);
}
.checkbox-label.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.checkbox-label input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

.btn-block {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: white;
  border: none;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}
.btn-block:disabled {
  background: var(--surface-light);
  color: var(--text-dim);
  cursor: not-allowed;
  box-shadow: none;
}

/* CART MODAL SPECIFICS */
.cart-items {
  margin-bottom: 24px;
}
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--surface-light);
}
.cart-item-details {
  flex: 1;
  padding-right: 12px;
}
.cart-item-title {
  font-weight: 600;
  font-size: 0.95rem;
}
.cart-item-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.cart-item-price {
  color: var(--secondary);
  font-weight: bold;
}
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-light);
  border-radius: 20px;
  padding: 4px;
}
.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.qty-btn.remove {
  color: #ff5252;
}

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

/* CHECKOUT MODAL SPECIFICS */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  background: var(--surface-light);
  border: 1px solid #333;
  color: white;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 1rem;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: #333;
}
textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* TOAST ANIMATION */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--success);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.3s ease-out forwards;
}
.toast.hide {
  animation: fadeOut 0.3s ease-in forwards;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}

/* CLOSED POPUP */
.closed-popup {
  text-align: center;
  padding: 20px 0;
}
.closed-popup h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 1.5rem;
}
.closed-popup p {
  color: var(--text-dim);
  margin-bottom: 24px;
}

/* FOOTER */
.site-footer {
  background: var(--surface);
  border-top: 2px solid var(--primary-dark);
  padding: 1.5rem 1rem 1rem;
  margin-top: 2rem;
  text-align: center;
  padding-bottom: 1rem; /* Base padding without cart */
  transition: padding-bottom 0.3s ease;
}

body.has-cart-bar .site-footer {
  /* Reserva o espaço dinâmico real da barra do carrinho + margem de segurança */
  padding-bottom: calc(1.5rem + var(--cart-bar-height, 90px) + env(safe-area-inset-bottom, 0px));
}
.footer-brand h3 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 0.8rem;
}
.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.footer-brand p i {
  color: var(--primary);
  font-size: 1.2rem;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.social-link:active {
  transform: scale(0.95);
}
.social-link i {
  font-size: 1.3rem;
}
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--surface-light);
  font-size: 0.8rem;
  color: var(--text-dim);
}
.footer-bottom p {
  margin-bottom: 4px;
}

/* Fim dos estilos */
