/* ========================================
   RESET & VARIABLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

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

:root {
    /* Colors */
    --primary-color: #FF6B6B;
    --primary-dark: #E85555;
    --secondary-color: #4ECDC4;
    --accent-orange: #FF6B35;
    --dark-gray: #2C3E50;
    --medium-gray: #95A5A6;
    --light-gray: #ECF0F1;
    --white: #FFFFFF;
    --black: #1A1A1A;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    --border-color: #E8EBED;
    --bg-light: #F8F9FA;
    --bg-hover: #F1F3F5;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Skeleton Colors */
    --skeleton-base: #E0E0E0;
    --skeleton-highlight: #F5F5F5;
}

/* ========================================
   SKELETON LOADERS
   ======================================== */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--skeleton-base) 0%,
        var(--skeleton-highlight) 50%,
        var(--skeleton-base) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Skeleton para categorías */
.skeleton-category {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 0.875rem;
    min-width: 130px;
    max-width: 130px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.skeleton-category-img {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-lg);
}

.skeleton-category-name {
    width: 80%;
    height: 16px;
    border-radius: var(--radius-sm);
}

/* Skeleton para productos */
.skeleton-product {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.skeleton-product-image {
    height: 220px;
    background: var(--skeleton-base);
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-product-info {
    padding: 0.625rem;
    background: #FFE5E5;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.skeleton-product-name {
    height: 14px;
    border-radius: var(--radius-sm);
}

.skeleton-product-name-2 {
    height: 14px;
    width: 70%;
    border-radius: var(--radius-sm);
}

.skeleton-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.2rem;
}

.skeleton-product-price {
    width: 60px;
    height: 18px;
    border-radius: var(--radius-sm);
}

.skeleton-product-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
}

/* Skeleton para banners */
.skeleton-hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.skeleton-main-banner {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 3rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
}

