/* ==========================================================================
   La Carpita del Veci — styles.css
   ========================================================================== */

:root {
  --black: #0D0D0D;
  --black2: #1A1A1A;
  --red: #E30613;
  --red-dark: #B00510;
  --gold: #FFC72C;
  --gold-dark: #D6A61E;
  --white: #FFFFFF;
  --gray: #B8B8B4;

  --font-display: 'Fredoka', sans-serif;
  --font-body: 'Poppins', sans-serif;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.35);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.45);
  --shadow-lg: 0 12px 34px rgba(0,0,0,0.55);
}

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
  width: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  width: 100%;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
}

p, span, a, button, input, textarea, select, label {
  font-family: var(--font-body);
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font-body); }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 70px 0;
}

.section--alt {
  background: var(--black2);
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--gold);
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--gray);
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: 1rem;
}

.section-title .accent { color: var(--red); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }

.btn--red {
  background: var(--red);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn--red:hover { background: var(--red-dark); }

.btn--gold {
  background: var(--gold);
  color: var(--black);
  box-shadow: var(--shadow-sm);
}
.btn--gold:hover { background: var(--gold-dark); }

.btn--outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}
.btn--outline:hover { background: rgba(255,199,44,0.12); }

.btn--green {
  background: #25D366;
  color: var(--white);
}
.btn--green:hover { background: #1DAE54; }

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  border-bottom: 1px solid #262626;
  transition: box-shadow .25s ease, padding .25s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  padding: 5px 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-brand img {
  height: 48px;
  width: 48px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.nav-brand span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--white);
  font-size: 0.95rem;
  position: relative;
}

.nav-links a:hover { color: var(--red); }

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

.lang-pill {
  display: flex;
  border: 2px solid var(--gold);
  border-radius: 50px;
  overflow: hidden;
}

.lang-pill button {
  border: none;
  background: transparent;
  padding: 5px 12px;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--white);
}

.lang-pill button.active {
  background: var(--gold);
  color: var(--black);
}

