/* ===============================
   LAYOUT TIENDA PRINCIPAL
=============================== */

.tienda-principal {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    gap: 24px;
}

/* ===============================
   PANEL CATEGORÍAS
=============================== */

.panel-categorias {
    width: 230px;
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.panel-titulo {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #F57C00;
}

.panel-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.panel-lista li {
    margin-bottom: 8px;
}

.panel-lista a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.panel-lista a:hover {
    background: rgba(245, 124, 0, 0.12);
    color: #F57C00;
}

/* ===============================
   PANEL PRODUCTOS
=============================== */

.panel-productos {
    flex: 1;
    min-width: 0;
}

.productos-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 18px;
}

/* ===============================
   GRID PRODUCTOS
=============================== */

.productos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.producto-card {
    position: relative; /* 👈 ESTA ES LA CLAVE */
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.producto-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.producto-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 12px;
}

.producto-card h4 {
    font-size: 15px;
    margin-bottom: 6px;
}

.producto-card .precio {
    font-weight: 700;
    color: #F57C00;
}

/* =====================================
   DETALLE DE PRODUCTO
===================================== */

.producto-detalle {
    width: 100%;
}

.producto-detalle-wrapper {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 40px;

    background: #fff;
    padding: 32px;
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.12);

    max-width: 1100px;
    margin: 0 auto 40px;
}

/* Imagen */
.producto-imagen {
    width: 100%;
    height: 420px;
    border-radius: 16px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fafafa;
    border: 1px solid #eee;
}

.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.producto-imagen:hover img {
    transform: scale(1.05);
}

/* Info */
.producto-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.producto-info h1 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: #333;
}

.producto-precio {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    margin: 8px 0 14px;
    line-height: 1;
}

/* Variantes */
.producto-variantes {
    margin-bottom: 18px;
}

.producto-variantes h4 {
    font-size: 14px;
    margin-bottom: 6px;
    color: #666;
}

.variante-item {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(245, 124, 0, 0.12);
    color: #F57C00;
    font-weight: 600;
    font-size: 14px;
}

/* Stock */
.producto-stock {
    display: inline-block;
    margin-bottom: 18px;
    font-weight: 600;
    color: #2e7d32;
}

.producto-stock.sin-stock {
    color: #c62828;
}

/* Acciones */
.producto-acciones {
    margin-top: 8px;
}

.producto-acciones .btn-agregar {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 999px;

    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff;
    font-weight: bold;
    text-decoration: none;

    box-shadow: 0 4px 14px rgba(245, 124, 0, 0.45);
    transition: all 0.25s ease;
}

.producto-acciones .btn-agregar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(245, 124, 0, 0.55);
}

/* Descripción */
.producto-descripcion {
    max-width: 1100px;
    margin: 0 auto;

    background: #fff;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

.producto-descripcion h3 {
    margin-bottom: 12px;
    color: #F57C00;
}

.producto-descripcion p {
    white-space: pre-line;
    line-height: 1.7;
    color: #444;
}

/* ===============================
   RESPONSIVE
=============================== */

@media (max-width: 1200px) {
    .productos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .tienda-principal {
        flex-direction: column;
    }

    .panel-categorias {
        width: 100%;
    }

    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .producto-detalle-wrapper {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .producto-imagen {
        height: 320px;
    }
}

@media (max-width: 480px) {
    .productos-grid {
        grid-template-columns: 1fr;
    }
}