
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #172033;
}

header {
    background: #111827;
    color: white;
    padding: 22px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h2 {
    margin: 0;
    font-size: 23px;
}

header small {
    color: #a5b4fc;
}

.contenedor {
    max-width: 1450px;
    margin: auto;
    padding: 28px 20px;
}

.titulo {
    margin-bottom: 25px;
}

.titulo h1 {
    margin: 0 0 8px;
    font-size: 27px;
}

.titulo p {
    margin: 0;
    color: #64748b;
}

/* Resumen */
.resumen {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 25px;
}

.resumen-card {
    background: white;
    padding: 22px;
    border-radius: 13px;
    box-shadow: 0 3px 12px #00000008;
}

.resumen-card small {
    color: #64748b;
}

.resumen-card h2 {
    margin: 12px 0 0;
    font-size: 25px;
}

.verde { color: #059669; }
.azul { color: #2563eb; }
.naranja { color: #d97706; }

/* Buscador */
.filtros {
    background: white;
    padding: 17px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filtros input,
.filtros select {
    padding: 13px;
    border: 1px solid #dce1e9;
    border-radius: 8px;
    font-size: 14px;
}

.filtros input {
    flex: 1;
    min-width: 200px;
}

.filtros select {
    min-width: 180px;
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 13px 20px;
    background: #2563eb;
    color: white;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.btn-limpiar {
    background: #e5e7eb;
    color: #374151;
}

/* Productos */
.galeria {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 20px;
}

.producto {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e9edf4;
    transition: .2s;
}

.producto:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 23px #00000012;
}

.producto-img {
    width: 100%;
    height: 240px;
    background: #fff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.producto-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.sin-foto {
    color: #94a3b8;
    text-align: center;
    font-size: 14px;
}

.producto-id {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #111827;
    color: white;
    padding: 6px 9px;
    border-radius: 6px;
    font-size: 11px;
}

.info {
    padding: 17px;
}

.categoria {
    display: inline-block;
    background: #eef2ff;
    color: #4338ca;
    padding: 6px 9px;
    border-radius: 5px;
    font-size: 11px;
}

.nombre {
    font-size: 17px;
    margin: 13px 0 7px;
    line-height: 1.4;
}

.subcategoria {
    font-size: 12px;
    color: #64748b;
}

.descripcion {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    min-height: 38px;
    margin: 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.precio {
    font-size: 24px;
    font-weight: bold;
    color: #111827;
    margin-top: 15px;
}

.precio-gtq {
    color: #64748b;
    font-size: 13px;
    margin-top: 5px;
}

.separador {
    height: 1px;
    background: #edf0f5;
    margin: 15px 0;
}

.detalle {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
}

.detalle span:first-child {
    color: #64748b;
}

.ganancia {
    color: #059669;
    font-weight: bold;
}

.fecha {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 13px;
}

.vacio {
    padding: 50px;
    text-align: center;
    color: #64748b;
}

.paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}

.paginacion a {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #2563eb;
}

.paginacion span {
    color: #64748b;
    font-size: 13px;
}

/* Responsive */
@media(max-width: 1100px) {
    .galeria {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }
}

@media(max-width: 800px) {
    .resumen {
        grid-template-columns: repeat(2, 1fr);
    }

    .galeria {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media(max-width: 480px) {
    .contenedor {
        padding: 15px;
    }

    .galeria {
        gap: 10px;
    }

    .producto-img {
        height: 175px;
    }

    .info {
        padding: 12px;
    }

    .nombre {
        font-size: 14px;
    }

    .precio {
        font-size: 20px;
    }

    .resumen-card {
        padding: 15px;
    }

    .resumen-card h2 {
        font-size: 19px;
    }
}



.stock-producto {
    margin: 14px 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
}

.disponible {
    color: #15803d;
}

.agotado {
    color: #dc2626;
}
