﻿/* ========================= */
/* 🔥 BASE GLOBAL */
/* ========================= */

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f4f6f8;
    color: #333;
}

h1, h2 {
    margin-top: 0;
}

/* ========================= */
/* 🔥 CONTENEDOR */
/* ========================= */

.container {
    max-width: 1100px;
    margin: auto;
    padding: 20px;
}

/* ========================= */
/* 🔥 CARDS GENERALES */
/* ========================= */

.card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    padding: 25px;
    margin-top: 20px;
}

/* ========================= */
/* 🔥 BOTONES */
/* ========================= */

.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #000;
    color: #fff;
}

    .btn-primary:hover {
        background: #333;
    }

.btn-secondary {
    background: #e0e0e0;
    color: #000;
}

/* ========================= */
/* 🔥 INPUTS */
/* ========================= */

input, select, textarea {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* ========================= */
/* 🔥 TABLAS */
/* ========================= */

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

    table th {
        background: #000;
        color: white;
        padding: 12px;
    }

    table td {
        padding: 12px;
        border-bottom: 1px solid #eee;
    }

/* ========================= */
/* 🔥 HOME PRO */
/* ========================= */

.app {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    background: #ffffff;
    min-height: 100vh;
}

/* HEADER */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
}

/* SEARCH */
.search {
    padding: 20px 25px;
}

    .search input {
        width: 100%;
        padding: 14px;
        border-radius: 25px;
        border: none;
        background: #f2f2f2;
    }

/* ========================= */
/* 🔥 RESULTADOS BUSQUEDA (GRID) */
/* ========================= */

.resultados {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 20px 25px;
}

/* ========================= */
/* 🔥 CARD PRODUCTO */
/* ========================= */

.card-producto {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    transition: 0.2s;
}

    .card-producto:hover {
        transform: translateY(-5px);
    }

    .card-producto img {
        width: 100%;
        height: 140px;
        object-fit: contain;
        margin-bottom: 10px;
    }

    .card-producto .nombre {
        font-size: 14px;
        font-weight: 600;
    }

    .card-producto .modelo {
        font-size: 12px;
        color: #777;
    }
/* ========================= */
/* 🔥 GRID CATEGORIAS (MEJORADO) */
/* ========================= */

.categorias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    padding: 30px;
}

.cat-item {
    text-align: center;
}

/* ICONO */
.icon {
    width: 80px;
    height: 80px;
    margin: auto;
    background: #f5f5f5;
    border-radius: 50%; /* 🔥 más moderno */
    display: flex;
    align-items: center;
    justify-content: center;
}

    .icon img {
        width: 36px;
        height: 36px;
        object-fit: contain;
    }

/* TEXTO */
.name {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.2;
    word-break: break-word; /* 🔥 evita cortes feos */
}

/* ICONO */
.icon {
    width: 90px;
    height: 90px;
    margin: auto;
    background: #f5f5f5;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .icon img {
        width: 40px;
    }

/* TEXTO */
.name {
    margin-top: 10px;
    font-size: 14px;
}

/* ========================= */
/* 🔥 MOBILE */
/* ========================= */

@media (max-width: 768px) {

    .categorias {
        grid-template-columns: repeat(3, 1fr);
        padding: 15px;
        gap: 15px;
    }

    .icon {
        width: 65px;
        height: 65px;
    }

        .icon img {
            width: 28px;
        }

    .name {
        font-size: 11px;
    }

    .search {
        padding: 10px;
    }

    .card-producto img {
        height: 110px;
    }
}

/* ========================= */
/* 🔥 DETALLE PRODUCTO */
/* ========================= */

.producto-detalle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

    .producto-detalle img {
        width: 100%;
        object-fit: contain;
    }

    .producto-detalle .info h2 {
        margin-top: 0;
    }

.btn-whatsapp {
    display: inline-block;
    margin-top: 20px;
    background: #25D366;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
}

.btn-share {
    display: inline-block;
    margin-top: 10px;
    background: #128C7E;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    margin-left: 10px;
}

/* MOBILE */
@media (max-width: 768px) {
    .producto-detalle {
        grid-template-columns: 1fr;
    }
}

/* ========================= */
/* 🔥 FICHA TECNICA PRO */
/* ========================= */

.ficha-card {
    background: #fafafa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #eee;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-line; /* 🔥 ESTA ES LA CLAVE */
}

    .ficha-card ul {
        padding-left: 18px;
    }

    .ficha-card li {
        margin-bottom: 6px;
    }

/* FECHA */
.fecha-ficha {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

/* ========================= */
/* 🔥 BOTONES ACCIONES */
/* ========================= */

.acciones {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-whatsapp {
    background: #25D366;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;

    text-decoration: none;
}

.btn-share {
    background: #128C7E;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
}