﻿/* ═══════════════════════════════════════
   ALFA DOMICILIOS — Enterprise UI v1
   Futuristic · Cyberpunk Minimalist · Premium
   Brand: Alfa Domicilios
   ═══════════════════════════════════════ */

:root {
  /* Common */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --accent: #00E5C0;
  /* Neon Turquoise */
  --accent-glow: rgba(0, 229, 192, 0.3);
  --accent-soft: rgba(0, 229, 192, 0.1);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xl: 30px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Dark Mode (Default) */
  --bg: #0B0B0B;
  --surface: #141414;
  --surface-elevated: #1F1F1F;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 229, 192, 0.4);
  --text: #FFFFFF;
  --text-sec: #A0A0A0;
  --text-muted: #666666;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.05);
}

/* Light Mode Overrides */
[data-theme="light"] {
  --bg: #F0F2F5;
  --surface: #FFFFFF;
  --surface-elevated: #E9ECEF;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 229, 192, 0.6);
  --text: #1A1A1A;
  --text-sec: #495057;
  --text-muted: #ADB5BD;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --glass: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.05);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* ═════ UTILITIES ═════ */
.glow-text {
  text-shadow: 0 0 10px var(--accent-glow);
}

.glow-box {
  box-shadow: 0 0 20px var(--accent-glow);
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

.service-card-v3 {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.25s ease;
  overflow: hidden;
}

.service-card-v3::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.25s ease;
  box-shadow: 0 0 0px #00E5C0;
}

.service-card-v3:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: #00E5C0;
  box-shadow: 0 10px 25px rgba(0, 229, 192, 0.15);
}

.service-card-v3:hover::before {
  opacity: 1;
  box-shadow: 0 0 15px #00E5C0;
}

.service-card-v3::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent, #00E5C0, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card-v3:hover::after {
  opacity: 0.3;
}

/* ═════ NAVBAR ═════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 24px;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(var(--bg), 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand span {
  color: var(--accent);
  filter: drop-shadow(0 0 5px var(--accent-glow));
}

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

.nav-links a {
  color: var(--text-sec);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

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

.nav-cta {
  background: var(--accent);
  color: #000 !important;
  padding: 10px 24px;
  border-radius: var(--radius-xl);
  font-weight: 700;
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* ═════ HERO ═════ */
.hero-v3 {
  padding: 140px 24px 60px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.hero-v3 h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.hero-v3 h1 .gradient-text {
  background: linear-gradient(90deg, #00e5bf6a, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  color: var(--text-sec);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 40px;
}

/* Search Box */
.search-container {
  max-width: 600px;
  margin: 0 auto 60px;
  position: relative;
}

.search-wrapper {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 6px 6px 6px 20px;
  transition: var(--transition);
}

.search-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.search-wrapper input {
  background: none;
  border: none;
  color: var(--text);
  flex: 1;
  padding: 12px;
  font-size: 1rem;
  outline: none;
}

.search-btn {
  background: var(--accent);
  color: #000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ═════ CATEGORIES ═════ */
.category-strip {
  margin-bottom: 40px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 20px;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.cat-card-v3 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-sec);
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.cat-card-v3:hover,
.cat-card-v3.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.cat-emoji {
  font-size: 1.2rem;
}

/* ═════ RESTAURANT GRID ═════ */
.grid-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.grid-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
}

.grid-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
}

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

.restaurant-card-v3 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  text-decoration: none;
  color: inherit;
}

.restaurant-card-v3:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.card-img-wrapper {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.5s ease;
}

.restaurant-card-v3:hover .card-img-wrapper img {
  scale: 1.1;
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.badge-open {
  background: rgba(0, 229, 192, 0.8);
  color: #000;
}

.badge-closed {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

.card-info {
  padding: 20px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-sec);
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-rating {
  color: #FFD700;
}

/* ═════ THEME TOGGLE ═════ */
.theme-toggle {
  position: fixed;
  bottom: 32px;
  left: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  color: var(--text);
  box-shadow: var(--shadow);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .hero-v3 h1 {
    font-size: 2.8rem;
  }

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

  .restaurant-card-v3 {
    display: flex;
    height: 120px;
  }

  .card-img-wrapper {
    width: 120px;
    height: 100%;
  }

  .card-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .card-title {
    font-size: 1rem;
  }
}

/* ═════ RESTAURANT DETAIL ═════ */
.detail-hero {
  height: 40vh;
  position: relative;
  overflow: hidden;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, var(--bg) 20%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 40px 24px;
}

.detail-header-info {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.detail-header-info h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 8px;
}

/* Sticky Categories */
.sticky-tabs {
  position: sticky;
  top: 60px;
  background: rgba(var(--bg), 0.8);
  backdrop-filter: blur(20px);
  z-index: 900;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sticky-tabs::-webkit-scrollbar {
  display: none;
}

.tab-link {
  color: var(--text-sec);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  padding-bottom: 8px;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.tab-link.active {
  color: var(--accent);
  border-color: var(--accent);
}

/* Product Cards */
.products-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 40px 0 20px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition);
  cursor: pointer;
}

.product-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-elevated);
}

