/* Reset & Design System */
:root {
    /* Color Palette - Premium & Modern */
    --primary: #4F46E5;
    /* Indigo 600 */
    --primary-dark: #4338CA;
    /* Indigo 700 */
    --primary-light: #818CF8;
    /* Indigo 400 */

    --secondary: #EC4899;
    /* Pink 500 */
    --secondary-dark: #DB2777;
    /* Pink 600 */

    --accent: #06B6D4;
    /* Cyan 500 */

    --dark: #0F172A;
    /* Slate 900 */
    --dark-light: #334155;
    /* Slate 700 */

    --light: #F8FAFC;
    /* Slate 50 */
    --white: #FFFFFF;

    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;

    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.3);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --blur: blur(12px);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--dark-light);
    background-color: var(--gray-50);
    line-height: 1.6;
    min-height: 100vh;
    background-image:
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--dark);
    line-height: 1.2;
    font-weight: 700;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    /* More generous padding */
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Header - Modern Glassmorphism */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
    text-decoration: none;
}

.logo i {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.2));
}

.nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: var(--dark-light);
    text-decoration: none;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-full);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    overflow: visible;
    /* Changed from hidden to visible */
}

/* ... existing hover styles ... */

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border-radius: var(--radius-full);

    /* Banner Carousel Styles */
    .banner-carousel-container {
        width: 100%;
        margin-bottom: 2rem;
        position: relative;
        overflow: hidden;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-xl);
    }

    .banner-img {
        height: 480px;
        object-fit: cover;
    }

    .banner-caption {
        background: rgba(0, 0, 0, 0.15);
        padding: 2rem;
        border-radius: var(--radius-md);
        backdrop-filter: blur(2px);
        bottom: 4rem;
    }

    @media (max-width: 768px) {
        .banner-img {
            height: 300px;
        }

        .banner-caption {
            bottom: 1rem;
            padding: 1rem;
        }

        .banner-caption h1 {
            font-size: 1.5rem;
        }

        .banner-caption p {
            font-size: 1rem;
        }
    }

    font-size: 0.7rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 6rem 0 4rem;
    overflow: hidden;
    background: transparent;
    /* Assuming global body background handles it */
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Banner Dinámico Redesigned */
.banner {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    border-radius: 2rem;
    margin: 2rem 0 4rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.banner-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, var(--primary-dark), var(--secondary));
    background-size: 200% 200%;
    animation: gradientFlow 15s ease infinite;
    z-index: 1;
}

.banner-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.banner-content {
    position: relative;
    z-index: 10;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 90%;
    width: 700px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out;
}

.banner-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    background: linear-gradient(to right, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.banner-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-weight: 500;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Main Content */
.main {
    padding: 40px 0;
}

/* Filtros y Búsqueda - DISEÑO ESPECTACULAR */
/* Filters & Search - Premium Glassmorphism */
.filters {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
    position: relative;
    z-index: 1000;
}



.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}

.filter-group label {
    color: var(--gray-800);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.filter-group label::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(45deg, #f093fb, #f5576c);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(240, 147, 251, 0.5);
}

#category-filter,
#search-input {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 15px 20px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
}

#category-filter:focus,
#search-input:focus {
    outline: none;
    border-color: #f093fb;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(240, 147, 251, 0.3);
}

#search-input {
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 20px center;
    background-size: 20px;
    padding-left: 55px;
}

#search-input::placeholder {
    color: #667eea;
    font-weight: 500;
    opacity: 0.7;
}

#search-input:focus::placeholder {
    opacity: 0.5;
    transform: translateX(5px);
}

/* Animación de escritura para el placeholder */
@keyframes typewriter {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

#search-input:focus {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 15px 40px rgba(240, 147, 251, 0.3);
    }

    50% {
        box-shadow: 0 20px 50px rgba(240, 147, 251, 0.5);
    }
}

/* Select personalizado */
#category-filter {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 20px;
    padding-right: 50px;
    cursor: pointer;
}

#category-filter:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

/* Efectos de hover para los filtros */
.filter-group:hover label {
    transform: translateX(5px);
    transition: transform 0.3s ease;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .product-card {
        height: 530px;
        /* Altura aumentada para móviles para evitar que el botón se corte */
    }

    .filters {
        padding: 20px;
        margin: 20px 0;
        border-radius: 15px;
    }

    .filter-group {
        margin-bottom: 15px;
    }

    #category-filter,
    #search-input {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    #search-input {
        padding-left: 45px;
        background-position: 15px center;
        background-size: 18px;
    }

    #category-filter {
        padding-right: 40px;
        background-position: right 15px center;
        background-size: 18px;
    }
}

