:root {
  --primary-color: #1a4a5e;
  --primary-light: #2d6a7a;
  --primary-dark: #0d2f3d;
  --accent-color: #c4a35a;
  --accent-light: #d4b76a;
  --text-dark: #1a1a1a;
  --text-medium: #4a4a4a;
  --text-light: #7a7a7a;
  --bg-light: #f8f9fa;
  --bg-card: #ffffff;
  --border-light: #e8e8e8;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  background: var(--bg-light);
  color: var(--text-dark);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Watermark background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 100px,
      rgba(26, 74, 94, 0.02) 100px,
      rgba(26, 74, 94, 0.02) 200px
    );
  pointer-events: none;
  z-index: 0;
}

/* Watermark text pattern */
.watermark-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.watermark-text {
  position: absolute;
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-style: italic;
  color: rgba(26, 74, 94, 0.04);
  white-space: nowrap;
  transform: rotate(-15deg);
  user-select: none;
}

/* Header */
.header {
  background: var(--primary-color);
  padding: 16px 20px;
  position: relative;
  z-index: 10;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  gap: 16px;
}

/* Logo del cliente (izquierda) */
.header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.header-logo img {
  max-height: 50px;
  max-width: 150px;
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
  /* Removido el filtro para que el logo se vea con sus colores originales */
}


/* Nombre FasterFood (derecha) */
.header-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.brand-name {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #1E1E2D;
  letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    gap: 12px;
  }
  
  .header-logo img {
    max-height: 40px;
    max-width: 120px;
  }
  
  .brand-name {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 12px 16px;
  }
  
  .brand-name {
    font-size: 12px;
  }
}

/* Navigation tabs */
.nav-container {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 16px;
  gap: 8px;
}

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

.nav-tab {
  flex-shrink: 0;
  padding: 16px 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-light);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.nav-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--primary-color);
  transition: width 0.3s ease;
  border-radius: 2px 2px 0 0;
}

.nav-tab:hover {
  color: var(--primary-color);
}

.nav-tab.active {
  color: var(--primary-color);
}

.nav-tab.active::after {
  width: 100%;
}

/* Main content */
.main-content {
  position: relative;
  z-index: 1;
  padding: 24px 16px 100px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Category section */
.category-section {
  margin-bottom: 40px;
}

.category-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--primary-color);
  margin-top: 32px;
  margin-bottom: 20px;
  padding-left: 4px;
  position: relative;
  text-transform: uppercase;
}

/* Subcategorías sin mayúsculas (POPULARES y TODOS) */
.subcategoria-title {
  text-transform: none;
}

.category-title::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 60px;
  height: 2px;
  background: var(--accent-color);
}

/* Primera palabra con línea dorada debajo (para subcategorías) */
.category-title-first-word {
  position: relative;
  display: inline-block;
}

/* Línea dorada debajo de la primera palabra */
.category-title-first-word::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  min-width: 50px;
  height: 3px;
  background: var(--accent-color, #c4a35a);
  border-radius: 0;
}

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

@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Product card */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: row;
  position: relative;
  border: 1px solid var(--border-light);
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-info {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  color: #1a1a1a !important;
}

.product-name {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a !important;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 1 !important;
  visibility: visible !important;
}

