

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

#mName{
    color: #fff;
}

/* Botón de prueba loader */
.test-loader-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 10px 20px;
    background: #e61e43;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 50;
    font-weight: 500;
}

/* ========================================
   HEADER Y ACCIONES
   ======================================== */

.productos{
    margin-top: 50px;
    max-width: 100%;
    width: 100%;
    height: auto;
    min-height: 100vh;
}
.logo {
    font-weight: 800;
    font-size: 24px;
    color: #e61e43;
    letter-spacing: -1px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-icon-wrapper {
    position: relative;
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #202020;
    border-radius: 12px;
    transition: 0.3s;
    color: white;
}

.cart-icon-wrapper:hover {
    background: #2a2a2a;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e61e43;
    color: white;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f0f0f;
    display: none;
}

.user-profile {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
    cursor: pointer;
}

.user-profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   FILTROS DE CATEGORÍA
   ======================================== */
.filter-container {
    display: flex;
    gap: 12px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 20px;
}

.filter-btn {
    padding: 10px 24px;
    border-radius: 999px;
    background: #202020;
    color: #a1a1aa;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.filter-btn.active {
    background: #e61e43;
    color: white;
    box-shadow: 0 0 15px rgba(230, 30, 67, 0.4);
}

/* ========================================
   GRID DE PRODUCTOS
   ======================================== */
.products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    max-width: 1200px;
    width: 100%;
    padding: 0 20px 40px;
}

/* ========================================
   TARJETA DE PRODUCTO
   ======================================== */
.product-card {
    width: 350px;
    background: #161616;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #222;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(230, 30, 67, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255 0 47 / 0.45);
    background: #150A0A;
}

.product-card:hover .product-image {
    scale: 1.2;
    transition: 0.5s;
}

.product-card.featured {
    box-shadow: 0 0 30px rgba(230, 30, 67, 0.1);
    border-color: #331a1e;
}

.product-card i {
    color: #fff;
}

/* Imagen del producto */
.image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    width: 100%;
    height: 100%;
    transition: 1s;
    object-fit: cover;
}

/* Auto-rotate de variantes (CSS puro - 5s por imagen)
.image-container img[data-variant] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    object-fit: cover;
    opacity: 0;
    animation: variantRotate 20s infinite ease-in-out;
    pointer-events: none;
    transition: opacity 0.4s ease;
} */

/* .image-container img[data-variant]:nth-child(1) { animation-delay: 0s; }
.image-container img[data-variant]:nth-child(2) { animation-delay: 5s; }
.image-container img[data-variant]:nth-child(3) { animation-delay: 10s; }
.image-container img[data-variant]:nth-child(4) { animation-delay: 15s; }
.image-container img[data-variant]:nth-child(5) { animation-delay: 20s; } */

@keyframes variantRotate {
    0%, 24.99%  { opacity: 1; transform: scale(1); }
    25%, 100%   { opacity: 0; transform: scale(1.02); }
}

.product-card:hover .image-container img[data-variant] {
    animation-play-state: paused;
}

/* Puntitos indicadores de variantes */
.variant-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
    background: rgba(0,0,0,0.5);
    padding: 4px 10px;
    border-radius: 20px;
}

.variant-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transition: all 0.3s;
}

.variant-dot.active {
    background: #e61e43;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(230, 30, 67, 0.6);
}

.discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #e61e43;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 10;
}

/* Contenido de la tarjeta */
.card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.brand-label {
    color: #e61e43;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
}

.specs-list {
    margin-bottom: 20px;
}

.spec-item {
    font-size: 13px;
    color: #a1a1aa;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Tags de características */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.feature-tag {
    background: #1e1e1e;
    color: #a1a1aa;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #2a2a2a;
}

.feature-tag svg {
    color: #e61e43;
    width: 10px;
    height: 10px;
}

/* Footer de tarjeta */
.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid #222;
    padding-top: 20px;
}

.price-section {
    display: flex;
    flex-direction: column;
}

.old-price {
    color: #666;
    text-decoration: line-through;
    font-size: 13px;
    margin-bottom: 2px;
}

.current-price {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.cart-btn {
    color: #fff;
    background: #1a1012;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #321b20;
}

.cart-btn:hover, .cart-btn.active {
    background: #e61e43;
    box-shadow: 0 0 15px rgba(230, 30, 67, 0.4);
    border-color: transparent;
}

/* ========================================
   MODAL DE PRODUCTO
   ======================================== */
#productModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.38);
    backdrop-filter: blur(15px);
    z-index: 1000;
    overflow-y: auto;
    place-content: center;
    place-items: center;
}