/* Contenedor de búsqueda con autocompletado */
.search-container {
    position: relative;
    width: 100%;
    z-index: 1001;
    /* Asegurar que esté por encima de otros elementos */
}

#search-input {
    width: 100%;
    padding-right: 40px; /* Space for clear button */
}

/* Botón para limpiar búsqueda */
.search-clear-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 1002;
    border-radius: 50%;
}

.search-clear-btn:hover {
    color: #ef4444;
}

/* Sugerencias de autocompletado */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e0e6ed;
    border-top: none;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    /* Aumentado para asegurar que esté por encima de todo */
    max-height: 300px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

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

.suggestion-item:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    transform: translateX(5px);
}

.suggestion-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.suggestion-item.active .suggestion-category {
    color: rgba(255, 255, 255, 0.8);
}

.suggestion-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.suggestion-item.active .suggestion-icon {
    background: rgba(255, 255, 255, 0.2);
}

.suggestion-content {
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-item.active .suggestion-name {
    color: white;
}

.suggestion-category {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestion-price {
    font-weight: 700;
    color: #28a745;
    font-size: 1.1rem;
    margin-left: auto;
    flex-shrink: 0;
}

.suggestion-item.active .suggestion-price {
    color: #90ee90;
}

.suggestion-highlight {
    background: rgba(102, 126, 234, 0.2);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 700;
}

.suggestion-item.active .suggestion-highlight {
    background: rgba(255, 255, 255, 0.3);
}

/* Scrollbar personalizado para sugerencias */
.search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Efecto de búsqueda activa */
#search-input:focus+.search-suggestions {
    border-color: #f093fb;
}

/* Responsive para autocompletado */
@media (max-width: 768px) {
    .suggestion-item {
        padding: 12px 15px;
        gap: 10px;
    }

    .suggestion-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .suggestion-name {
        font-size: 0.95rem;
    }

    .suggestion-category {
        font-size: 0.8rem;
    }

    .suggestion-price {
        font-size: 1rem;
    }
}

/* Estilos para el mensaje de "no productos" */
.no-products {
    text-align: center;
    padding: 60px 20px;
    color: #667eea;
    animation: noProductsEntrance 0.8s ease-out;
    position: relative;
}

@keyframes noProductsEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.no-products i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
    animation: bounce 2s ease-in-out infinite;
    display: block;
}

@keyframes bounce {

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

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

    60% {
        transform: translateY(-5px);
    }
}

.no-products p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #666;
}

.no-products .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    animation: buttonGlow 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.no-products .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.no-products .btn:hover::before {
    left: 100%;
}

.no-products .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

@keyframes buttonGlow {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }

    50% {
        box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
    }
}