.nav-call {
  background: var(--red);
  color: var(--white);
  padding: 9px 16px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.nav-call:hover { background: var(--red-dark); }
.nav-call .call-text { white-space: nowrap; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 6px;
}
.hamburger span {
  width: 24px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.mobile-nav {
  position: fixed;
  top: 64px;
  left: 0; right: 0;
  background: var(--black2);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  gap: 14px;
  transform: translateY(-120%);
  transition: transform .3s ease;
  z-index: 999;
}
.mobile-nav.open { transform: translateY(0); }
.mobile-nav a {
  font-weight: 600;
  font-size: 1.05rem;
  padding: 6px 0;
  border-bottom: 1px solid #2a2a2a;
  color: var(--white);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('img/hero.png') center/cover no-repeat;
  overflow: hidden;
  padding: 120px 20px 80px;
}

.hero::before {
  /* CORREGIDO: el cliente pidió quitar el degradado oscuro para que la
     foto se vea limpia. En su lugar, un leve toque de color (vignette
     rojo/dorado inspirado en Ecuador) en los bordes, sin oscurecer la
     imagen. */
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(227,6,19,0) 45%, rgba(227,6,19,0.22) 100%),
    linear-gradient(0deg, rgba(255,199,44,0.16) 0%, rgba(255,199,44,0) 25%);
  mix-blend-mode: normal;
  z-index: 1;
}

.hero::after {
  /* Solo una franja muy sutil abajo, para que los botones se lean bien
     sobre la foto — mucho más ligera que el degradado negro anterior. */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 62%, rgba(0,0,0,0.35) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 740px;
}

.hero-logo {
  width: 260px;
  height: 260px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  animation: heartbeat 1.2s ease-in-out infinite;
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.hero-title {
  color: var(--gold);
  font-size: clamp(2.1rem, 7.5vw, 3.6rem);
  text-shadow:
    2px 2px 0 #000,
    -2px 2px 0 #000,
    2px -2px 0 #000,
    -2px -2px 0 #000;
  line-height: 1.1;
}

.hero-title .accent-red { color: var(--red); }

.hero-tagline {
  color: var(--white);
  font-size: clamp(1rem, 2.6vw, 1.25rem);
  opacity: 0.95;
  max-width: 560px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.hero-actions .btn { font-size: clamp(0.95rem, 2.6vw, 1.15rem); padding: 16px 32px; }

@media (max-width: 600px) {
  .hero-logo { width: 190px; height: 190px; }
}

/* ==========================================================================
   Menu
   ========================================================================== */
.menu-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

.menu-tab {
  padding: 9px 20px;
  border-radius: 50px;
  border: 2px solid var(--gold);
  background: transparent;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--white);
  transition: background .2s ease, color .2s ease;
}

.menu-tab.active,
.menu-tab:hover {
  background: var(--gold);
  color: var(--black);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (min-width: 900px) {
  .menu-grid { grid-template-columns: repeat(4, 1fr); }
}

.menu-card {
  background: var(--black2);
  border: 1px solid #3a2f0f;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
}

.menu-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md), 0 0 0 2px var(--red);
}

.menu-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.menu-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-card-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.menu-card-body h4 {
  font-size: 1rem;
  line-height: 1.25;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
}

.menu-card-desc {
  font-size: 0.78rem;
  color: var(--gray);
  min-height: 0;
  flex: 1;
}

.whatsapp-ask-btn {
  margin-top: auto;
  background: #25D366;
  color: var(--white);
  border: none;
  border-radius: 50px;
  padding: 10px 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  transition: background .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.whatsapp-ask-btn:hover { background: #1DAE54; }

.add-to-cart-btn {
  margin-top: auto;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 50px;
  padding: 10px 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.add-to-cart-btn:hover { background: var(--red-dark); transform: translateY(-2px); }
.add-to-cart-btn.added {
  background: var(--gold);
  color: var(--black);
}
.add-to-cart-btn.added:hover { background: var(--gold-dark); }

/* ==========================================================================
   Bestsellers slider
   ========================================================================== */
.bestsellers-slider {
  padding: 40px 0 20px;
  overflow: hidden;
}

.bs-title {
  text-align: center;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin-bottom: 24px;
}

.bs-slider-viewport {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}

.bs-slider-track { display: flex; }

.bs-slider-inner {
  display: flex;
  gap: 20px;
  padding: 0 10px;
  animation: bsScroll 28s linear infinite;
}

.bs-slider-viewport:hover .bs-slider-inner { animation-play-state: paused; }

@keyframes bsScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.bs-slide {
  flex: 0 0 auto;
  width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.bs-slide img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 16px;
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-sm);
}

.bs-slide span {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--white);
  font-size: 0.9rem;
  text-align: center;
}

/* ==========================================================================
   Catering
   ========================================================================== */
.catering {
  position: relative;
  background: url('img/catering.png') center/cover no-repeat;
  padding: 80px 0;
}

.catering::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,13,13,0.72), rgba(13,13,13,0.88));
}

.catering .container {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.catering .container h2 { color: var(--gold); }
.catering .container p {
  color: var(--white);
  max-width: 640px;
  font-size: 1rem;
  line-height: 1.7;
}

.catering-form {
  width: 100%;
  max-width: 560px;
  background: rgba(13,13,13,0.82);
  border: 1px solid #3a2f0f;
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  box-shadow: var(--shadow-md);
}

.catering-form h3 {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-align: center;
  margin-bottom: 4px;
}

.catering-form .form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 560px) {
  .catering-form .form-row { grid-template-columns: 1fr 1fr; }
}

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

