/* 
   ==========================================================================
   ITOOLS - PRODUCT CATALOG PREMIUM THEME (B&W + RED)
   ==========================================================================
*/

:root {
    --primary: #121316;
    --secondary: #ffffff;
    --accent: #ffffff;
    --accent-glow: rgba(255, 255, 255, 0.25);
    --offer-red: #D90429;
    --offer-glow: rgba(217, 4, 41, 0.4);
    --bg-dark: #121316;
    --bg-card: #1c1d22;
    --text-main: #ffffff;
    --text-dim: #a8abb5;
    --border: rgba(255, 255, 255, 0.12);
    --transition: all 0.3s ease;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.contenedor-productos {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
    width: 100%;
    box-sizing: border-box;
}

/* HEADER & CATEGORY BADGES */
.header-productos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-productos-text h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
}

.header-productos-text p {
    margin: 5px 0 0 0;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.category-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.badge {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-dim);
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.25s;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.badge.active {
    background: #fff;
    border-color: #fff;
    color: #000;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25);
}

.badge:hover:not(.active) {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateY(-2px);
}

/* FILTERS & SEARCH */
.filtros {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 45px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.search-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.95rem;
    pointer-events: none;
}

#buscarProducto {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 44px;
    background: #121317;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

#buscarProducto::placeholder {
    color: var(--text-dim);
    opacity: 0.8;
}

#buscarProducto:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 15px var(--accent-glow);
}

.select-group, .filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filtros select {
    height: 48px;
    padding: 0 40px 0 16px;
    background-color: #14151a;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8abb5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 13px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.filtros select:hover,
.filtros select:focus {
    border-color: var(--accent);
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 48px;
    padding: 0 18px;
    background: #14151a;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-dim);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    font-size: 0.9rem;
    white-space: nowrap;
}

.checkbox-container:hover {
    border-color: #fff;
    color: #fff;
}

.checkbox-container input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #fff;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

/* GRID */
.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

/* CARD BASE */
.card-producto {
    transition: var(--transition);
}

.img-container {
    background: #16171b;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
    height: 260px;
    overflow: hidden;
    position: relative;
    transition: var(--transition);
}

.img-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
    z-index: 1;
}

.card-producto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.card-producto:hover .img-container img {
    transform: scale(1.07);
}

.info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nombre {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 5px;
}

.color-badge {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255,255,255,0.03);
    padding: 4px 10px;
    border-radius: 5px;
    width: fit-content;
    margin: 0 auto;
}

.color-badge i {
    color: var(--accent);
    font-size: 0.8rem;
}

.categoria-tag {
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 1px;
}

.precio {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--secondary);
    margin: 10px 0;
}