.skeleton-banner-title {
    height: 48px;
    width: 70%;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.skeleton-banner-subtitle {
    height: 20px;
    width: 50%;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.skeleton-banner-subtitle-2 {
    height: 20px;
    width: 45%;
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
}

.skeleton-banner-btn {
    height: 48px;
    width: 180px;
    border-radius: var(--radius-lg);
}

.skeleton-side-banners {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skeleton-small-banner {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    min-height: 190px;
    box-shadow: var(--shadow-md);
}

.skeleton-small-banner-title {
    height: 28px;
    width: 60%;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.skeleton-small-banner-text {
    height: 20px;
    width: 50%;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.skeleton-small-banner-btn {
    height: 40px;
    width: 120px;
    border-radius: var(--radius-md);
}

@media (max-width: 1200px) {
    .skeleton-hero-grid {
        grid-template-columns: 1fr;
    }
    
    .skeleton-side-banners {
        flex-direction: row;
    }
}

/* ========================================
   BASE STYLES
   ======================================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Optimización de renderizado */
    text-rendering: optimizeSpeed;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
    /* Optimización de imágenes */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Asegurar que todos los elementos respeten el ancho de la pantalla */
.header,
.main-container,
.hero-section,
.popular-categories,
.products-section,
.categories-grid,
.products-grid {
    max-width: 100%;
    box-sizing: border-box;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========================================
   ANIMACIONES DE ENTRADA
   ======================================== */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.slide-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.6s ease-out forwards;
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInLeft 0.6s ease-out forwards;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    animation: slideInRight 0.6s ease-out forwards;
}

.scale-in {
    opacity: 0;
    transform: scale(0.95);
    animation: scaleIn 0.6s ease-out forwards;
}

/* Keyframes para las animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Delays para animaciones escalonadas */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }

/* Clase para observar elementos - OPTIMIZADA */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px) translateZ(0);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    will-change: opacity, transform;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

/* ========================================
   HEADER
   ======================================== */
.header {
    background: var(--white);
    padding: 0.75rem 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    overflow-x: hidden;
    /* Optimización de performance */
    contain: layout style paint;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo search icons";
    align-items: center;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Logo */
.logo {
    grid-area: logo;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
    border-radius: 0;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* Mobile Header - Rediseño completo */
@media (max-width: 768px) {
    .header {
        padding: 0.6rem 0;
        box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
        width: 100%;
        overflow-x: hidden;
    }
    
    .header-container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 1rem;
        margin: 0 !important;
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas: 
            "filter logo icons"
            "search search search";
        gap: 0.75rem;
        align-items: center;
    }
    
    /* Botón de filtro a la izquierda */
    #filterBtn {
        grid-area: filter;
    }
    
    /* Logo centrado visualmente */
    .logo {
        grid-area: logo;
        justify-self: center;
    }
    
    .logo-img {
        height: 32px;
    }
    
    /* Iconos de la derecha */
    .header-icons {
        grid-area: icons;
        justify-self: end;
        display: flex;
        gap: 0.5rem;
    }
    
    /* Ocultar el botón de filtro duplicado dentro de header-icons */
    .header-icons > #filterBtn {
        display: none;
    }
    
    /* Search en su propia fila completa */
    .search-bar {
        grid-area: search;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.5rem 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    .header-container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 1rem;
        margin: 0 !important;
        gap: 0.65rem;
    }
    
    .logo-img {
        height: 28px;
    }
}

/* Search Bar */
.search-bar {
    grid-area: search;
    flex: 1;
    max-width: 600px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 2px solid transparent;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: var(--transition);
    background: var(--bg-light);
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.15);
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Mobile Search */
@media (max-width: 768px) {
    .search-bar {
        max-width: 100%;
        width: 100%;
    }
    
    .search-input {
        font-size: 0.875rem;
        padding: 0.7rem 0.9rem 0.7rem 2.75rem;
        border-radius: 12px;
        border: 1.5px solid var(--border-color);
    }
    
    .search-input:focus {
        border-color: var(--primary-color);
    }
    
    .search-icon {
        left: 1rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .search-input {
        font-size: 0.85rem;
        padding: 0.65rem 0.85rem 0.65rem 2.6rem;
        border-radius: 10px;
    }
    
    .search-icon {
        left: 0.9rem;
        font-size: 0.9rem;
    }
}

/* Header Icons */
.header-icons {
    grid-area: icons;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.icon-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.icon-btn:active {
    transform: scale(0.95);
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, var(--primary-color), #FF8E8E);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.35rem;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

/* Mobile Icons - Diseño minimalista */
@media (max-width: 768px) {
    .header-icons {
        gap: 0.4rem;
    }
    
    .icon-btn {
        width: 36px;
        height: 36px;
        font-size: 1.05rem;
        background: transparent;
    }
    
    .icon-btn:hover {
        background: var(--bg-light);
        color: var(--text-primary);
        transform: none;
    }
    
    .icon-btn:active {
        background: var(--primary-color);
        color: var(--white);
    }
    
    .cart-badge {
        font-size: 0.6rem;
        width: 16px;
        height: 16px;
        padding: 0;
        top: -2px;
        right: -2px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .header-icons {
        gap: 0.35rem;
    }
    
    .icon-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    
    .cart-badge {
        font-size: 0.55rem;
        width: 15px;
        height: 15px;
    }
    
    .user-avatar {
        width: 34px;
        height: 34px;
    }
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.user-avatar:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   CURRENCY SELECTOR
   ======================================== */
.currency-selector {
    position: relative;
}

.currency-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--bg-light);
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.currency-btn:hover {
    background: var(--white);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.currency-btn i:first-child {
    font-size: 0.875rem;
}

.currency-btn i:last-child {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.currency-btn.active i:last-child {
    transform: rotate(180deg);
}

#currentCurrency {
    font-weight: 700;
    min-width: 35px;
    text-align: center;
}

.currency-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.currency-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.currency-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: left;
}

.currency-option:last-child {
    border-bottom: none;
}

.currency-option:hover {
    background: var(--bg-light);
}

.currency-option.active {
    background: linear-gradient(135deg, #FFF5F5, #FFE8E8);
    color: var(--primary-color);
    font-weight: 600;
}

.currency-option.active i {
    color: var(--primary-color);
}

.currency-option i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.currency-option span {
    flex: 1;
}

/* Mobile Currency Selector */
@media (max-width: 768px) {
    .currency-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        border-radius: 20px;
    }
    
    .currency-btn i:first-child {
        font-size: 0.8rem;
    }
    
    #currentCurrency {
        font-size: 0.75rem;
        min-width: 30px;
    }
    
    .currency-dropdown {
        min-width: 200px;
        right: -1rem;
    }
    
    .currency-option {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .currency-btn {
        padding: 0.45rem 0.65rem;
        font-size: 0.75rem;
        gap: 0.35rem;
    }
    
    .currency-btn i:last-child {
        font-size: 0.65rem;
    }
    
    #currentCurrency {
        font-size: 0.7rem;
        min-width: 28px;
    }
    
    .currency-dropdown {
        min-width: 180px;
    }
    
    .currency-option {
        padding: 0.65rem 0.85rem;
        font-size: 0.8rem;
        gap: 0.6rem;
    }
}

/* ========================================
   HEADER
   ======================================== */
.header {
    background: var(--white);
    padding: 0.75rem 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    overflow-x: hidden;
    /* Optimización de performance */
    contain: layout style paint;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo search icons";
    align-items: center;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Logo */
.logo {
    grid-area: logo;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
    border-radius: 0;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* Mobile Header - Rediseño completo */
@media (max-width: 768px) {
    .header {
        padding: 0.6rem 0;
        box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
        width: 100%;
        overflow-x: hidden;
    }
    
    .header-container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 1rem;
        margin: 0 !important;
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas: 
            "filter logo icons"
            "search search search";
        gap: 0.75rem;
        align-items: center;
    }
    
    /* Botón de filtro a la izquierda */
    #filterBtn {
        grid-area: filter;
    }
    
    /* Logo centrado visualmente */
    .logo {
        grid-area: logo;
        justify-self: center;
    }
    
    .logo-img {
        height: 32px;
    }
    
    /* Iconos de la derecha */
    .header-icons {
        grid-area: icons;
        justify-self: end;
        display: flex;
        gap: 0.5rem;
    }
    
    /* Ocultar el botón de filtro duplicado dentro de header-icons */
    .header-icons > #filterBtn {
        display: none;
    }
    
    /* Search en su propia fila completa */
    .search-bar {
        grid-area: search;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.5rem 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    .header-container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 1rem;
        margin: 0 !important;
        gap: 0.65rem;
    }
    
    .logo-img {
        height: 28px;
    }
}

/* Search Bar */
.search-bar {
    grid-area: search;
    flex: 1;
    max-width: 600px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 2px solid transparent;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: var(--transition);
    background: var(--bg-light);
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.15);
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Mobile Search */
@media (max-width: 768px) {
    .search-bar {
        max-width: 100%;
        width: 100%;
    }
    
    .search-input {
        font-size: 0.875rem;
        padding: 0.7rem 0.9rem 0.7rem 2.75rem;
        border-radius: 12px;
        border: 1.5px solid var(--border-color);
    }
    
    .search-input:focus {
        border-color: var(--primary-color);
    }
    
    .search-icon {
        left: 1rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .search-input {
        font-size: 0.85rem;
        padding: 0.65rem 0.85rem 0.65rem 2.6rem;
        border-radius: 10px;
    }
    
    .search-icon {
        left: 0.9rem;
        font-size: 0.9rem;
    }
}

/* Header Icons */
.header-icons {
    grid-area: icons;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.icon-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.icon-btn:active {
    transform: scale(0.95);
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, var(--primary-color), #FF8E8E);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.35rem;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

/* Mobile Icons - Diseño minimalista */
@media (max-width: 768px) {
    .header-icons {
        gap: 0.4rem;
    }
    
    .icon-btn {
        width: 36px;
        height: 36px;
        font-size: 1.05rem;
        background: transparent;
    }
    
    .icon-btn:hover {
        background: var(--bg-light);
        color: var(--text-primary);
        transform: none;
    }
    
    .icon-btn:active {
        background: var(--primary-color);
        color: var(--white);
    }
    
    .cart-badge {
        font-size: 0.6rem;
        width: 16px;
        height: 16px;
        padding: 0;
        top: -2px;
        right: -2px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .header-icons {
        gap: 0.35rem;
    }
    
    .icon-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    
    .cart-badge {
        font-size: 0.55rem;
        width: 15px;
        height: 15px;
    }
    
    .user-avatar {
        width: 34px;
        height: 34px;
    }
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.user-avatar:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   MAIN CONTAINER
   ======================================== */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* Mobile: Ancho completo sin padding lateral */
@media (max-width: 968px) {
    .main-container {
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
    
    .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 0;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Ocultar categorías del sidebar (ya están en "Explorar categorías") */
.categories-nav {
    display: none;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.category-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.category-link:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.category-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
}

.category-link.active i {
    color: var(--white);
}

/* Filtro de Marcas */
.brands-filter {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.brands-filter .sidebar-title {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.brands-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.brands-list::-webkit-scrollbar {
    width: 4px;
}

.brands-list::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 10px;
}

.brands-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.brand-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.brand-item:hover {
    background: var(--bg-light);
}

.brand-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
    position: relative;
}

.brand-checkbox.checked {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
}

.brand-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
}

.brand-label {
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    flex: 1;
}

.brand-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.clear-filters-btn {
    margin-top: 1rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-light);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
}

.clear-filters-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.clear-filters-btn:active {
    transform: scale(0.98);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* Mobile Hero: Diseño limpio y responsive */
@media (max-width: 968px) {
    .hero-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-grid {
        padding: 0;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 1rem;
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-grid {
        gap: 0.75rem;
    }
}

.hero-banner {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: var(--transition);
}

.hero-banner:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Main Banner */
.main-banner {
    background: linear-gradient(135deg, #E8F4FF 0%, #D4E8FF 100%);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 350px;
}

.banner-content {
    flex: 1;
}

.banner-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--black);
    margin-bottom: 1rem;
    letter-spacing: -1px;
    line-height: 1.1;
}

.banner-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

.banner-btn {
    background: var(--accent-orange);
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    border: none;
    cursor: pointer;
}

.banner-btn:hover {
    background: #E55D2A;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

.banner-btn:active {
    transform: scale(0.98);
}

.banner-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
    border-radius: var(--radius-lg);
    /* Optimización: animación más simple y rápida */
    animation: float 4s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateZ(0); }
    50% { transform: translateY(-8px) translateZ(0); }
}

/* Side Banners */
.side-banners {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.small-banner {
    background: linear-gradient(135deg, #FFF5F0 0%, #FFE8DD 100%);
    padding: 1.75rem;
    min-height: 165px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.small-banner:nth-child(2) {
    background: linear-gradient(135deg, #F0F4FF 0%, #E0E8FF 100%);
}

.small-banner-content {
    z-index: 2;
    width: 100%;
}

.discount-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.highlight {
    color: var(--accent-orange);
    font-size: 1.5rem;
    font-weight: 800;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.shop-now-btn {
    background: var(--black);
    color: var(--white);
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.shop-now-btn:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
}

.shop-now-btn:active {
    transform: scale(0.98);
}

.small-banner-img {
    position: absolute;
    right: -10px;
    bottom: -10px;
    max-height: 120px;
    opacity: 0.4;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

/* Mobile Hero - Diseño Tipo Tarjetas */
@media (max-width: 968px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .side-banners {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .small-banner {
        min-height: 160px;
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .small-banner-img {
        max-height: 90px;
        right: 0;
        bottom: 0;
        opacity: 0.35;
    }
}

@media (max-width: 768px) {
    .hero-section {
        margin-bottom: 1.5rem;
    }
    
    /* Main Banner - Mantener color azul original */
    .main-banner {
        flex-direction: row;
        align-items: center;
        padding: 1.5rem;
        min-height: 200px;
        gap: 1rem;
        border-radius: 20px;
        background: linear-gradient(135deg, #E8F4FF 0%, #D4E8FF 100%);
    }
    
    .banner-content {
        flex: 1.5;
    }
    
    .banner-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
        color: var(--black);
        font-weight: 800;
        line-height: 1.2;
    }
    
    .banner-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1rem;
        color: var(--text-secondary);
        line-height: 1.4;
    }
    
    .banner-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.85rem;
        background: var(--accent-orange);
        color: var(--white);
        font-weight: 700;
    }
    
    .banner-btn:hover {
        background: #E55D2A;
        transform: translateY(-1px);
    }
    
    .banner-image {
        flex: 1;
        margin-top: 0;
        max-width: 140px;
    }
    
    .product-img {
        max-height: 140px;
        width: 100%;
        object-fit: contain;
    }
    
    /* Small Banners - Horizontal Cards */
    .side-banners {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .small-banner {
        min-height: auto;
        padding: 1rem;
        border-radius: 16px;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 0.75rem;
    }
    
    .small-banner-content {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .product-name {
        font-size: 1rem;
        margin-bottom: 0;
        font-weight: 700;
        line-height: 1.3;
    }
    
    .discount-text {
        font-size: 0.8rem;
        margin-bottom: 0;
        line-height: 1.3;
    }
    
    .highlight {
        font-size: 1.1rem;
        display: inline-block;
    }
    
    .shop-now-btn {
        padding: 0.55rem 1.1rem;
        font-size: 0.75rem;
        border-radius: 8px;
        align-self: flex-start;
    }
    
    .small-banner-img {
        position: static;
        max-height: 80px;
        width: 80px;
        object-fit: contain;
        opacity: 1;
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    }
}

@media (max-width: 480px) {
    .hero-section {
        margin-bottom: 1.25rem;
    }
    
    .hero-grid {
        gap: 0.75rem;
    }
    
    /* Main Banner - Stack en móvil pequeño pero con color azul original */
    .main-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
        min-height: 220px;
        gap: 0.75rem;
        border-radius: 16px;
        background: linear-gradient(135deg, #E8F4FF 0%, #D4E8FF 100%);
    }
    
    .banner-content {
        width: 100%;
    }
    
    .banner-title {
        font-size: 1.35rem;
        margin-bottom: 0.4rem;
        color: var(--black);
    }
    
    .banner-subtitle {
        font-size: 0.75rem;
        margin-bottom: 0.85rem;
        color: var(--text-secondary);
    }
    
    .banner-btn {
        padding: 0.65rem 1.35rem;
        font-size: 0.8rem;
        background: var(--accent-orange);
        color: var(--white);
    }
    
    .banner-image {
        max-width: 120px;
    }
    
    .product-img {
        max-height: 120px;
    }
    
    .side-banners {
        gap: 0.65rem;
    }
    
    .small-banner {
        padding: 0.85rem;
        border-radius: 14px;
        gap: 0.6rem;
    }
    
    .product-name {
        font-size: 0.9rem;
    }
    
    .discount-text {
        font-size: 0.75rem;
    }
    
    .highlight {
        font-size: 1rem;
    }
    
    .shop-now-btn {
        padding: 0.5rem 1rem;
        font-size: 0.7rem;
    }
    
    .small-banner-img {
        max-height: 70px;
        width: 70px;
    }
}

/* ========================================
   SECTIONS
   ======================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.see-all {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.see-all:hover {
    color: var(--primary-color);
    gap: 0.75rem;
}

/* ========================================
   CATEGORIES GRID
   ======================================== */
.popular-categories {
    background: linear-gradient(135deg, #FFF5F8 0%, #FFE8F0 50%, #F0F4FF 100%);
    padding: 1.5rem 1rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Mobile Categories: Diseño limpio */
@media (max-width: 968px) {
    .popular-categories {
        padding: 1.25rem 1rem;
        border-radius: 0;
        margin-bottom: 1.5rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

.categories-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 107, 107, 0.3) transparent;
}

/* Personalizar scrollbar */
.categories-grid::-webkit-scrollbar {
    height: 6px;
}

.categories-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.categories-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E);
    border-radius: 10px;
}

.categories-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #E85555, #FF6B6B);
}

.category-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    min-width: 110px;
    max-width: 110px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Optimización de performance */
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.category-card:hover {
    transform: translateY(-6px) translateZ(0);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.category-card:active {
    transform: scale(0.95);
}

.category-card.active {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.25);
    border: 2px solid var(--primary-color);
}

.category-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--white);
}

.category-badge.discount {
    background: var(--primary-color);
}

.category-badge.new {
    background: var(--secondary-color);
}

.category-img {
    width: 75px;
    height: 75px;
    margin: 0 auto 0.5rem;
    object-fit: cover;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
    border-radius: var(--radius-md);
}

.category-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}
/* Mobile Categories */
@media (max-width: 768px) {
    .popular-categories {
        padding: 1rem;
        margin-bottom: 1.25rem;
        margin-left: 1rem;
        margin-right: 1rem;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .categories-grid {
        gap: 0.75rem;
        padding-bottom: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    .category-card {
        min-width: 95px;
        max-width: 95px;
        padding: 0.65rem;
        box-sizing: border-box;
    }
    
    .category-img {
        width: 65px;
        height: 65px;
    }
    
    .category-name {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .popular-categories {
        padding: 1rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .categories-grid {
        gap: 0.6rem;
    }
    
    .category-card {
        min-width: 85px;
        max-width: 85px;
        padding: 0.6rem;
    }
    
    .category-img {
        width: 55px;
        height: 55px;
    }
}

/* ========================================
   PRODUCTS GRID
   ======================================== */
.products-section {
    margin-top: 2rem;
    padding: 0 1rem;
}

/* Mobile Products: Padding consistente */
@media (max-width: 968px) {
    .products-section {
        padding: 0 1rem;
        margin-top: 1.5rem;
    }
}

@media (max-width: 768px) {
    .products-section {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .products-section {
        padding: 0 1rem;
    }
}

.view-options {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-light);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.view-btn:hover,
.view-btn.active {
    background: var(--primary-color);
    color: var(--white);
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
    /* Optimización de performance */
    contain: layout style;
}

/* Mobile Products Grid: Sin padding extra (ya lo tiene products-section) */
@media (max-width: 968px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .products-grid {
        gap: 0.65rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        gap: 0.6rem;
    }
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    /* Optimización de performance */
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.product-card:hover {
    transform: translateY(-4px) translateZ(0);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-card:active {
    transform: scale(0.98);
}

.product-image-container {
    position: relative;
    padding: 1.25rem;
    background: var(--white);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), #FF8E8E);
    color: var(--white);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.wishlist-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    z-index: 10;
}

.wishlist-btn:hover {
    color: var(--primary-color);
    transform: scale(1.15);
    background: #FFF5F5;
}

.wishlist-btn:active {
    transform: scale(0.95);
}

.product-info {
    padding: 0.75rem;
    background: linear-gradient(135deg, #FFE5E5 0%, #FFF0F0 100%);
    border-top: 1px solid rgba(255, 107, 107, 0.1);
}

.product-category {
    display: none;
}

.product-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    min-height: 2.7rem;
}

.product-rating {
    display: none;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-color);
}

.add-to-cart-btn {
    background: linear-gradient(135deg, var(--black), #2C2C2C);
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), #FF8E8E);
    transform: scale(1.15);
}

.add-to-cart-btn:active {
    transform: scale(0.9);
}

/* Mobile Product Grid */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .product-card {
        border-radius: var(--radius-md);
    }
    
    .product-image-container {
        padding: 1rem;
        height: 160px;
    }
    
    .product-badge {
        top: 0.5rem;
        left: 0.5rem;
        padding: 0.25rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .wishlist-btn {
        width: 32px;
        height: 32px;
        top: 0.5rem;
        right: 0.5rem;
        font-size: 0.85rem;
    }
    
    .product-info {
        padding: 0.6rem;
    }
    
    .product-name {
        font-size: 0.8rem;
        min-height: 2.5rem;
    }
    
    .product-price {
        font-size: 0.95rem;
    }
    
    .add-to-cart-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        gap: 0.65rem;
    }
    
    .product-image-container {
        height: 140px;
        padding: 0.75rem;
    }
    
    .product-name {
        font-size: 0.75rem;
        min-height: 2.25rem;
    }
    
    .product-price {
        font-size: 0.9rem;
    }
}

/* ========================================
   LOAD MORE
   ======================================== */
.load-more-container {
    text-align: center;
    padding: 2rem 0;
}

.load-more-btn {
    background: var(--white);
    color: var(--text-primary);
    padding: 1rem 2.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.load-more-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   PAGINACIÓN
   ======================================== */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 0;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(.active):not(:disabled) {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

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

.pagination-btn i {
    font-size: 0.875rem;
}

.pagination-dots {
    color: var(--text-secondary);
    font-weight: 700;
    padding: 0 0.5rem;
}

/* ========================================
   MODAL
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(90deg);
}

/* ========================================
   CART SIDEBAR
   ======================================== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 100%;
    box-sizing: border-box;
}

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

.cart-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.cart-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-close:hover {
    background: var(--primary-color);
    color: var(--white);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-footer {
    padding: 2rem;
    border-top: 1px solid var(--border-color);
}

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

.total-amount {
    color: var(--primary-color);
}

.checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, #25D366, #1EBE57);
    color: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.checkout-btn:hover {
    background: linear-gradient(135deg, #1EBE57, #128C7E);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

/* ========================================
   BACKDROP
   ======================================== */
.backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.backdrop.active {
    display: block;
    opacity: 1;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 220px 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .side-banners {
        flex-direction: row;
        gap: 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 968px) {
    .sidebar {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .product-image-container {
        height: 180px;
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
        overflow-x: hidden;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .section-header {
        margin-bottom: 1.25rem;
    }
    
    .banner-title {
        font-size: 2.25rem;
    }
    
    .banner-subtitle {
        font-size: 1rem;
    }
    
    .main-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.75rem;
        min-height: 320px;
    }
    
    .banner-image {
        margin-top: 1rem;
    }
    
    .side-banners {
        flex-direction: column;
        gap: 1rem;
    }
    
    .small-banner {
        padding: 1.5rem;
        min-height: 160px;
    }
    
    .cart-sidebar {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%) scale(0.9);
        width: 95%;
        max-width: 500px;
        height: auto;
        max-height: 90vh;
        border-radius: var(--radius-xl);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-sizing: border-box;
    }
    
    .cart-sidebar.active {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        visibility: visible;
        right: auto;
    }
    
    .modal-content {
        margin: 0;
        max-height: 100vh;
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal {
        padding: 0;
        align-items: flex-start;
    }
    
    /* Optimizar paginación para móvil */
    .pagination-container {
        gap: 0.35rem;
        padding: 1.5rem 0;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 0