.product-info {
  flex: 1;
}

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

.product-desc {
  font-size: 0.85rem;
  color: var(--text-sec);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-weight: 800;
  color: var(--accent);
}

.product-img {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

/* Floating Cart Button */
.floating-cart {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: 24px;
  background: var(--accent);
  color: #000;
  padding: 16px 24px;
  border-radius: var(--radius-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  box-shadow: 0 10px 30px var(--accent-glow);
  z-index: 1000;
  transition: var(--transition);
  text-decoration: none;
}

.floating-cart:hover {
  transform: translateY(-4px);
  filter: brightness(1.1);
}

.cart-count {
  background: #000;
  color: #fff;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    padding: 12px;
  }

  .product-img {
    width: 80px;
    height: 80px;
  }
}

/* ═════ ORDER TRACKING ═════ */
.tracking-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 100px 20px 40px;
}

.tracking-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.tracking-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.tracking-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.tracking-status {
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.tracking-msg {
  color: var(--text-sec);
  font-size: 0.95rem;
}

.timeline-v1 {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 40px 0;
  padding: 0 10px;
}

.timeline-v1::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--border);
  z-index: 1;
}

.timeline-progress {
  position: absolute;
  top: 15px;
  left: 0;
  height: 4px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  z-index: 2;
  transition: width 1s ease;
}

.timeline-step {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.step-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  border: 4px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: var(--transition);
}

.timeline-step.active .step-dot {
  border-color: var(--accent);
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 15px var(--accent-glow);
}

.timeline-step.completed .step-dot {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.step-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
}

.timeline-step.active .step-label {
  color: var(--accent);
}

.order-detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.detail-item:last-child {
  border: none;
}

.detail-label {
  color: var(--text-sec);
  font-size: 0.9rem;
}

.detail-value {
  font-weight: 700;
  color: var(--text);
}

.alert-card {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.alert-card i {
  font-size: 1.5rem;
  color: var(--accent);
}

.alert-card p {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Filtros Status */
.status-btn {
  padding: 8px 20px;
  border-radius: 30px;
  border: none;
  background: none;
  color: var(--text-sec);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.status-btn.active {
  background: var(--accent) !important;
  color: #000 !important;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.status-btn:hover:not(.active) {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Mejora Hover Cartas Servicios */
.service-card-v3:hover div:first-of-type {
  transform: translateY(-5px) scale(1.2) rotate(5deg);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Bot�n Volver Arriba */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--shadow);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: scale(1.1);
}


/* Badge Popular */
.badge-popular {
  left: auto !important;
  right: 12px !important;
  background: linear-gradient(135deg, #FF4B2B, #FF416C) !important;
  color: white !important;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 15px rgba(255, 65, 108, 0.4);
}
/* ═════ ENTERPRISE RESPONSIVE ENHANCEMENTS ═════ */

/* Mobile Bottom Navigation (Glass) */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(var(--bg), 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 1000;
  padding: 0 20px;
  justify-content: space-around;
  align-items: center;
}

@media (max-width: 768px) {
  .mobile-nav { display: flex; }
  .navbar { padding: 12px 20px; }
  .grid-container { padding: 0 16px; }
}

.mob-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-sec);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  transition: var(--transition);
}

.mob-nav-item i {
  font-size: 1.2rem;
}

.mob-nav-item.active {
  color: var(--accent);
}

/* Fluid Grids for Mid-Size */
@media (min-width: 769px) and (max-width: 1100px) {
  .grid-v3 { grid-template-columns: repeat(3, 1fr); }
}

/* 4K / UltraWide Support */
.grid-container {
  max-width: 1440px !important;
}

/* Form factor improvements */
input, select, button {
  -webkit-appearance: none;
  outline: none;
}


/* Mobile BackToTop Adjustment */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 90px;
    width: 44px;
    height: 44px;
  }
}