/* Efecto de partículas flotantes */
.filters::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.3), transparent);
    background-repeat: repeat;
    background-size: 150px 100px;
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {

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

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

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

/* Animación de entrada del grid */
.products-grid {
    animation: gridEntrance 1s ease-out forwards;
}

/* Animación de transición entre páginas */
.products-grid.page-transition {
    animation: pageTransition 0.5s ease-in-out;
}

@keyframes pageTransition {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    50% {
        opacity: 0.3;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gridEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efecto de ondas de carga */
.products-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(102, 126, 234, 0.05) 50%, transparent 70%);
    animation: loadingWave 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes loadingWave {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Product Card */
/* FICHA DE PRODUCTO - RECONSTRUIDA COMPLETAMENTE */
.product-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 500px;
    /* Altura fija optimizada */
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: cardEntrance 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

/* Animación de entrada escalonada */
.product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.product-card:nth-child(3) {
    animation-delay: 0.3s;
}

.product-card:nth-child(4) {
    animation-delay: 0.4s;
}

.product-card:nth-child(5) {
    animation-delay: 0.5s;
}

.product-card:nth-child(6) {
    animation-delay: 0.6s;
}

.product-card:nth-child(7) {
    animation-delay: 0.7s;
}

.product-card:nth-child(8) {
    animation-delay: 0.8s;
}

.product-card:nth-child(9) {
    animation-delay: 0.9s;
}

/* Animación de entrada */
@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Hover de la ficha */
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

/* Imagen del producto */
/* Imagen del producto */
.product-image {
    width: 100%;
    height: 200px;
    /* Altura fija para el contenedor */
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

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

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

/* Badge de Agotado */
.out-of-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Información del producto */
.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    /* Ocupa el espacio restante */
    justify-content: space-between;
    /* Distribuye el contenido */
}

/* Contenido principal */
.product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Título del producto */
.product-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 10px;
    line-height: 1.3;
    text-align: center;
}

/* Descripción del producto */
.product-description {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
    text-align: center;
    height: 60px;
    /* Altura fija */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

/* Precio del producto */
.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    text-align: center;
    margin-bottom: 20px;
}

/* Controles de cantidad */
.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.quantity-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.quantity-btn:hover {
    background: #5a6fd8;
    transform: scale(1.1);
}

.quantity-input {
    width: 50px;
    height: 35px;
    text-align: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    color: #2d3748;
    background: #f7fafc;
}

/* Botón de agregar al carrito (Reemplazado por estilos nuevos abajo) */

/* Botones de acción en la ficha */
.product-footer {
    padding: 0 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-add {
    flex: 2;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    background: linear-gradient(135deg, #2bf878 0%, #16a594 100%);
}

.btn-add:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-eye {
    flex: 1;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-eye:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-2px);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .product-card {
        height: 480px;
        /* Altura reducida para móviles */
    }

    .product-image {
        height: 180px;
    }

    .product-info {
        padding: 15px;
    }

    .product-description {
        height: 50px;
    }
}

@media (max-width: 480px) {
    .product-card {
        height: 460px;
        /* Altura aún más reducida para móviles pequeños */
    }

    .product-image {
        height: 160px;
    }

    .product-info {
        padding: 12px;
    }

    .product-description {
        height: 45px;
    }
}


/* Cart Sidebar */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s;
    z-index: 1000;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
}

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

.cart-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: var(--transition);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cart-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-200);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

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

.cart-item-name {
    font-weight: bold;
    margin-bottom: 5px;
}

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

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-footer {
    padding: 0 20px 50px 20px;
    background: var(--white);
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
    z-index: 2;
}

.cart-total {
    background: var(--gray-100);
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 15px 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.checkout-btn {
    background: linear-gradient(135deg, var(--success) 0%, #00a085 100%);
    color: var(--white);
    border: none;
    border-radius: 25px;
    padding: 15px;
    font-weight: bold;
    width: 100%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 184, 148, 0.3);
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-600);
}

.empty-cart i {
    font-size: 3rem;
    color: var(--gray-300);
    margin-bottom: 20px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* Form */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--dark);
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--dark);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #00a085 100%);
    color: var(--white);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Alert */
