﻿
/* =========================================
   GENERAL
========================================= */
* {
    font-family: 'Poppins', sans-serif !important;
}
html, body {
    margin: 0;
    padding: 0;
    color: #fff;
    font-family: 'Poppins', sans-serif !important;
    background: radial-gradient(circle at top, rgba(255,255,255,0.35), transparent 40%), linear-gradient( 135deg, #5bb6ff 0%, #74ACDF 35%, #ffffff 50%, #74ACDF 65%, #5bb6ff 100% );
    background-attachment: fixed;
    min-height: 100vh;
}

body {
    padding-bottom: 70px;
}

/* =========================================
   BUSCADOR STICKY
========================================= */

.buscador-sticky {
    position: sticky;
    top: 10px;
    z-index: 10;
}

/* =========================================
   TABLA PRODUCTOS
========================================= */

.tabla-productos {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

    .tabla-productos thead {
        background: #1f2937;
        color: white;
    }

    .tabla-productos th {
        padding: 14px;
        font-size: 18px;
        font-weight: 600;
        text-align: center;
        letter-spacing: 0.5px;
        vertical-align: middle;
    }

    .tabla-productos td {
        padding: 12px;
        border-bottom: 1px solid #e5e7eb;
        font-size: 18px;
        text-align: center;
        vertical-align: middle;
        color: #333;
    }

/* =========================================
   FILAS
========================================= */

.card-producto {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.tabla-productos tbody tr:nth-child(even) {
    background: #f3f4f6;
}

.tabla-productos tbody tr:hover td {
    background-color: #e0d4f7;
    transition: 0.2s;
}

/* =========================================
   FILA SELECCIONADA
========================================= */

table.tabla-productos tbody tr.card-producto.seleccionado > td {
    background-color: #6f42c1 !important;
    color: #ffffff !important;
}

table.tabla-productos tbody tr.card-producto.seleccionado:hover > td {
    background-color: #6f42c1 !important;
}

.card-producto.seleccionado .flecha {
    color: #ffffff !important;
}


/* =========================================
   DESCRIPCION
========================================= */

.descripcion {
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

/* =========================================
   PRECIO
========================================= */

.precio {
    font-weight: bold;
    font-size: 22px;
    color: #16a34a;
    white-space: nowrap;
}

/* =========================================
   MARCA
========================================= */

.marca {
    font-weight: 500;
    color: #374151;
}

/* =========================================
   IMAGENES
========================================= */

.producto-img {
    width: 100%;
    max-width: 120px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    transition: 0.2s;
}

    .producto-img:hover {
        transform: scale(1.1);
    }

/* =========================================
   FOOTER
========================================= */

.footer-niko {
    background: #111;
    color: #fff;
    padding: 20px 10px;
    margin-top: 30px;
    font-size: 14px;
}

    .footer-niko a {
        color: #0d6efd;
        text-decoration: none;
    }

        .footer-niko a:hover {
            text-decoration: underline;
        }

    .footer-niko strong {
        font-size: 16px;
        letter-spacing: 1px;
    }

/* =========================================
   FOOTER PRECIO
========================================= */

.footer-precio {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #111;
    color: #fff;
    padding: 15px;
    font-size: 20px;
    font-weight: bold;
    text-align: right;
    z-index: 9999;
}

/* =========================================
   BOTON CARRITO
========================================= */

.btn-carrito-add {
    transition: transform 0.2s ease;
}

    .btn-carrito-add:hover {
        transform: scale(1.1);
    }

/* =========================================
   ANIMACION CARRITO
========================================= */

.anim-carrito {
    animation: pop 0.3s ease;
}

@keyframes pop {

    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.5);
    }

    100% {
        transform: scale(1);
    }
}

/* =========================================
   MODAL CANTIDAD
========================================= */

.modal-cantidad {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
    z-index: 9999;
}

    .modal-cantidad.activo {
        opacity: 1;
        pointer-events: all;
    }

.modal-box {
    background: white;
    color: #333;
    padding: 20px;
    border-radius: 12px;
    width: 260px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* =========================================
   INPUT CANTIDAD
========================================= */

.input-cantidad {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

    .input-cantidad input {
        width: 60px;
        text-align: center;
    }

    .input-cantidad button {
        width: 30px;
        height: 30px;
        border: none;
        background: #eee;
        border-radius: 6px;
        cursor: pointer;
    }

/* =========================================
   MODAL CARRITO
========================================= */

#modalCarrito .modal-body {
    max-height: 400px;
    overflow-y: auto;
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {
    .col-foto {
        display: none !important;
    }

    .badge.rounded-pill.bg-success {
        font-size: 11px !important;
        padding: 4px 10px !important;
    }
    .buscador-sticky {
        position: sticky;
        top: 70px;
        z-index: 998;
        background: #000;
        padding-top: 10px;
    }

    .tabla-productos thead {
        display: none !important;
    }

    .tabla-productos,
    .tabla-productos tbody {
        display: block;
    }

    .card-producto {
        display: block;
        background: #fff;
        border-radius: 14px;
        padding: 14px;
        margin-bottom: 15px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

        .card-producto td {
            display: block;
            border: none;
            padding: 4px 0;
            text-align: center !important;
        }

            /* LABELS */

            .card-producto td:before {
                content: attr(data-label);
                display: block;
                font-size: 11px;
                color: #999;
                margin-bottom: 2px;
            }

    /* PRODUCTO */

    .prod-nombre {
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 5px;
    }

    /* PRECIO */

    .precio {
        font-size: 24px;
        margin-bottom: 8px;
    }

    /* VEHICULO */

    .vehiculo {
        display: inline-block;
        background: #6c757d;
        color: #fff;
        font-size: 12px;
        padding: 3px 8px;
        border-radius: 6px;
        margin-bottom: 6px;
    }

    /* DESCRIPCION */

    .desc {
        font-size: 14px;
        color: #666;
        margin-bottom: 6px;
    }

    /* STOCK */

    .stock {
        font-weight: bold;
        color: #333;
    }
}