.form-field label {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
  background: var(--black2);
  border: 1px solid #3a2f0f;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-field textarea { resize: vertical; }

.catering-form .btn { align-self: center; margin-top: 4px; }

/* ==========================================================================
   Reviews
   ========================================================================== */
.reviews-google-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.reviews-rating {
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  font-family: var(--font-display);
}

.reviews-stars {
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.reviews-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.review-card {
  background: var(--black2);
  border: 1px solid #333;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.review-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.review-stars-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-google-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: #9aa0a6;
  font-weight: 600;
}

.review-photo {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 4px;
}

.review-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.review-name { font-weight: 700; font-size: 0.92rem; color: var(--white); }
.review-stars { color: var(--gold); font-size: 0.9rem; }
.review-text { font-size: 0.85rem; color: var(--gray); line-height: 1.55; }

.reviews-disclaimer {
  text-align: center;
  font-size: 0.78rem;
  color: #888;
  margin-top: 24px;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--gray);
}

.contact-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.contact-socials {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.social-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--black2);
  border: 1px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .2s ease;
}
.social-circle:hover { background: var(--gold); transform: translateY(-3px); }
.social-circle svg { width: 20px; height: 20px; fill: var(--white); }
.social-circle:hover svg { fill: var(--black); }

.contact-map iframe {
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #333;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--black);
  color: #ccc;
  padding: 40px 0 20px;
  text-align: center;
  border-top: 1px solid #262626;
}

.footer-credit {
  font-weight: 700;
  color: var(--gold);
  font-size: 1.05rem;
  margin-bottom: 18px;
}
.footer-credit a { color: var(--gold); }
.footer-credit a:hover { text-decoration: underline; }

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 18px 0;
}

.footer p { font-size: 0.85rem; color: #b0b0aa; margin: 4px 0; }

.footer-bottom {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #262626;
  font-size: 0.75rem;
  color: #777;
}

/* ==========================================================================
   Floating WhatsApp button
   ========================================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 1500;
  transition: transform .2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; }

/* ==========================================================================
   Carrito flotante (sin precios)
   ========================================================================== */
.cart-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 58px;
  height: 58px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 1500;
  transition: transform .2s ease;
}
.cart-float:hover { transform: scale(1.08); }

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--gold);
  color: var(--black);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-family: var(--font-display);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

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

.cart-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(380px, 92vw);
  height: 100%;
  background: var(--black2);
  border-left: 1px solid #3a2f0f;
  z-index: 1700;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: right .3s ease;
  box-shadow: -8px 0 24px rgba(0,0,0,0.4);
}

.cart-drawer.open { right: 0; }

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-drawer-header h3 {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.cart-close-btn {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
}

.cart-empty-msg {
  color: var(--gray);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 20px;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--black);
  border: 1px solid #333;
  border-radius: 10px;
  padding: 10px 12px;
}

.cart-item-name {
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 600;
  flex: 1;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-size: 0.9rem;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}
.qty-btn:hover { background: var(--gold); color: var(--black); }

.cart-item-remove {
  background: transparent;
  border: none;
  color: #999;
  font-size: 0.9rem;
  cursor: pointer;
}
.cart-item-remove:hover { color: var(--red); }

.cart-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #333;
}

/* ==========================================================================
   Mobile optimizations (critical)
   ========================================================================== */
@media (max-width: 600px) {
  /* CORREGIDO: el cliente pidió que el nombre "La Carpita del Veci" se
     siga viendo en amarillo junto al logo en móvil, en vez de
     ocultarlo por completo. Se reduce el tamaño de fuente y el ancho
     máximo para que no choque con los botones ES/EN/teléfono. */
  .nav-brand span {
    display: block;
    font-size: 0.72rem;
    max-width: 92px;
    line-height: 1.15;
  }
  .nav-brand img { height: 38px; width: 38px; }
  .nav-call .call-text { display: none; }
  .nav-call { padding: 9px 11px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-actions { gap: 6px; }
  .lang-pill button { padding: 5px 8px; font-size: 0.72rem; }
  .section { padding: 50px 0; }
}

@media (max-width: 360px) {
  /* Pantallas muy angostas: ocultar el texto de la marca para evitar
     que el navbar se desborde. */
  .nav-brand span { display: none; }
}

@media (max-width: 480px) {
  .hero { padding: 110px 16px 60px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
}
