﻿* {
    font-family: 'Inter', sans-serif !important;
}

body {
    font-family: 'Inter', sans-serif;
}

.app-ui {
    max-width: 100%;
    margin: 30px auto;
    padding: 20px;
}

/* BUSCADOR */
.search-ui {
    margin-bottom: 30px;
}

    .search-ui input {
        width: 100%;
        padding: 16px 20px;
        border-radius: 30px;
        border: none;
        background: #efefef;
        font-size: 14px;
        outline: none;
    }

/* GRID */
.grid-categorias {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 30px;
}

/* CARD */
.cat-box {
    background: #f7f7f7;
    border-radius: 22px;
    padding: 22px 10px;
    text-align: center;
}

    .cat-box:hover {
        background: #eeeeee;
        transform: translateY(-4px);
    }

    .cat-box img {
        width: 44px;
        height: 44px;
        object-fit: contain;
        margin-bottom: 12px;
        opacity: 0.75;
    }

    .cat-box span {
        font-size: 12px;
        color: #666;
    }

/* CONTENEDOR */
.main-container {
    max-width: 1290px;
    margin: 20px auto;
    padding: 0 20px;
}

/* ================= TABLA ================= */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.tabla-usuarios {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: auto;
    min-width: 1200px;
}

    .tabla-usuarios th {
        text-align: left;
        padding: 10px;
        background: #f0f0f0;
        font-weight: 600;
    }

    .tabla-usuarios td {
        padding: 8px 10px;
        border-bottom: 1px solid #eee;
        white-space: nowrap;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tabla-usuarios tr:hover {
        background: #fafafa;
    }

    .tabla-usuarios td:last-child {
        width: 80px;
    }

/* ================= FORMULARIOS ================= */

.form-ui {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 500px;
}

    .form-ui label {
        font-size: 13px;
        font-weight: 500;
        color: #444;
    }

    .form-ui input,
    .form-ui select {
        width: 100%;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 14px;
    }

        .form-ui input:focus,
        .form-ui select:focus {
            border-color: #6c63ff;
            outline: none;
        }

/* CHECKBOXES */
.form-check-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
    align-items: flex-start; /* 🔥 ESTA ES LA CLAVE */
}
    /*.form-check-group label {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px;
        font-size: 14px;
        text-align: left !important;
    }*/
.check-item {
    display: inline-flex; /* 🔥 clave */
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

/* BOTONES */
.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn {
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
}

.btn-primary {
    background: #6c63ff;
    color: white;
}

.btn-secondary {
    background: #eee;
    color: #333;
}

/* HEADER INDEX */
.header-ui {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* 📱 MOBILE */
@media (max-width: 600px) {

    .form-ui {
        max-width: 100%;
    }

    .form-check-group {
        grid-template-columns: 1fr;
    }

    .form-buttons {
        flex-direction: column;
    }

    .header-ui {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ================= PRODUCTOS (TIPO AMAZON) ================= */

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.producto-item {
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    cursor: pointer;
    border: 1px solid #eee;
    transition: all 0.2s ease;
}

    .producto-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    }

.img-container {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .img-container img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.info {
    margin-top: 10px;
}

.nombre {
    font-size: 13px;
    font-weight: 600;
    height: 36px;
    overflow: hidden;
}

.modelo {
    font-size: 11px;
    color: #777;
}

/* ================= PRODUCTO DETALLE ================= */

.producto-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
    align-items: start;
}

/* IMAGEN */
.producto-img {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #eee;
}

.img-box {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .img-box img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

/* INFO */
.producto-info h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.modelo {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

/* BOTONES */
.acciones {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-whatsapp {
    background: #25D366;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
}

.btn-share {
    background: #eee;
    color: #333;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
}

/* FICHA */
.ficha {
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.6;
}

/* FECHA */
.fecha {
    margin-top: 15px;
    font-size: 12px;
    color: #999;
}

/* 📱 RESPONSIVE */
@media (max-width: 768px) {
    .producto-container {
        grid-template-columns: 1fr;
    }

    .img-box {
        height: 250px;
    }
}

/* ================= BUSCADOR ================= */

#resultadosBusqueda {
    margin-top: 10px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    overflow: hidden;
}

.item-busqueda {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

    .item-busqueda:hover {
        background: #f9f9f9;
    }

    .item-busqueda img {
        width: 50px;
        height: 50px;
        object-fit: contain;
        background: #fff;
        border-radius: 6px;
        border: 1px solid #eee;
    }

    .item-busqueda div {
        font-size: 13px;
    }

.btn-share {
    display: inline-flex; /* 🔥 clave */
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    width: auto; /* 🔥 evita que se estire */
}

/* 🔥 ESTE ES EL PROBLEMA REAL */
.icono-wsp {
    width: 18px !important;
    height: 18px !important;
    object-fit: contain;
}
