/*
 * MI FINCA EXPRESS - Delivery Professional Theme
 * Diseño moderno para plataforma de delivery
 */

/* ==========================================================================
   Variables CSS - Delivery Theme
   ========================================================================== */

:root {
    /* Nueva Paleta Fresca - Amarillos, Dorados, Naranjas, Rojos, Madera */
    --delivery-primary: #fbbf24;     /* Amarillo dorado */
    --delivery-primary-light: #fde68a;
    --delivery-primary-dark: #f59e0b;
    --delivery-secondary: #f97316;   /* Naranja vibrante */
    --delivery-secondary-light: #fb923c;
    --delivery-accent: #ef4444;     /* Rojo acento */
    --delivery-accent-light: #fca5a5;
    --delivery-warning: #f59e0b;    /* Dorado */
    --delivery-error: #dc2626;      /* Rojo error */
    
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #fef9e7;
    --bg-tertiary: #fef3c7;
    --bg-card: #ffffff;
    --bg-dark: #4a2c2a;
    --bg-overlay: rgba(74, 44, 42, 0.4);
    
    /* Textos */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #ffffff;
    --text-muted: #94a3b8;
    
    /* Bordes y sombras */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.07), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    
    /* Gradientes frescos */
    --gradient-primary: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-success: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --gradient-hero: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    
    /* Espaciado */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    
    /* Bordes redondeados modernos */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 50px;
}

/* ==========================================================================
   Header Delivery Style
   ========================================================================== */

.delivery-header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
}

.delivery-header .top-bar {
    background: var(--gradient-primary);
    color: var(--text-light);
    padding: var(--spacing-sm) 0;
    font-size: 0.875rem;
    text-align: center;
}

.delivery-header .main-nav {
    padding: var(--spacing-md) 0;
}

.delivery-header .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.delivery-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--delivery-primary);
    text-decoration: none;
}

.delivery-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.delivery-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.location-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.location-selector:hover {
    border-color: var(--delivery-primary);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Floating Cart Button
   ========================================================================== */

.floating-cart-button {
    position: fixed !important;
    bottom: 2rem !important;
    right: 2rem !important;
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
    z-index: 9999 !important;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0;
    pointer-events: auto !important;
    touch-action: manipulation;
}

.floating-cart-button * {
    pointer-events: none;
}

.floating-cart-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 35px rgba(6, 182, 212, 0.4);
}

.floating-cart-button:active {
    transform: translateY(-2px) scale(1.02);
}

.floating-cart-button .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--delivery-error);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    border: 2px solid white;
    animation: cartPulse 2s infinite;
}

@keyframes cartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ==========================================================================
   Cart Sidebar - Estilo Moderno
   ========================================================================== */

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    pointer-events: none;
}

.cart-sidebar.active {
    pointer-events: auto;
}

.cart-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.cart-sidebar-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active .cart-sidebar-content {
    transform: translateX(0);
}

.cart-sidebar-header {
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-bottom: 2px solid rgba(6, 182, 212, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.cart-sidebar-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.5rem;
    font-weight: 800;
}

.cart-sidebar-close {
    background: white;
    border: 2px solid #e2e8f0;
    font-size: 1.75rem;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
}

.cart-sidebar-close:hover {
    background: var(--delivery-error);
    border-color: var(--delivery-error);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #fafbfc;
}

.cart-loading {
    text-align: center;
    padding: var(--spacing-xxl);
    color: var(--text-muted);
}

.cart-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--delivery-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-md);
}