.alert {
    background: var(--info-color);
    color: var(--white);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Floating Cart Button */
/* Carrito Flotante - DISEÑO ESPECTACULAR */
.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.cart-button {
    position: relative;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.8rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cart-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.cart-button:hover::before {
    opacity: 1;
}

.cart-button:hover {
    transform: translateY(-8px) scale(1.15);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.6);
}

.cart-button i {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.cart-button:hover i {
    transform: scale(1.2) rotate(10deg);
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    animation: bounce 2s infinite;
    min-width: 28px;
}

/* Floating Social */
.floating-social {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.social-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(236, 72, 153, 0.3);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-toggle:hover {
    transform: scale(1.1);
}

.social-menu {
    display: none;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
}

.social-menu.show {
    display: flex;
}

.social-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.social-item span {
    display: none;
    /* Hide text label for valid professional look */
}

.social-item:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Brand Colors */
.social-item.facebook {
    background: #1877F2;
}

.social-item.instagram {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
}

.social-item.twitter {
    background: #000000 !important;
}

.social-item.tiktok {
    background: #000000;
}

.social-item.youtube {
    background: #FF0000;
}

.social-item:hover {
    transform: scale(1.1);
}

.social-item.facebook {
    background: #1877F2;
}

.social-item.instagram {
    background: #E1306C;
}

.social-item.twitter {
    background: #1DA1F2;
}

.social-item.tiktok {
    background: #000000;
}

.social-item.youtube {
    background: #FF0000;
}

/* Floating Contact */
.floating-contact {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 999;
}

.contact-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-toggle:hover {
    transform: scale(1.1);
}

.contact-menu {
    display: none;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    bottom: 70px;
    left: 0;
}

.contact-menu.show {
    display: flex;
}

.contact-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.contact-item:hover {
    transform: scale(1.1);
}

.contact-item.message {
    background: #4F46E5;
    /* Indigo primary */
}

.contact-item.whatsapp {
    background: #25D366;
}

.contact-item.email {
    background: #EA4335;
}

.contact-item.phone {
    background: #34B7F1;
}

/* Modern Footer Reconstructed */
.modern-footer {
    position: relative;
    background: #0F172A;
    color: #CBD5E1;
    overflow: hidden;
    width: 100%;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}
.modern-footer .container {
    position: relative;
    z-index: 10;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}
.footer-logo i {
    font-size: 2rem;
    color: #818CF8;
}
.footer-logo h3 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94A3B8;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: #818CF8;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-size: 0.9rem;
}

/* Custom Footer Styling */
.footer-categories-pills {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.footer-categories-pills li {
    margin: 0;
}
.footer-categories-pills a {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #CBD5E1;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
}
.footer-categories-pills a:hover {
    background: #818CF8;
    color: white;
    border-color: #818CF8;
}

.footer-contact-item-clean {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #CBD5E1;
    font-size: 0.95rem;
}
.footer-contact-item-clean i {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #818CF8;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.footer-contact-item-clean:hover i {
    background: #818CF8;
    color: white;
}
.footer-contact-item-clean a {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-contact-item-clean a:hover {
    color: #818CF8;
}

.footer-social-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.social-icon-direct {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s;
}
.social-icon-direct:hover {
    background: #818CF8;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(129, 140, 248, 0.4);
}
.social-icon-direct i {
    color: white;
}

.footer-payment-methods {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    width: 100%;
}
.footer-payment-methods h4 {
    color: #94A3B8;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.payment-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.payment-icons i {
    font-size: 2rem;
    color: #CBD5E1;
    transition: all 0.3s;
}
.payment-icons i:hover {
    color: white;
    transform: scale(1.1);
}
.payment-icons img {
    height: 32px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    transition: all 0.3s;
    background: white;
    padding: 2px;
}
.payment-icons img:hover {
    transform: scale(1.1);
}

/* Pagination */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0;
    gap: 1rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #E2E8F0;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #F1F5F9;
    color: #4F46E5;
}

.pagination-btn.active {
    background: #4F46E5;
    color: white;
    border-color: #4F46E5;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .modern-footer {
        padding: 2rem 0;
    }

    .floating-social {
        top: auto;
        bottom: 100px;
        right: 20px;
        transform: none;
    }

    .social-menu {
        right: 0;
        top: auto;
        bottom: 70px;
    }
}

/* Fixes for Pagination */
.pagination-btn {
    min-width: 40px;
    width: auto;
    padding: 0 15px;
    border-radius: 25px;
    /* Pill shape for text buttons */
}

.pagination-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-number {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark-light);
    transition: all 0.2s;
}

.page-number:hover {
    background-color: var(--gray-200);
    color: var(--primary);
}

.page-number.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.page-dots {
    color: var(--gray-400);
    padding: 0 5px;
}

/* Fix for Footer Contact Items */
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-contact-item i {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #818CF8;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.footer-contact-item:hover i {
    background: #818CF8;
    color: white;
    transform: scale(1.1);
}

.footer-contact-item div p {
    font-size: 0.85rem;
    color: #64748B;
    margin-bottom: 2px;
    font-weight: 600;
}

.footer-contact-item div a,
.footer-contact-item div span {
    color: #CBD5E1;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact-item div a:hover {
    color: #818CF8;
}

/* Ensure Footer doesn't overflow */
.modern-footer {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Add missing footer background styles if they are missing */
.footer-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Ensure it doesn't cause overflow */
    overflow: hidden;
}

/* Force Cart Sidebar Z-Index high */
.cart-overlay {
    z-index: 2000;
}

.cart-sidebar {
    z-index: 2001;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
}

/* Fix Filter Alignment */
.filters {
    align-items: center;
    /* Align items vertically center */
    justify-content: space-between;
    /* Space out items */
}

.filter-group {
    flex: 1;
    /* Allow groups to grow */
    min-width: 250px;
    /* Minimum width for responsiveness */
    display: flex;
    flex-direction: column;
}

/* Ensure inputs fill their container */
#category-filter,
#search-input,
.search-container {
    width: 100%;
}

/* Autocomplete Suggestions Styling */
.search-container {
    position: relative;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 5px;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

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

.suggestion-item:hover {
    background: #f8fafc;
}

.suggestion-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 5px;
}

.suggestion-info h4 {
    font-size: 0.9rem;
    color: var(--dark);
    margin: 0;
}

.suggestion-info p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
}

