/* ============================================
   480° Pizza Lounge — Cotizador de Eventos
   Aesthetic: Warm Rustic-Luxury / Wood-Fired Glow
   ============================================ */

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

:root {
  --flame: #E8531E;
  --flame-light: #FF7A45;
  --ember: #FF9E2C;
  --charcoal: #1A1612;
  --charcoal-soft: #2A2520;
  --warm-dark: #0F0D0B;
  --cream: #F5EDE4;
  --cream-soft: #EDE3D7;
  --smoke: #8B7E72;
  --ash: #6B6058;
  --wood: #3D3329;
  --wood-light: #5C4D3E;
  --gold: #C9A84C;
  --success: #5FA55A;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.35);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.25);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
  --glow: 0 0 40px rgba(232, 83, 30, 0.15);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--warm-dark);
  color: var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(232, 83, 30, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(201, 168, 76, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ---- HEADER ---- */
.header {
  position: relative;
  text-align: center;
  padding: 48px 20px 36px;
  background:
    linear-gradient(180deg, var(--charcoal) 0%, var(--warm-dark) 100%);
  border-bottom: 1px solid var(--wood);
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(232, 83, 30, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.brand {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  position: relative;
  color: var(--cream);
}

.brand-degree {
  color: var(--flame);
  font-weight: 800;
}

.brand-sub {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--smoke);
  margin-top: 4px;
}

.tagline {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--flame-light);
  margin-top: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ---- CONTAINER ---- */
.container {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 120px;
}

/* ---- FIELD GROUPS ---- */
.field-group {
  margin-top: 32px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 12px;
}

.field-icon {
  font-size: 18px;
}

.field-label-sub {
  font-size: 18px;
  margin-top: 12px;
}

.field-subtitle {
  font-size: 13px;
  color: var(--smoke);
  margin-top: -8px;
  margin-bottom: 16px;
}

.field-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--charcoal-soft);
  border: 1px solid var(--wood);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  -webkit-appearance: none;
}

.field-input:focus {
  border-color: var(--flame);
  box-shadow: 0 0 0 3px rgba(232, 83, 30, 0.15);
}

.field-input::placeholder {
  color: var(--ash);
}

.field-input + .field-input {
  margin-top: 10px;
}

.field-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Date input styling */
input[type="date"] {
  color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7) sepia(0.3) hue-rotate(340deg);
  cursor: pointer;
}

.field-hint {
  font-size: 13px;
  color: var(--smoke);
  margin-top: 8px;
}

.field-hint a {
  color: var(--flame-light);
  text-decoration: none;
  font-weight: 600;
}

.weekday-hint, .discount-hint {
  color: var(--success);
  font-weight: 500;
}

.premium-hint {
  color: var(--ember);
  font-weight: 500;
}

/* ---- ADDRESS AUTOCOMPLETE ---- */
.address-container {
  position: relative;
}

/* Style the Google PlaceAutocompleteElement */
.address-container gmp-place-autocomplete {
  width: 100%;
}

.address-container gmp-place-autocomplete::part(input) {
  width: 100%;
  padding: 14px 16px;
  background: var(--charcoal-soft);
  border: 1px solid var(--wood);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
}

.address-container gmp-place-autocomplete::part(input):focus {
  border-color: var(--flame);
  box-shadow: 0 0 0 3px rgba(232, 83, 30, 0.15);
}

/* Fallback input when Maps not loaded */
.address-fallback {
  width: 100%;
  padding: 14px 16px;
  background: var(--charcoal-soft);
  border: 1px solid var(--wood);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
}

/* ---- SLIDER ---- */
.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider-min, .slider-max {
  font-size: 13px;
  color: var(--ash);
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--wood);
  border-radius: 3px;
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--flame);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(232, 83, 30, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 16px rgba(232, 83, 30, 0.6);
}

.slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--flame);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(232, 83, 30, 0.4);
}

.slider-value {
  text-align: center;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--cream);
  margin-top: 8px;
  line-height: 1;
}

/* ---- MENU GRID ---- */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.menu-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--charcoal-soft);
  border: 2px solid transparent;
  transition: border-color 0.3s, transform 0.2s, box-shadow 0.3s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.menu-card:active {
  transform: scale(0.97);
}

.menu-card.selected {
  border-color: var(--flame);
  box-shadow: var(--glow), var(--shadow-card);
}

.card-img-wrapper {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.3s;
}

.menu-card:not(.selected) .card-img-wrapper img {
  filter: brightness(0.75) saturate(0.7);
}

.menu-card.selected .card-img-wrapper img {
  transform: scale(1.05);
  filter: brightness(1) saturate(1.1);
}