.stock {
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.stock.ok { color: #10b981; }
.stock.low { color: #f59e0b; }
.stock.out { color: #ef4444; }

.btn-add-cart {
    margin-top: auto !important;
    background: var(--secondary);
    color: var(--primary);
    border: none;
    padding: 15px;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
}

.btn-add-cart:hover {
    background: var(--accent);
    color: black;
}

.btn-add-cart:disabled {
    background: #222;
    color: #555;
    cursor: not-allowed;
}

/* LOAD MORE BUTTON */
.load-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 48px;
    padding-top: 10px;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 38px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-load-more:hover:not(:disabled) {
    background: #ffffff;
    color: #0c0d11;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.22);
}

.btn-load-more:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .contenedor-productos {
        padding: 16px 12px 35px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .header-productos {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 14px;
        width: 100%;
        box-sizing: border-box;
    }

    .header-productos-text h2 {
        font-size: 1.4rem;
    }

    .header-productos-text p {
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .category-badges {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
        box-sizing: border-box;
    }

    .badge {
        justify-content: center;
        padding: 9px 4px;
        font-size: 0.72rem;
        border-radius: 10px;
        letter-spacing: 0.2px;
        gap: 4px;
        white-space: nowrap;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .filtros {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
        margin-bottom: 20px;
        border-radius: 14px;
        width: 100%;
        box-sizing: border-box;
    }

    .search-wrapper {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    #buscarProducto {
        height: 44px;
        padding: 0 14px 0 40px;
        font-size: 0.86rem;
        border-radius: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .search-wrapper i {
        left: 14px;
        font-size: 0.88rem;
    }

    .select-group, .filter-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
    }

    #filtroSubcategoria,
    #filtroMarca {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    #ordenarProducto,
    .checkbox-container {
        grid-column: span 1;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .filtros select {
        height: 44px;
        padding: 0 30px 0 10px;
        font-size: 0.8rem;
        border-radius: 10px;
        background-position: right 10px center;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .checkbox-container {
        height: 44px;
        padding: 0 8px;
        font-size: 0.78rem;
        border-radius: 10px;
        gap: 6px;
        justify-content: center;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .checkbox-container span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .checkbox-container input[type="checkbox"] {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    .load-more-container {
        margin-top: 28px;
    }

    .btn-load-more {
        width: 100%;
        max-width: 320px;
        padding: 13px 20px;
        font-size: 0.83rem;
    }
}

@media (max-width: 576px) {
    .grid-productos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .card-producto {
        padding: 10px 8px;
        border-radius: 12px;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    .img-container {
        height: 135px;
        border-radius: 8px;
        margin-bottom: 8px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .nombre {
        font-size: 0.82rem;
        height: 34px;
        line-height: 1.25;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        margin-bottom: 2px;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    .color-badge {
        font-size: 0.65rem;
        padding: 2px 6px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .precio {
        font-size: 1.1rem;
        margin: 4px 0;
    }
    .stock {
        font-size: 0.68rem;
    }
    .btn-add-cart {
        margin-top: 8px;
        padding: 9px;
        font-size: 0.72rem;
        border-radius: 6px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* SALE DISCOUNT STYLES */
.sale-badge-catalog {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--offer-red);
    color: white;
    font-size: 0.75rem;
    font-weight: 900;
    padding: 5px 12px;
    border-radius: 6px;
    letter-spacing: 1px;
    z-index: 5;
    box-shadow: 0 4px 15px var(--offer-glow);
    text-transform: uppercase;
}

.precio-viejo {
    text-decoration: line-through;
    color: var(--text-dim) !important;
    font-weight: 500 !important;
}

.precio-nuevo {
    color: var(--offer-red) !important;
    font-weight: 900 !important;
}
/* ===== ULTRA-PREMIUM PRODUCT CARD REDESIGN (Catálogo & Home) ===== */
.grid-productos { 
    gap: 24px; 
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
}

.card-producto {
    padding: 12px 12px 14px;
    border-radius: 18px;
    background: linear-gradient(180deg, #18191f 0%, #121316 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
    text-align: left;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    box-sizing: border-box !important;
    position: relative;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.28s ease, 
                background 0.28s ease;
    opacity: 1 !important;
}

.card-producto:hover {
    transform: translateY(-6px);
    background: linear-gradient(180deg, #20222a 0%, #15161a 100%);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Image Container with Apple Spotlight & Drop Shadow */
.card-producto .img-container {
    height: 220px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: radial-gradient(circle at 50% 45%, #23252e 0%, #0d0e12 75%) !important;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex-shrink: 0;
}
.card-producto .img-container::after { 
    display: none !important; 
}
.card-producto img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14px;
    box-sizing: border-box;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
    display: block;
}
.card-producto:hover .img-container img {
    transform: scale(1.06);
    filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.75));
}
.ambient { display: none !important; }

/* Floating Sale Badge */
.sale-badge-catalog {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #e63946 0%, #c1121f 100%);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    z-index: 5;
    box-shadow: 0 4px 14px rgba(230, 57, 70, 0.45);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Info container */
.card-producto .info {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 0 2px !important;
    box-sizing: border-box !important;
}

/* 1. Rigid Title - 2 lines clamp */
.card-producto .titulo-row {
    min-width: 0;
    width: 100%;
    margin-bottom: 2px !important;
    display: flex;
    align-items: flex-start;
}
.card-producto .nombre {
    height: 2.5rem !important;
    min-height: 2.5rem !important;
    max-height: 2.5rem !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    font-size: 0.94rem !important;
    letter-spacing: -0.1px !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    color: #f3f4f6 !important;
    text-decoration: none !important;
    margin: 0 !important;
    transition: color 0.2s ease;
}
.card-producto:hover .nombre {
    color: #ffffff !important;
}

/* 2. Micro-tags Row */
.card-producto .tags-row {
    min-height: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 3px 0 5px 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    flex-wrap: nowrap !important;
}
.card-producto .tags-row .brand-badge-mini {
    font-size: 0.65rem !important;
    background: rgba(59, 130, 246, 0.14) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.28) !important;
    padding: 1px 6px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    line-height: 1.2 !important;
    flex-shrink: 0 !important;
}
.card-producto .tags-row .tipo {
    font-size: 0.67rem !important;
    color: var(--text-dim, #9ca3af) !important;
    white-space: nowrap !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    line-height: 1.2 !important;
    flex-shrink: 0 !important;
    font-weight: 600 !important;
}
.card-producto .tags-row .color-badge {
    margin: 0 !important;
    font-size: 0.65rem !important;
    padding: 1px 6px !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    max-width: 100% !important;
    flex-shrink: 0 !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #d1d5db !important;
}
.card-producto .tags-row .category-tag {
    font-size: 0.68rem !important;
    line-height: 1.2 !important;
    flex-shrink: 0 !important;
    color: #6b7280 !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* 3. Card Bottom: empujado a la base */
.card-producto .card-bottom {
    margin-top: auto !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

/* 4. Price Block: altura fija de 46px */
.card-price-container {
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 2px !important;
    margin: 4px 0 5px 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.card-price-container .price-row-top {
    height: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

.card-price-container .price-spacer {
    display: inline-block;
    height: 16px;
    visibility: hidden;
}

.card-price-container .orig-price {
    font-size: 0.74rem !important;
    color: #6b7280 !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
}
.card-price-container .orig-price del {
    text-decoration: line-through;
    opacity: 0.85;
}

.card-price-container .pct-pill {
    font-size: 0.64rem !important;
    font-weight: 800 !important;
    background: rgba(230, 57, 70, 0.16) !important;
    color: #ff4d6d !important;
    border: 1px solid rgba(230, 57, 70, 0.35) !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
    letter-spacing: 0.3px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.card-price-container .price-row-main {
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

.card-price-container .price-val {
    font-size: 1.18rem !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    letter-spacing: -0.3px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}
.card-price-container .price-val.deal {
    color: #ffffff !important;
}
.card-price-container .price-val.mayorista {
    color: #22c55e !important;
}

.card-price-container .usd-pill {
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 2px 7px !important;
    border-radius: 6px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.card-price-container .tier-pill.mayorista {
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    background: rgba(34, 197, 94, 0.15) !important;
    color: #22c55e !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
    letter-spacing: 0.3px !important;
    white-space: nowrap !important;
}
.card-price-container .ref-minorista {
    font-size: 0.72rem !important;
    color: var(--text-dim, #8b8e9b) !important;
    white-space: nowrap !important;
}

/* 5. Stock Status with Pulsing Dot */
.card-producto .stock {
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    font-size: 0.73rem !important;
    font-weight: 600 !important;
    margin: 3px 0 6px 0 !important;
}
.card-producto .stock.ok { color: #34d399 !important; }
.card-producto .stock.low { color: #fbbf24 !important; }
.card-producto .stock.out { color: #9ca3af !important; }

.stock-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    position: relative;
}
.stock-dot.stock-dot-ok {
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: stockPulseOk 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.stock-dot.stock-dot-low {
    background: #f59e0b;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    animation: stockPulseLow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.stock-dot.stock-dot-out {
    background: #6b7280;
}

@keyframes stockPulseOk {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes stockPulseLow {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* 6. Botón de Agregar con Tactile Feedback */
.card-producto .btn-add-cart {
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 16px !important;
    margin-top: 4px !important;
    border-radius: 12px !important;
    font-size: 0.84rem !important;
    font-weight: 800 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    letter-spacing: 0.5px !important;
    background: #ffffff !important;
    color: #000000 !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.1) !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.card-producto .btn-add-cart:hover:not(:disabled) {
    background: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25) !important;
}
.card-producto .btn-add-cart:active:not(:disabled) {
    transform: scale(0.97) !important;
}
.card-producto .btn-add-cart.added {
    background: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.45) !important;
    transform: scale(1.02) !important;
}
.card-producto .btn-add-cart:disabled {
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.3) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Legacy product-card / product-img compatibility */
.product-img { position: relative; background-color: #121316 !important; overflow: hidden; }
.product-img .main-img {
    position: relative; z-index: 1; width: 100%; height: 100%;
    object-fit: contain; display: block; box-sizing: border-box; padding: 4px;
}
.product-img .product-overlay { z-index: 2; }

/* Responsive Móvil para Cards (2 columnas perfectas) */
@media (max-width: 576px) {
    .grid-productos, .product-grid { 
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important; 
        gap: 10px !important; 
    }
    .card-producto { 
        padding: 8px 8px 12px !important; 
        border-radius: 14px !important; 
    }
    .card-producto .img-container { 
        height: 140px !important; 
        margin-bottom: 8px !important; 
        border-radius: 10px !important; 
    }
    .card-producto img { 
        padding: 8px !important; 
        filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5)) !important; 
    }
    .card-producto .info { 
        padding: 0 1px !important; 
    }
    .card-producto .nombre {
        min-height: 2.1rem !important;
        height: 2.1rem !important;
        max-height: 2.1rem !important;
        font-size: 0.78rem !important;
        line-height: 1.2 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    .card-producto .tags-row {
        min-height: 18px !important;
        height: 18px !important;
        max-height: 18px !important;
        flex-wrap: nowrap !important;
        gap: 3px !important;
        margin: 2px 0 4px 0 !important;
        overflow: hidden !important;
    }
    .card-producto .tags-row .brand-badge-mini,
    .card-producto .tags-row .tipo,
    .card-producto .tags-row .color-badge,
    .card-producto .tags-row .category-tag {
        font-size: 0.62rem !important;
        padding: 1px 4px !important;
    }
    .card-price-container {
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        margin: 2px 0 4px 0 !important;
    }
    .card-price-container .price-row-top {
        height: 14px !important;
        min-height: 14px !important;
        font-size: 0.65rem !important;
    }
    .card-price-container .price-row-main {
        height: 22px !important;
        min-height: 22px !important;
    }
    .card-price-container .price-val {
        font-size: 0.98rem !important;
    }
    .card-price-container .usd-pill {
        font-size: 0.65rem !important;
        padding: 1px 4px !important;
    }
    .card-producto .stock {
        height: 18px !important;
        min-height: 18px !important;
        font-size: 0.68rem !important;
        margin: 2px 0 4px 0 !important;
    }
    .card-producto .btn-add-cart {
        height: 36px !important;
        min-height: 36px !important;
        font-size: 0.72rem !important;
        border-radius: 10px !important;
        gap: 5px !important;
        margin-top: 4px !important;
        padding: 0 6px !important;
    }
    .sale-badge-catalog {
        font-size: 0.6rem !important;
        padding: 2px 6px !important;
        top: 6px !important;
        left: 6px !important;
        border-radius: 4px !important;
    }
    .product-card { padding: 8px; border-radius: 16px; }
    .product-img { height: 140px; }
    .product-info { padding: 12px 4px 2px; }
    .product-info h3 { font-size: .85rem; min-height: 2.4rem; }
    .price-row { flex-wrap: wrap !important; gap: 4px !important; min-height: 0 !important; margin-bottom: 12px !important; }
    .price { font-size: 1.05rem; }
    .btn-product { padding: 10px 4px; font-size: .72rem; }
}

/* SKELETON LOADING SHIMMER */
.skeleton-card {
    pointer-events: none;
    user-select: none;
    border-color: rgba(255, 255, 255, 0.05) !important;
}
.skeleton-shimmer {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.03) 100%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-card .skeleton-img {
    height: 220px;
    border-radius: 14px;
    margin-bottom: 12px;
}
.skeleton-card .skeleton-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.skeleton-card .skeleton-line {
    border-radius: 6px;
}
.skeleton-card .skeleton-title {
    height: 18px;
    width: 85%;
}
.skeleton-card .skeleton-subtitle {
    height: 14px;
    width: 55%;
}
.skeleton-card .skeleton-price {
    height: 22px;
    width: 45%;
    margin-top: 4px;
}
.skeleton-card .skeleton-btn {
    height: 42px;
    border-radius: 12px;
    width: 100%;
    margin-top: auto;
}
@media (max-width: 576px) {
    .skeleton-card .skeleton-img {
        height: 140px;
        margin-bottom: 8px;
    }
    .skeleton-card .skeleton-title {
        height: 15px;
    }
    .skeleton-card .skeleton-btn {
        height: 36px;
        border-radius: 10px;
    }
}
