/* =====================================================
   MOBILE.CSS - Estilos específicos para móviles
   Catálogo EMPODERI
   ===================================================== */

/* ===== UTILIDADES ===== */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: flex !important;
}

/* ===== ELEMENTOS MÓVILES OCULTOS EN DESKTOP ===== */
.mobile-search-container {
    display: none;
}

.categories-modal {
    display: none;
}

.bottom-nav {
    display: none;
}

/* ===== VARIABLES MÓVILES ===== */
:root {
    --bottom-nav-height: 60px;
    --header-height: 60px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* ===== MEDIA QUERY MÓVIL ===== */
@media (max-width: 768px) {
    
    /* Utilidades */
    .mobile-only {
        display: flex !important;
    }

    .desktop-only {
        display: none !important;
    }

    /* ===== BODY ===== */
    html, body {
        overflow-x: hidden;
        overscroll-behavior-x: none;
    }

    body {
        padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y pinch-zoom;
    }

    /* ===== BARRA PROMO - MOVIL ===== */
    .promo-bar {
        padding: 4px 8px;
        font-size: 0.6rem;
    }

    .promo-content {
        gap: 6px;
        flex-wrap: nowrap;
    }

    .promo-separator {
        display: none;
    }

    .promo-item {
        white-space: nowrap;
    }

    .promo-item:nth-child(5) {
        display: none; /* Ocultar "Pago seguro" en movil */
    }

    /* ===== HEADER MOVIL ===== */
    header {
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .header-content {
        padding: 0.8rem 1rem;
        gap: 0.5rem;
    }
    
    .logo {
        font-size: 1.2rem;
        flex: 1;
        flex-direction: column;
        align-items: center;
    }

    .logo-country {
        font-size: 0.55rem;
        letter-spacing: 1.2em;
    }

    .mobile-search-btn {
        background: var(--light);
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        font-size: 1.2rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .cart-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .cart-badge {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
        top: -3px;
        right: -3px;
    }
    
    /* ===== BÚSQUEDA MÓVIL EXPANDIBLE ===== */
    .mobile-search-container {
        display: none;
        background: white;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid var(--border);
        animation: slideDown 0.3s ease;
    }
    
    .mobile-search-container.active {
        display: block;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .mobile-search-inner {
        display: flex;
        gap: 0.5rem;
    }
    
    .mobile-search-inner input {
        flex: 1;
        padding: 0.8rem 1rem;
        border: 2px solid var(--border);
        border-radius: 25px;
        font-size: 1rem;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    .mobile-search-inner input:focus {
        outline: none;
        border-color: var(--primary);
    }
    
    .mobile-search-inner button {
        background: var(--gray);
        color: white;
        border: none;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        font-size: 1.2rem;
        cursor: pointer;
    }
    
    /* ===== FILTROS MÓVIL ===== */
    .filters {
        padding: 0.8rem 0;
        position: sticky;
        top: 60px;
        z-index: 90;
        background: white;
    }

    .filters-content {
        padding: 0 1rem;
        gap: 0.5rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .filters-content::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    
    /* ===== CONTENEDOR PRINCIPAL ===== */
    .container {
        padding: 0.25rem;
        padding-bottom: 2rem;
    }
    
    .section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 1.3rem;
        margin-bottom: 0;
    }
    
    .products-count {
        font-size: 0.85rem;
        color: var(--gray);
        background: var(--light);
        padding: 0.3rem 0.8rem;
        border-radius: 20px;
    }
    
    /* ===== GRID DE PRODUCTOS ===== */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
    
    /* ===== TARJETA DE PRODUCTO MÓVIL ===== */
    .product-card {
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }
    
    .product-card:active {
        transform: scale(0.98);
    }
    
    .product-image {
        aspect-ratio: 9/10;
        border-radius: 16px 16px 0 0;
    }
    
    .product-image img {
        border-radius: 16px 16px 0 0;
    }

    .product-info.compact {
        padding: 0.2rem 0.3rem;
    }

    .product-row {
        gap: 0.2rem;
        margin-bottom: 0.05rem;
    }

    .product-row.row-name {
        gap: 0.15rem;
        margin-bottom: 0.02rem;
    }

    .product-name {
        font-size: 0.70rem;
        font-weight: 500;
        line-height: 1.15;
        margin: 0;
    }

    .tallas-container {
        gap: 0.1rem;
    }

    .talla-box {
        font-size: 0.45rem;
        padding: 0.1rem 0.15rem;
        min-width: 1rem;
    }

    .price-current {
        font-size: 0.85rem;
    }

    .price-original {
        font-size: 0.65rem;
    }

    .rating-mini,
    .code-mini,
    .stock-mini {
        font-size: 0.5rem;
    }
    
    .add-to-cart {
        padding: 0.75rem;
        font-size: 0.9rem;
        margin-top: 0.5rem;
        border-radius: 10px;
    }

    /* Botón agregar al carrito en modal */
    #addToCartBtn {
        position: relative;
        overflow: hidden;
    }

    /* Habilitado: pulso + flash blanco */
    #addToCartBtn:not(:disabled) {
        animation: pulseCart 2s ease-in-out infinite;
    }

    #addToCartBtn:not(:disabled)::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 60%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
        animation: shimmer 3s ease-in-out infinite;
    }

    /* Talla seleccionada - flash blanco */
    .size-option.selected {
        position: relative;
        overflow: hidden;
    }

    .size-option.selected::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 60%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
        animation: shimmer 3s ease-in-out infinite;
    }

    /* Delivery note móvil - 15% más pequeño */
    .delivery-note {
        padding: 7px 10px;
        gap: 7px;
        margin-top: 0.5rem;
        border-radius: 8px;
    }

    .delivery-icon {
        font-size: 1rem;
    }

    .delivery-text {
        font-size: 0.72rem;
        line-height: 1.25;
    }

    .delivery-text strong {
        font-size: 0.72rem;
    }

    .delivery-sub {
        font-size: 0.63rem;
    }

    /* Fotos reales badge - sin espacio extra */
    .fotos-reales-badge {
        padding: 0.15rem 0.5rem;
        font-size: 0.6rem;
        margin-top: 0.2rem;
        border-radius: 5px;
        gap: 0.2rem;
    }
    
    /* ===== MODAL PRODUCTO MÓVIL ===== */
    .modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-content {
        border-radius: 24px 24px 0 0;
        max-height: 92vh;
        width: 100%;
        max-width: 100%;
        animation: slideUp 0.3s ease;
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .modal-close {
        position: sticky;
        top: 0;
        z-index: 100;
        margin-left: auto;
        margin-right: 0.5rem;
        margin-top: 0.5rem;
        margin-bottom: -36px;
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    
    .modal-body {
        display: flex;
        flex-direction: column;
        padding: 1rem;
        gap: 0.8rem;
    }

    .modal-gallery {
        order: 1;
        width: 100%;
        height: auto !important;
        flex-shrink: 0;
        gap: 0.2rem;
    }

    .modal-gallery .thumbnail-gallery {
        padding: 2px 0;
        gap: 6px;
    }

    /* Swipe gallery - Móvil */
    .swipe-gallery {
        position: relative;
        overflow: hidden;
        border-radius: 12px;
        width: 100%;
        touch-action: pan-y;
    }

    .swipe-track {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        transition: transform 0.3s ease;
    }

    .swipe-slide {
        flex: 0 0 100%;
        width: 100%;
    }

    .swipe-slide .main-image-container {
        border-radius: 0 !important;
    }

    .swipe-dots {
        display: flex;
        justify-content: center;
        gap: 6px;
        padding: 10px 0 4px;
    }

    .swipe-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ccc;
        transition: all 0.3s;
        cursor: pointer;
    }

    .swipe-dot.active {
        background: var(--primary, #ff6b35);
        transform: scale(1.3);
    }

    .swipe-counter {
        display: block;
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.6);
        color: white;
        font-size: 0.75rem;
        font-weight: 600;
        padding: 3px 8px;
        border-radius: 12px;
        z-index: 2;
    }

    .modal-details {
        order: 2;
        width: 100%;
        height: auto;
    }
    
  .main-image {
    width: 100% !important;
    aspect-ratio: 9/10 !important;
    object-fit: contain !important;
    border-radius: 16px;
    padding: 1rem !important;
}

    /* Zoom en imagen - Mobile (pinch to zoom) */
    .main-image-container.zoomable {
        position: relative;
        overflow: hidden;
        touch-action: none;
    }

    .main-image-container.zoomable.zoomed {
        overflow: hidden;
    }

    .main-image-container.zoomable img {
        transform-origin: 0 0;
    }

    .zoom-hint {
        font-size: 0.7rem;
        padding: 5px 10px;
        bottom: 10px;
        right: 10px;
    }

    /* Animacion carrito - Mobile */
    .fly-to-cart {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .add-to-cart.adding {
        transform: scale(1);
    }

    .thumbnail-row {
        gap: 0.4rem;
        justify-content: center;
        padding: 0.5rem 0;
    }
    
    .thumbnail {
        width: 55px;
        height: 55px;
        border-radius: 8px;
    }

    .modal-info-row {
        flex-direction: row;
        align-items: baseline;
        gap: 0.5rem;
    }

    .modal-details h2.modal-nombre {
        font-size: 0.82rem;
        margin-bottom: 0;
        min-width: 0;
        opacity: 0.85;
        color: #333;
    }

    .modal-info-row .price-current {
        font-size: 1.15rem;
    }

    .modal-info-row .price-original {
        font-size: 0.75rem;
    }

    .modal-code {
        font-size: 0.7rem;
        position: static;
        flex-shrink: 0;
    }

    .modal-discount-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }

    .modal-stock-info {
        margin-bottom: 0.8rem;
        padding: 0.5rem;
    }

    .modal-stock-info .stock-good,
    .modal-stock-info .stock-low,
    .modal-stock-info .stock-out {
        font-size: 0.75rem;
    }

    .modal-description {
        font-size: 0.72rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }

    .size-selector {
        margin: 1rem 0;
    }
    
    .size-selector h3 {
        font-size: 0.95rem;
    }
    
    .size-options {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.4rem;
    }
    
    .size-option {
        padding: 0.6rem 0.4rem;
        border-radius: 10px;
    }
    
    .size-us {
        font-size: 0.9rem;
    }
    
    .size-cm {
        font-size: 0.7rem;
    }

    .size-stock {
        font-size: 0.55rem;
        margin-top: 0.2rem;
        padding: 0.1rem 0.2rem;
    }

    /* ===== COMPARTIR - MOVIL ===== */
    .share-container {
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 0.8rem;
        padding-top: 0.8rem;
    }

    .share-btn {
        flex: 1 1 calc(33% - 6px);
        min-width: 0;
        padding: 8px 10px;
        font-size: 0.75rem;
        gap: 4px;
    }

    .share-btn-icon {
        font-size: 1rem;
    }

    .share-btn.whatsapp-product .whatsapp-svg {
        width: 16px;
        height: 16px;
    }

    /* ===== POLITICAS MODAL - MOVIL ===== */
    .policies-mini {
        gap: 6px;
        padding: 10px;
        margin-top: 0.8rem;
    }

    .policy-item {
        font-size: 0.75rem;
        gap: 8px;
    }

    .policy-icon {
        font-size: 0.95rem;
        width: 20px;
    }

    /* ===== PAGINACION MOVIL ===== */
    .pagination-container {
        margin-top: 1.5rem;
        gap: 0.4rem;
    }
    
    .pagination-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .pagination-number {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
    
    .pagination-info {
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* ===== BOTTOM NAVIGATION ===== */
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--bottom-nav-height);
        background: white;
        display: flex;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        padding-bottom: var(--safe-area-bottom);
    }
    
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--gray);
        padding: 0.5rem;
        position: relative;
        transition: all 0.3s ease;
        flex: 1;
        /* Reset button styles */
        background: none;
        border: none;
        cursor: pointer;
        font-family: inherit;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav-item:active {
        transform: scale(0.9);
    }

    .bottom-nav-item.active {
        color: var(--primary);
    }

    .bottom-nav-icon {
        font-size: 1.3rem;
        margin-bottom: 0.2rem;
        transition: transform 0.3s ease;
    }

    .bottom-nav-item:hover .bottom-nav-icon,
    .bottom-nav-item:active .bottom-nav-icon {
        transform: scale(1.2);
    }

    .bottom-nav-item.active .bottom-nav-icon {
        animation: iconBounce 0.5s ease;
    }

    @keyframes iconBounce {
        0% { transform: scale(1); }
        30% { transform: scale(1.3) translateY(-3px); }
        50% { transform: scale(0.9); }
        70% { transform: scale(1.1); }
        100% { transform: scale(1); }
    }

    .bottom-nav-label {
        font-size: 0.65rem;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .bottom-nav-item.active .bottom-nav-label {
        font-weight: 700;
    }
    
    .bottom-nav-badge {
        position: absolute;
        top: 0;
        right: 50%;
        transform: translateX(100%);
        background: var(--secondary);
        color: white;
        font-size: 0.6rem;
        font-weight: bold;
        min-width: 16px;
        height: 16px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
        animation: badgePulse 2s ease-in-out infinite;
    }

    @keyframes badgePulse {
        0%, 100% { transform: translateX(100%) scale(1); }
        50% { transform: translateX(100%) scale(1.15); }
    }

    .bottom-nav-badge.bounce {
        animation: badgeBounce 0.5s ease;
    }

    @keyframes badgeBounce {
        0% { transform: translateX(100%) scale(1); }
        30% { transform: translateX(100%) scale(1.4); }
        50% { transform: translateX(100%) scale(0.9); }
        70% { transform: translateX(100%) scale(1.2); }
        100% { transform: translateX(100%) scale(1); }
    }

    /* === Bottom nav carrito con productos === */
    @keyframes mobileCartShake {
        0%, 72%, 100% { transform: rotate(0deg) scale(1); }
        75%  { transform: rotate(-14deg) scale(1.15); }
        79%  { transform: rotate(12deg) scale(1.1); }
        83%  { transform: rotate(-8deg) scale(1.05); }
        87%  { transform: rotate(5deg) scale(1.02); }
        91%  { transform: rotate(-2deg) scale(1); }
    }

    .bottom-nav-item.has-items .bottom-nav-icon {
        display: inline-block;
        animation: mobileCartShake 4s ease-in-out infinite;
    }

    @keyframes mobileBadgePop {
        0%, 72%, 100% { transform: translateX(100%) scale(1); }
        76%  { transform: translateX(100%) scale(1.6); }
        81%  { transform: translateX(100%) scale(0.85); }
        86%  { transform: translateX(100%) scale(1.2); }
        91%  { transform: translateX(100%) scale(1); }
    }

    .bottom-nav-item.has-items .bottom-nav-badge {
        animation: mobileBadgePop 4s ease-in-out infinite;
    }
    
    /* ===== CARRITO SIDEBAR ===== */
    .cart-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1001;
    }
    
    .cart-overlay.active {
        display: block;
    }
    
    .cart-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 350px;
        height: 100%;
        background: white;
        z-index: 1002;
        display: flex;
        flex-direction: column;
        transition: right 0.3s ease;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    }

    .cart-sidebar.active {
        right: 0;
    }
    
    .cart-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }
    
    .cart-header h2 {
        font-size: 1.2rem;
        margin: 0;
    }
    
    .cart-close-btn {
        background: var(--light);
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        font-size: 1.2rem;
        cursor: pointer;
    }
    
    .cart-items {
        flex: 1;
        overflow-y: auto;
        padding: 1rem;
    }
    
    .cart-empty {
        text-align: center;
        color: var(--gray);
        padding: 2rem;
    }
    
    .cart-item {
        display: flex;
        gap: 0.8rem;
        padding: 0.8rem;
        background: var(--light);
        border-radius: 12px;
        margin-bottom: 0.8rem;
    }
    
    .cart-item-image {
        width: 60px;
        height: 60px;
        border-radius: 8px;
        object-fit: cover;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    .cart-item-info {
        flex: 1;
    }
    
    .cart-item-name {
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
    }
    
    .cart-item-details {
        font-size: 0.75rem;
        color: var(--gray);
    }
    
    .cart-item-price {
        font-weight: 700;
        color: var(--primary);
        margin-top: 0.3rem;
    }
    
    .cart-item-actions {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .cart-item-view {
        background: none;
        border: none;
        color: #2563eb;
        cursor: pointer;
        padding: 0.5rem;
        font-size: 1rem;
    }

    .cart-item-view:hover {
        color: #1e40af;
    }

    .cart-item-remove {
        background: none;
        border: none;
        color: #ef4444;
        cursor: pointer;
        padding: 0.5rem;
        font-size: 1rem;
    }

    .cart-footer {
        padding: 1rem;
        border-top: 1px solid var(--border);
        padding-bottom: calc(1rem + var(--safe-area-bottom));
    }
    
    .cart-total {
        display: flex;
        justify-content: space-between;
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 1rem;
    }
    
    .checkout-btn {
        width: 100%;
        padding: 1rem;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 12px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
    }
    
    .checkout-btn:active {
        background: var(--primary-dark);
    }
    
    /* ===== WISHLIST SIDEBAR ===== */
    .wishlist-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1001;
    }

    .wishlist-overlay.active {
        display: block;
    }

    .wishlist-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 350px;
        height: 100%;
        background: white;
        z-index: 1002;
        display: flex;
        flex-direction: column;
        transition: right 0.3s ease;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    }

    .wishlist-sidebar.active {
        right: 0;
    }

    .wishlist-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .wishlist-header h2 {
        font-size: 1.2rem;
        margin: 0;
    }

    .wishlist-items {
        flex: 1;
        overflow-y: auto;
        padding: 1rem;
        padding-bottom: calc(1rem + var(--safe-area-bottom));
    }

    .product-heart {
        font-size: 0.8rem;
    }

    /* ===== MODAL CATEGORÍAS ===== */
    .categories-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1001;
        align-items: flex-end;
    }
    
    .categories-modal.active {
        display: flex;
    }
    
    .categories-modal-content {
        background: white;
        width: 100%;
        border-radius: 24px 24px 0 0;
        max-height: 70vh;
        animation: slideUp 0.3s ease;
    }
    
    .categories-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }
    
    .categories-header h2 {
        margin: 0;
        font-size: 1.2rem;
    }
    
    .categories-header button {
        background: var(--light);
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        font-size: 1.2rem;
        cursor: pointer;
    }
    
    .categories-list {
        padding: 1rem;
        padding-bottom: calc(1rem + var(--safe-area-bottom));
    }
    
    .category-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        border-radius: 12px;
        cursor: pointer;
        transition: background 0.3s;
    }
    
    .category-item:active {
        background: var(--light);
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
    }
    
    .category-info {
        flex: 1;
    }
    
    .category-name {
        font-weight: 600;
        font-size: 1rem;
    }
    
    .category-count {
        font-size: 0.8rem;
        color: var(--gray);
    }
    
    /* ===== TOAST NOTIFICATIONS ===== */
    .toast-container {
        position: fixed;
        bottom: calc(var(--bottom-nav-height) + 1rem + var(--safe-area-bottom));
        left: 1rem;
        right: 1rem;
        z-index: 2000;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        pointer-events: none;
    }
    
    .toast {
        background: var(--dark);
        color: white;
        padding: 1rem;
        border-radius: 12px;
        font-size: 0.9rem;
        font-weight: 500;
        animation: toastIn 0.3s ease;
        pointer-events: auto;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .toast.success {
        background: var(--secondary);
    }
    
    .toast.error {
        background: #ef4444;
    }
    
    .toast.warning {
        background: #f59e0b;
    }
    
    @keyframes toastIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    @keyframes toastOut {
        from {
            opacity: 1;
            transform: translateY(0);
        }
        to {
            opacity: 0;
            transform: translateY(20px);
        }
    }
    
    /* ===== LOADING ===== */
    .loading {
        padding: 3rem 1rem;
    }
    
    .spinner {
        width: 40px;
        height: 40px;
    }
    
    /* ===== SKELETON LOADING ===== */
    .skeleton {
        background: linear-gradient(90deg, var(--border) 25%, var(--light) 50%, var(--border) 75%);
        background-size: 200% 100%;
        animation: skeleton 1.5s infinite;
        border-radius: 8px;
    }
    
    @keyframes skeleton {
        0% {
            background-position: 200% 0;
        }
        100% {
            background-position: -200% 0;
        }
    }
    
    .skeleton-card {
        background: white;
        border-radius: 16px;
        overflow: hidden;
    }
    
    .skeleton-image {
        height: 160px;
    }
    
    .skeleton-text {
        height: 14px;
        margin: 0.5rem 0.8rem;
    }
    
    .skeleton-text.short {
        width: 60%;
    }
    
    .skeleton-button {
        height: 36px;
        margin: 0.5rem 0.8rem 0.8rem;
    }
    
    /* ===== PULL TO REFRESH INDICATOR ===== */
    .pull-indicator {
        display: none;
        text-align: center;
        padding: 1rem;
        color: var(--gray);
        font-size: 0.9rem;
    }
    
    .pull-indicator.active {
        display: block;
    }
}