/* Checkout Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2005;
    /* Mayor que el sidebar del carrito (2001) */
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.checkout-modal {
    background: #fff;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-overlay.show .checkout-modal {
    transform: translateY(0);
}

.checkout-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-header h3 {
    margin: 0;
    color: var(--dark);
    font-size: 1.4rem;
}

.checkout-body {
    padding: 20px;
    overflow-y: auto;
}

.checkout-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--dark);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

/* =========================================
   PRODUCT DETAILS MODAL (ECOMMERCE STYLE)
   ========================================= */
.product-modal-content {
    max-width: 1000px !important;
    width: 95% !important;
    padding: 0 !important;
    overflow-y: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.product-details-container {
    display: flex;
    flex-wrap: wrap;
    background: white;
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-modal-btn:hover {
    background: #f1f1f1;
    transform: rotate(90deg);
}

/* Left: Media Section */
.product-media-section {
    flex: 1.2;
    background: #f8f9fb;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 300px;
}

.main-image-container {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: white;
    border-radius: 10px;
    padding: 10px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.main-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

/* Thumbnails */
.thumbnails-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px;
    width: 100%;
    justify-content: center;
}

.thumbnail-wrapper {
    width: 70px;
    height: 70px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
    flex-shrink: 0;
}

.thumbnail-wrapper.active {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right: Info Section */
.product-info-section {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    min-width: 300px;
}

.badge-category {
    align-self: flex-start;
    background: var(--light);
    color: var(--primary);
    border: 1px solid var(--primary-light);
    margin-bottom: 10px;
    padding: 5px 10px;
}

.product-info-section h2 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin: 15px 0;
    display: block;
}

.product-description {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 30px;
    max-height: 200px;
    overflow-y: auto;
    background: #fcfcfc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

/* Actions */
.product-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    width: fit-content;
    overflow: hidden;
}

.quantity-selector button {
    background: #f8f8f8;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.quantity-selector button:hover {
    background: #e0e0e0;
}

.quantity-selector input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    font-weight: bold;
    -moz-appearance: textfield;
}

.stock-status {
    color: var(--success);
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Videos Section */
.product-videos-section {
    padding: 20px 40px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: black;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .product-details-container {
        flex-direction: column;
    }

    .main-image-container {
        height: 300px;
    }

    .product-info-section {
        padding: 25px;
    }
}

.btn-whatsapp:hover {
    background: #128C7E;
}

.w-100 {
    width: 100%;
}

/* =========================================
   Paginación Premium (Optimized)
   ========================================= */
.pagination-container {
    display: flex;
    /* Removed !important to allow JS toggling */
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid var(--gray-200);
    width: 100%;
}

.pagination-info {
    color: var(--gray-500);
    font-size: 0.95rem;
    font-weight: 500;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.pagination-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--gray-50);
    color: var(--gray-400);
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-number {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.pagination-number:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.pagination-number.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: scale(1.05);
}

.pagination-dots {
    color: var(--gray-400);
    font-weight: bold;
    padding: 0 0.5rem;
}

/* --- Currency Conversion (Bs.) Styles --- */
.btn-view-bs {
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 0 auto 15px auto;
    display: block;
    width: fit-content;
}

.btn-view-bs:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.product-price-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.btn-view-bs-modal {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn-view-bs-modal:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    color: #2d3748;
    transform: translateY(-1px);
}

/* Ensure price in modal doesn't jump */
#pd-price {
    min-width: 120px;
    margin: 0 !important;
}

@media (max-width: 768px) {
    .product-price-box {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Estilos para el botón Ver en Bs en la grilla principal */
.product-price-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    width: 100%;
}

.product-price-container .price {
    margin: 0 !important;
    font-size: 1.35rem;
    color: var(--primary);
    font-weight: 800;
}

.btn-view-bs-tiny {
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: var(--primary);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-view-bs-tiny:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.btn-view-bs-tiny i {
    font-size: 0.65rem;
}