.modal-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #161616;
    border-radius: 32px;
    border: 1px solid #333;
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* overflow: hidden; */
    box-shadow: 0 50px 100px rgba(0,0,0,0.8);
    animation: modalFadeIn 0.5s ease-out;
    width: 95%;
    max-height: 90vh;
    height: auto;
    border-radius: 30px;
    overflow: hidden;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.9) translateY(30px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-image-panel {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 400px;
    overflow: hidden; /* Importante: recorta el zoom */
    cursor: zoom-in;
    cursor: crosshair;
    /* Evita gestos nativos del navegador en esta zona */
    touch-action: none; 
    -webkit-tap-highlight-color: transparent; /* Quita el cuadro azul al tocar en Android */
    /* border-radius: 30px 30px 0px 0px; */
}

#mImage {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.15s ease-out; /* Un toque de suavidad para que no vibre */
    pointer-events: none;
    will-change: transform; /* Optimización de rendimiento para móviles */
}



.modal-image-panel img {
    /* width: 100%; */
    max-height: auto;
    object-fit: cover;
    /* padding: 20px; */
}

/* Miniaturas de galería en modal */
.imgs-gallery {
    position: absolute;
    display: flex;
    gap: 15px;
    margin-top: 30px;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.thumb-img {
    width: 60px;
    height: 60px;
    border: 2px solid #eee;
    border-radius: 10px;
    cursor: pointer;
    padding: 5px;
    transition: 0.2s;
    object-fit: cover;
    background: white;
    display: block;
}



.thumb-img:hover, .thumb-img.active {
    border-color: #e61e43;
    transform: scale(1.1);
}

.modal-info-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 40px;
    height: auto;

}

::-webkit-scrollbar{
    width: 5px;
    background:#000;
}

::-webkit-scrollbar-thumb{
    background: #e61e43;
}

.modal-info-panel.xxe {
    padding: 40px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #222;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1100;
    transition: all 0.3s;
    border: none;
    font-size: 20px;
}

.close-modal:hover {
    background: #e61e43;
    transform: rotate(90deg);
}

.modal-description {
    color: #888;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
}

/* Grid de especificaciones */
.grid-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.spec-card {
    background: #202020;
    padding: 15px;
    border-radius: 16px;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 12px;
}

.spec-icon {
    background: #161616;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e61e43;
    font-size: 18px;
}

.spec-data h4 {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.5px;
}

.spec-data p {
    font-size: 14px;
    font-weight: 600;
    margin: 3px 0 0;
    color: white;
}

/* Botones de ficha técnica */
.tech-btns-wrapper {
    display: flex;
    width: 100%;
    margin: 20px 0;
    border-radius: 14px;
    /* overflow: hidden; */
    border: 1px solid #333;
    background: rgba(255, 255, 255, 0.03);
}

.btn-tech {
    flex: 1;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    color: white;
    border: none;
    background: rgba(20, 20, 20, 0.6);
}

.btn-tech:first-child { border-right: 1px solid #333; }
.btn-tech.active { background: #e61e43; opacity: 1; filter: none; }
.btn-tech.inactive { opacity: 0.4; filter: blur(0.8px); }
.btn-tech:hover { opacity: 1; filter: none; background: rgba(230, 30, 67, 0.2); }

/* Footer del modal */
.modal-footer {
    height: auto;
    /* margin-top: auto; */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.buy-now-btn {
    background: #e61e43;
    color: white;
    padding: 14px 30px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    box-shadow: 0 10px 20px rgba(230, 30, 67, 0.3);
}

.buy-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(230, 30, 67, 0.5);
}

/* Iframe de ficha técnica */
#ficha_komputadora_modal {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    border: none;
    top: 0;
    left: 0;
    z-index: 99;
    background: #161616;
}

/* ========================================
   EFECTO SCROLL (es-crolear)
   ======================================== */
.es-crolear {
    position: relative;
    overflow: hidden;
}

.es-crolear::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 998;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.es-crolear::after {
    content: "👆";
    font-size: 3rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    pointer-events: none;
    text-shadow: 0 0 15px #ff0000;
    animation: handSwipe 1.8s infinite ease-in-out;
}

@keyframes handSwipe {
    0% { transform: translate(-50%, 60%) rotate(45deg); opacity: 0; }
    30% { opacity: 1; }
    70% { opacity: 1; }
    100% { transform: translate(-50%, -140%) rotate(45deg); opacity: 0; }
}

.es-crolear.guide-off::before,
.es-crolear.guide-off::after {
    opacity: 0;
    visibility: hidden;
}

/* ========================================
   EFECTO CARGA (karga)
   ======================================== */
.karga {
    position: relative !important;
}

.karga-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    pointer-events: all;
}