/* ===== TABLET ADJUSTMENTS ===== */
@media (min-width: 481px) and (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-image {
        aspect-ratio: 9/10;
    }
    
    .cart-sidebar {
        max-width: 400px;
    }

    .wishlist-sidebar {
        max-width: 400px;
    }
}

/* ===== LANDSCAPE MÓVIL ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-content {
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        flex-direction: unset;
    }

    .main-image {
        aspect-ratio: 9/10;
    }
    
    .bottom-nav {
        height: 50px;
    }
    
    .bottom-nav-icon {
        font-size: 1.1rem;
    }
    
    .bottom-nav-label {
        display: none;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    /* Opcional: agregar soporte dark mode */
}



/* Ocultar bottom nav cuando modal está abierto */
@media (max-width: 768px) {
    /* Cuando modal tiene clase 'active', ocultar bottom nav */
    .modal.active ~ .bottom-nav {
        display: none !important;
    }
    
    /* Si el bottom nav no es hermano del modal, usar body */
    body.modal-open .bottom-nav {
        display: none !important;
    }
}

/* Animación pulso para botón agregar al carrito */
@keyframes pulseCart {
    0%, 100% { transform: scale(1); box-shadow: none; }
    50% { transform: scale(1.03); box-shadow: 0 0 12px rgba(255, 107, 53, 0.4); }
}

@keyframes shimmer {
    0%, 100% { left: -100%; }
    50% { left: 120%; }
}

/* ===== PROTECCIÓN DE IMÁGENES MÓVIL ===== */

/* Bloquear long-press (menú guardar imagen) */
.product-image img,
.main-image-container img,
.thumbnail,
.gallery img {
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}