.cart-sidebar-footer {
    padding: 1.5rem;
    background: white;
    border-top: 2px solid #e2e8f0;
    flex-shrink: 0;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.cart-total {
    font-size: 1.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

.cart-actions {
    display: flex;
    gap: 1rem;
}

.btn-cart-continue {
    flex: 1;
    padding: 1rem;
    background: white;
    color: var(--delivery-primary);
    border: 2px solid var(--delivery-primary);
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cart-continue:hover {
    background: var(--delivery-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-cart-checkout {
    flex: 2;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-cart-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
}

/* Cart Item en Sidebar */
.cart-sidebar-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    transition: background 0.3s ease;
}

.cart-modal-item:hover {
    background: var(--bg-tertiary);
}

.cart-modal-item:last-child {
    border-bottom: none;
}

.cart-modal-item-image {
    width: 60px;
    height: 60px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.cart-modal-item-info {
    flex: 1;
}

.cart-modal-item-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.cart-modal-item-price {
    color: var(--delivery-primary);
    font-weight: 600;
}

.cart-modal-item-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.cart-modal-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    color: var(--delivery-primary);
    transition: all 0.3s ease;
}

.cart-modal-qty-btn:hover {
    background: var(--delivery-primary);
    color: white;
    transform: scale(1.1);
}

.cart-modal-qty-value {
    min-width: 30px;
    text-align: center;
    font-weight: 700;
}

.cart-modal-item-total {
    font-weight: 800;
    color: var(--text-primary);
    margin-left: var(--spacing-md);
}

/* Empty Cart */
.cart-empty {
    text-align: center;
    padding: var(--spacing-xxl);
    color: var(--text-muted);
}

.cart-empty-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.5;
}

.cart-empty h3 {
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

/* Animaciones */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 640px) {
    .floating-cart-button {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }
    
    .cart-modal-content {
        width: 95%;
        margin: var(--spacing-md);
    }
    
    .cart-modal-header {
        padding: var(--spacing-lg);
    }
    
    .cart-modal-body {
        padding: var(--spacing-md);
    }
    
    .cart-modal-footer {
        padding: var(--spacing-lg);
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .btn-cart-continue,
    .btn-cart-checkout {
        width: 100%;
    }
}

/* ==========================================================================
   Hero Section - Delivery Style
   ========================================================================== */

.delivery-hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: var(--spacing-xxl) 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.feature-card {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

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

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    font-size: 1.5rem;
    color: white;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.feature-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==========================================================================
   Product Grid - Delivery Style
   ========================================================================== */

.delivery-products {
    padding: var(--spacing-xxl) 0;
    background: var(--bg-primary);
}

.products-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
}

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

.product-image {
    width: 100%;
    height: 200px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-muted);
    position: relative;
    overflow: hidden;
}

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

.product-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--delivery-error);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.product-info {
    padding: var(--spacing-lg);
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
}

.product-price {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.price-current {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--delivery-primary);
}

.price-original {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.qty-btn {
    background: var(--bg-secondary);
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: var(--delivery-primary);
    color: white;
}

.qty-input {
    border: none;
    width: 40px;
    height: 32px;
    text-align: center;
    font-weight: 600;
    background: var(--bg-primary);
}

.add-to-cart-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.add-to-cart-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   Store Info Widget
   ========================================================================== */

.store-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--bg-card);
    border: 2px solid var(--delivery-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    max-width: 300px;
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.store-widget-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.store-widget-icon {
    font-size: 1.2rem;
}

.store-widget-title {
    font-weight: 600;
    color: var(--delivery-primary);
    font-size: 0.9rem;
}

.store-widget-info {
    color: var(--text-primary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.store-widget-info strong {
    display: block;
    margin-bottom: var(--spacing-xs);
}

.store-widget-address {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.store-widget-delivery {
    color: var(--delivery-accent);
    font-weight: 600;
}

.change-store-btn {
    background: var(--delivery-primary);
    color: white;
    border: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: var(--spacing-sm);
    width: 100%;
    transition: all 0.2s ease;
}

.change-store-btn:hover {
    background: var(--delivery-secondary);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    /* Header optimizado para tablet */
    .delivery-header .top-bar {
        font-size: 0.8125rem;
        padding: 0.625rem 0;
    }
    
    .delivery-header .nav-container {
        padding: 0 1rem;
    }
    
    .delivery-logo {
        font-size: 1.25rem;
    }
    
    /* Hero optimizado */
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Productos en tablet */
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: var(--spacing-lg);
    }
    
    .delivery-header .nav-container {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    .delivery-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .store-widget {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    /* Header móvil compacto */
    .delivery-header .top-bar {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
    
    .delivery-header .main-nav {
        padding: 0.75rem 0;
    }
    
    .delivery-logo {
        font-size: 1.125rem;
    }
    
    .delivery-logo .logo-icon {
        font-size: 1.5rem;
    }
    
    /* Botones de header más pequeños */
    .btn-currency,
    .btn-cart {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-cart .cart-badge {
        font-size: 0.625rem;
        min-width: 18px;
        height: 18px;
    }
    
    /* Productos en móvil - 1 columna */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .product-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .quantity-selector {
        width: 100%;
        justify-content: center;
    }
    
    /* Optimizar espacio vertical */
    .container {
        padding: 0 1rem;
    }
}

/* Optimización para dispositivos muy pequeños */
@media (max-width: 360px) {
    .delivery-header .top-bar {
        display: none; /* Ocultar top bar en pantallas muy pequeñas */
    }
    
    .delivery-logo {
        font-size: 1rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-title {
        font-size: 0.9375rem;
    }
    
    .btn-add-cart {
        padding: 0.875rem;
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   Optimizaciones Touch para Móviles
   ========================================================================== */

/* Touch targets mínimos de 44x44px (iOS) */
@media (hover: none) and (pointer: coarse) {
    /* Botones touch-friendly */
    .btn-add-cart,
    .btn-search,
    .btn-currency,
    .btn-cart {
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(6, 182, 212, 0.2);
    }
    
    /* Categorías touch-friendly */
    .category-list a {
        min-height: 44px;
        padding: 0.875rem 1rem;
    }
    
    /* Eliminar hover effects en touch */
    .product-card:hover {
        transform: none;
    }
    
    .product-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Mejorar feedback táctil */
    button:active,
    a:active {
        opacity: 0.7;
    }
    
    /* Optimizar scroll */
    * {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

/* Prevenir zoom en inputs en iOS */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="search"],
    input[type="tel"],
    input[type="email"],
    select,
    textarea {
        font-size: 16px !important; /* Previene zoom en iOS */
    }
}

/* Optimizar para orientación horizontal en móviles */
@media (max-width: 768px) and (orientation: landscape) {
    .page-hero {
        padding: 2rem 1rem;
    }
    
    .page-hero h1 {
        font-size: 1.75rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* ==========================================================================
   Animations y Efectos
   ========================================================================== */

.fade-in {
    animation: fadeIn 0.6s ease;
}

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

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Utilidades
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline {
    background: transparent;
    color: var(--delivery-primary);
    border: 2px solid var(--delivery-primary);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--delivery-primary);
    color: white;
}

/* ===========================================
   FOOTER MEJORADO - SERVICIOS KN
   =========================================== */

.site-footer {
    background: linear-gradient(135deg, #4a2c2a 0%, #6d4c41 100%);
    color: #fef3c7;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #fbbf24 0%, #f97316 100%);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
}

.footer-copyright p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9375rem;
}

.footer-copyright a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-copyright a:hover {
    color: #fbbf24;
}

.footer-copyright .separator {
    margin: 0 0.75rem;
    opacity: 0.5;
}

.footer-navigation {
    margin: 0.5rem 0;
}

.footer-navigation ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-navigation li {
    margin: 0;
}

.footer-navigation a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    position: relative;
}

.footer-navigation a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #fbbf24 0%, #f97316 100%);
    transition: width 0.3s ease;
}

.footer-navigation a:hover {
    color: #fbbf24;
}

.footer-navigation a:hover::after {
    width: 100%;
}

.footer-credits {
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    width: 100%;
}

.footer-credits p {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.credits-icon {
    font-size: 1.25rem;
    animation: float 3s ease-in-out infinite;
}

.credits-link {
    color: #fbbf24;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.credits-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #fbbf24 0%, #f97316 100%);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.credits-link:hover {
    color: #fde68a;
    transform: translateY(-2px);
}

.credits-link:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.credits-link strong {
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .site-footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        gap: 1.25rem;
    }
    
    .footer-navigation ul {
        gap: 1rem;
    }
    
    .footer-credits p {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .footer-copyright p {
        font-size: 0.875rem;
    }
    
    .footer-navigation ul {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .footer-credits p {
        flex-direction: column;
        gap: 0.25rem;
    }
}