.karga-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 0, 0, 0.2);
    border-top: 3px solid #ff0000;
    border-radius: 50%;
    filter: drop-shadow(0 0 5px #ff0000);
    animation: spin-karga 0.8s linear infinite;
}

@keyframes spin-karga {
    to { transform: rotate(360deg); }
}

/* ========================================
   SIDEBAR DEL CARRITO
   ======================================== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: #161616;
    border-left: 1px solid #333;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: -10px 0 40px rgba(0,0,0,0.5);
}

.cart-sidebar.open { right: 0; }

.cart-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.cart-overlay.active { opacity: 1; visibility: visible; }

.cart-header {
    padding: 20px 25px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(22,22,22,0.95);
}

.cart-header h3 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.cart-close {
    background: #222;
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    font-size: 20px;
}

.cart-close:hover {
    background: #e61e43;
    transform: rotate(90deg);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-empty {
    text-align: center;
    color: #a1a1aa;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.cart-empty i { font-size: 40px; opacity: 0.5; }

.cart-item {
    background: #1a1a1a;
    border-radius: 14px;
    padding: 12px;
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 12px;
    align-items: center;
    border: 1px solid #2a2a2a;
    transition: 0.2s;
}

.cart-item:hover {
    border-color: #e61e43;
    transform: translateX(3px);
}

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    background: white;
    padding: 4px;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #e61e43;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #222;
    border-radius: 8px;
    padding: 4px;
}

.cart-item-qty button {
    background: #333;
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.cart-item-qty button:hover { background: #e61e43; }

.cart-item-qty span {
    font-size: 13px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    transition: 0.2s;
}

.cart-item-remove:hover {
    color: #e61e43;
    transform: scale(1.2);
}

.cart-footer {
    padding: 20px 25px;
    border-top: 1px solid #333;
    background: rgba(22,22,22,0.95);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    color: white;
}

.cart-total strong {
    font-size: 22px;
    color: #e61e43;
}

.checkout-btn, .consult-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.3s;
}

.checkout-btn {
    background: #e61e43;
    color: white;
    box-shadow: 0 4px 15px rgba(230, 30, 67, 0.3);
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 30, 67, 0.5);
}

.consult-btn {
    background: #25D366;
    color: white;
}

.consult-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.floating-cart-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e61e43;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 8px 25px rgba(230, 30, 67, 0.4);
    z-index: 1900;
    transition: all 0.3s;
}

.floating-cart-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 35px rgba(230, 30, 67, 0.6);
}

.floating-cart-btn .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: white;
    color: #e61e43;
    font-size: 12px;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e61e43;
}

/* ========================================
   MEDIA QUERIES
   ======================================== */
@media (max-width: 900px) {
    .modal-container { grid-template-columns: 1fr; }
    #productModal { padding: 10px; }
    .modal-info-panel { padding: 30px; }
    .modal-info-panel{
            max-height: 50%;
    overflow-y: auto;
    }   
}

@media (max-width: 480px) {
    .cart-sidebar { width: 100vw; right: -100vw; }
    .cart-item { grid-template-columns: 50px 1fr auto; }
    .cart-item-img { width: 50px; height: 50px; }
    .grid-specs { grid-template-columns: 1fr; }
    .modal-footer { flex-direction: column; gap: 15px; }
    .buy-now-btn { width: 100%; }

}
iframe{
    width: 100%;
    height: 100%;
}


#klose_iframe{
    position: absolute;
    top: 10px;
    right: 10px;
    font-weight: bold;
    font-size: 1.5em;
    z-index: 50;
    display: none;
}

#hablar{
    margin-top: 5px;
    display: block;
    width: 30px;
    height: 30px;
    background: #e61e43;
    border-radius: 1000px;
    color: white;
    place-content: center;
    place-items: center;
    text-align: center;
    font-size: 1.2em;
}