/* Checkmark overlay */
.card-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--flame);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.menu-card.selected .card-check {
  opacity: 1;
  transform: scale(1);
}

/* Bottom gradient on card */
.card-img-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(transparent, rgba(15, 13, 11, 0.85));
  pointer-events: none;
}

.card-title {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.3px;
  color: var(--cream-soft);
  background: var(--charcoal-soft);
}

/* Tooltip on tap */
.tooltip-bubble {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--charcoal);
  border: 1px solid var(--wood-light);
  color: var(--cream-soft);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  max-width: 300px;
  text-align: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 200;
}

.tooltip-bubble.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- PRICE SECTION ---- */
.price-section {
  margin-top: 40px;
  background:
    linear-gradient(135deg, var(--charcoal) 0%, var(--charcoal-soft) 100%);
  border: 1px solid var(--wood);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.price-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--flame), var(--ember), var(--flame));
}

.price-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--smoke);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.price-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-total {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 700;
  color: var(--cream);
  line-height: 1.1;
  transition: color 0.3s;
}

.price-per-person {
  font-size: 16px;
  color: var(--flame-light);
  font-weight: 600;
  margin-top: 4px;
}

.price-per-person span {
  font-family: var(--font-display);
  font-size: 20px;
}

.disclaimer {
  font-size: 12px;
  font-style: italic;
  color: var(--ash);
  margin-top: 12px;
}

/* ---- CONTACT SECTION ---- */
.contact-section {
  margin-top: 40px;
}

.btn-submit {
  width: 100%;
  padding: 18px;
  margin-top: 16px;
  background: linear-gradient(135deg, var(--flame) 0%, var(--flame-light) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(232, 83, 30, 0.3);
}

.btn-submit:hover:not(:disabled) {
  box-shadow: 0 6px 24px rgba(232, 83, 30, 0.45);
  transform: translateY(-1px);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
}

.btn-submit:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.submit-feedback {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  min-height: 20px;
  padding: 0;
  border-radius: var(--radius-sm);
  transition: all 0.4s ease;
}

.submit-feedback.success {
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  background: linear-gradient(135deg, #2d7a3a 0%, #1a5c27 100%);
  padding: 20px 16px;
  border: 1px solid #3a9e4a;
  box-shadow: 0 4px 20px rgba(45, 122, 58, 0.35);
  animation: fadeSlideIn 0.4s ease;
}

.submit-feedback.error {
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  background: linear-gradient(135deg, var(--flame) 0%, #c0391b 100%);
  padding: 16px;
  border: 1px solid var(--flame-light);
  box-shadow: 0 4px 16px rgba(232, 83, 30, 0.3);
  animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- LOADING SPINNER ---- */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--smoke);
  border-top-color: var(--flame);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-left: 6px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- ANIMATIONS ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.field-group {
  animation: fadeInUp 0.5s ease-out both;
}

.field-group:nth-child(1) { animation-delay: 0.05s; }
.field-group:nth-child(2) { animation-delay: 0.1s; }
.field-group:nth-child(3) { animation-delay: 0.15s; }
.field-group:nth-child(4) { animation-delay: 0.2s; }

.price-section {
  animation: fadeInUp 0.5s ease-out 0.25s both;
}

.contact-section {
  animation: fadeInUp 0.5s ease-out 0.3s both;
}

/* Menu card stagger */
.menu-card {
  animation: fadeInUp 0.4s ease-out both;
}
.menu-card:nth-child(1) { animation-delay: 0.22s; }
.menu-card:nth-child(2) { animation-delay: 0.28s; }
.menu-card:nth-child(3) { animation-delay: 0.34s; }
.menu-card:nth-child(4) { animation-delay: 0.40s; }
.menu-card:nth-child(5) { animation-delay: 0.46s; }
.menu-card:nth-child(6) { animation-delay: 0.52s; }

/* Price pulse on change */
@keyframes pricePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.price-total.pulse {
  animation: pricePulse 0.3s ease;
}

/* ---- DESKTOP ENHANCEMENT ---- */
@media (min-width: 768px) {
  .container {
    max-width: 580px;
    padding: 0 24px 120px;
  }

  .brand {
    font-size: 80px;
  }

  .menu-grid {
    gap: 16px;
  }

  .menu-card:hover:not(.selected) .card-img-wrapper img {
    filter: brightness(0.8) saturate(0.9);
    transform: scale(1.02);
  }

  .field-input {
    padding: 16px 18px;
  }

  .price-total {
    font-size: 60px;
  }
}

/* ---- PLACEHOLDER IMAGES ---- */
/* When no images available, show gradient placeholders */
.menu-card img[src=""],
.menu-card img:not([src]) {
  background: linear-gradient(135deg, var(--wood) 0%, var(--charcoal) 100%);
}