.product-description {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.product-price {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
}

.product-image-container {
  width: 140px;
  min-width: 140px;
  height: 140px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

/* Image Zoom Modal */
.image-zoom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  animation: fadeIn 0.3s ease;
  backdrop-filter: blur(10px);
  overflow-y: auto;
}

.image-zoom-modal.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.image-zoom-content {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.4s ease;
}

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

/* Contenedor de imagen (parte superior) */
.image-zoom-image-container {
  position: relative;
  width: 100%;
  height: 60vh;
  min-height: 400px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-zoom-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Botón cerrar (esquina superior derecha) */
.image-zoom-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 10;
}

.image-zoom-close:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

/* Panel de información (parte inferior con fondo oscuro) */
.image-zoom-info-panel {
  background: #1a1a1a;
  padding: 24px 24px 40px;
  margin-top: 0;
  position: relative;
  z-index: 5;
  min-height: 40vh;
}

/* Contenido del panel */
.image-zoom-info-content {
  color: #ffffff;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.image-zoom-category {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}

.image-zoom-name {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #ffffff !important;
  line-height: 1.2;
}

.image-zoom-description {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85) !important;
  line-height: 1.6;
  margin-bottom: 20px;
  font-weight: 400;
}

.image-zoom-price {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 600;
  color: #ffffff;
  margin-top: 8px;
}

/* Mobile adjustments for zoom modal */
@media (max-width: 768px) {
  .image-zoom-image-container {
    height: 50vh;
    min-height: 300px;
  }

  .image-zoom-close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .image-zoom-info-panel {
    padding: 20px 20px 32px;
  }

  .image-zoom-name {
    font-size: 26px;
  }

  .image-zoom-description {
    font-size: 14px;
  }

  .image-zoom-price {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .image-zoom-image-container {
    height: 45vh;
    min-height: 250px;
  }

  .image-zoom-info-panel {
    padding: 16px 16px 28px;
  }

  .image-zoom-name {
    font-size: 22px;
  }

  .image-zoom-description {
    font-size: 13px;
  }

  .image-zoom-price {
    font-size: 18px;
  }
}

.product-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 32px;
}

/* Badge */
.product-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  z-index: 2;
}

.badge-new {
  background: var(--accent-color);
  color: #fff;
}

.badge-popular {
  background: var(--primary-color);
  color: #fff;
}

.badge-limited {
  background: #8b5a2b;
  color: #fff;
}

/* Características del producto (vegano/picante) - solo iconos */
.product-features {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-left: 8px;
}

.product-feature {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.product-feature-icon {
  font-size: 18px;
}

/* Contenedor de precio con características */
.product-price-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Contenedor de badge cuando no hay imagen */
.product-badge-container {
  position: relative;
  width: 100%;
  min-height: 40px;
}

.product-badge-container .product-badge {
  position: absolute;
  top: 8px;
  right: 8px;
}

/* Favorite button */
.favorite-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2;
}

.favorite-btn:hover {
  background: #fff;
  transform: scale(1.1);
}

.favorite-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--primary-color);
  stroke-width: 2;
  transition: all 0.3s ease;
}

.favorite-btn.active svg {
  fill: #e74c3c;
  stroke: #e74c3c;
}


/* Loading & Error states */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-light);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  font-size: 16px;
  color: var(--text-light);
}

.error-container {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-medium);
}

.error-container svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  stroke: var(--text-light);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .header {
    padding: 20px 16px 12px;
  }

  .header h1 {
    font-size: 1.6rem;
    letter-spacing: 2px;
  }

  .nav-tab {
    padding: 14px 16px;
    font-size: 12px;
  }

  .main-content {
    padding: 16px 12px 80px;
  }

  .category-title {
    font-size: 22px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .product-card {
    flex-direction: row;
  }

  .product-image-container {
    width: 120px;
    min-width: 120px;
    height: 120px;
  }

  .product-info {
    padding: 12px;
  }

  .product-name {
    font-size: 15px;
  }

  .product-description {
    font-size: 12px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .product-price {
    font-size: 16px;
  }
}

/* Scroll indicator for nav */
.nav-container::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: transparent;
  pointer-events: none;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-light: #1a1a1a;
    --bg-card: #2a2a2a;
    --text-dark: #f0f0f0;
    --text-medium: #c0c0c0;
    --text-light: #888888;
    --border-light: #3a3a3a;
  }

  .nav-container {
    background: var(--bg-card);
  }

  .nav-container::after {
    background: transparent;
  }

  .product-placeholder {
    background: #2a2a2a;
  }
  
  /* Forzar que el nombre del producto siempre sea oscuro en modo claro */
  .product-name {
    color: #1a1a1a !important;
  }
}
