.pagina-productos {
    min-height: 100vh;
    padding: 140px 90px 80px;
    background: #000;
}

/* Acciones de la tarjeta de producto: comprar o ver el detalle. */
.acciones-producto {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 18px 18px;
}

.enlace-producto {
    color: #fff;
    text-decoration: none;
}

.enlace-producto:hover,
.enlace-producto:focus-visible {
    color: #ffd700;
    text-decoration: underline;
}

.boton-ver-detalle {
    background: #2a2a2a;
    color: #ffd700;
    border: 1px solid #ffd700;
}

.titulo-productos {
    margin: 0 0 60px;
    color: #ffd700;
    font-size: 52px;
    letter-spacing: .02em;
    text-align: center;
}

.lado-derecho {
    display: flex;
    align-items: center;
    gap: 16px;
}

.boton-volver {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 6px;
    background: #ffd700;
    color: #000;
    font-size: .9rem;
    font-weight: 800;
    text-decoration: none;
}

.boton-volver:hover {
    background: #e6c200;
}

.boton-carrito {
    display: inline-block;
    padding: 12px 16px;
    border: 1px solid #ffd700;
    border-radius: 6px;
    color: #ffd700;
    font-weight: bold;
    text-decoration: none;
}

.boton-carrito:hover {
    background: #ffd700;
    color: #000;
}

.grilla-categorias,
.grilla-productos {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.caja-categoria,
.caja-producto {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, .35);
    border-radius: 10px;
    background: #0d0d0d;
    color: #fff;
}

.caja-categoria {
    display: grid;
    min-height: 500px;
    text-decoration: none;
}

.caja-categoria::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(0, 0, 0, .84), rgba(0, 0, 0, .05) 70%);
}

.caja-categoria img {
    position: absolute;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.caja-categoria:hover,
.caja-categoria:focus-visible {
    border-color: #ffd700;
}

.caja-categoria:focus-visible {
    outline: 2px solid #ffd700;
    outline-offset: 4px;
}

.titulo-categoria {
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 0;
    width: 100%;
    min-height: 82px;
    display: flex;
    align-items: center;
    padding: 24px;
    font-size: 26px;
    font-weight: 800;
}

.caja-producto {
    min-height: 300px;
    display: grid;
    grid-template-rows: 200px auto auto;
    text-decoration: none;
}

.caja-producto:hover {
    border-color: #ffd700;
}

.foto-producto {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #171717;
}

.info-producto {
    display: grid;
    gap: 6px;
    padding: 18px;
}

.nombre-producto {
    margin: 0;
    color: white;
    -webkit-text-stroke: 1px black;
    font-size: 2rem;
    line-height: 1.35;
}

.precio-producto {
    margin: 0;
    color: #ffd700;
    font-size: .92rem;
    font-weight: 800;
}

.sin-productos {
    grid-column: 1 / -1;
    margin: 0;
    color: #ffd700;
    font-size: 1.05rem;
    text-align: center;
}

.pagina-producto {
    min-height: 100vh;
    padding: 140px 70px 80px;
    background: #000;
}

.detalle-producto {
    width: 100%;
    max-width: 1100px;
    min-height: 520px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, .35);
    border-radius: 10px;
    background: #0d0d0d;
}

.foto-grande {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
}

.info-grande {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 55px;
}

.tipo-producto {
    margin: 0 0 12px;
    color: #ffd700;
    font-size: 14px;
    font-weight: bold;
}

.nombre-grande {
    margin: 0;
    color: #fff;
    font-size: 48px;
    line-height: 1.1;
}

.descripcion-producto {
    margin: 24px 0 0;
    color: #ddd;
    font-size: 20px;
    line-height: 1.5;
}

.texto-producto {
    margin: 16px 0 30px;
    color: #aaa;
}

.boton-producto {
    display: inline-block;
    padding: 13px 20px;
    border-radius: 6px;
    background: #ffd700;
    color: #000;
    font-weight: bold;
    text-decoration: none;
}

.boton-producto:hover {
    background: #e6c200;
}

.botones-compra {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 20px;
}

.boton-agregar,
.boton-comprar {
    padding: 13px 20px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.boton-agregar {
    background: #2a2a2a;
    color: #fff;
    border: 1px solid #ffd700;
}

.boton-comprar {
    background: #ffd700;
    color: #000;
}

.boton-agregar:hover {
    background: #3b3b3b;
}

.boton-comprar:hover {
    background: #e6c200;
}

.pagina-carrito {
    min-height: 100vh;
    padding: 140px 70px 80px;
    background: #000;
}

.lista-carrito {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

/* Estructura que arma `carrito.js`: foto, nombre, cantidad, precio y botón. */
.fila-carrito {
    display: grid;
    grid-template-columns: 150px 1fr auto auto auto;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, .35);
    border-radius: 10px;
    background: #0d0d0d;
}

.fila-carrito img {
    width: 150px;
    height: 150px;
    object-fit: cover;
}

.fila-carrito div {
    padding: 20px;
}

.fila-carrito .nombre-carrito {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
}

.fila-carrito .cantidad-carrito {
    color: #d1d1d1;
}

.fila-carrito .precio-carrito {
    color: #ffd700;
    font-weight: 800;
    white-space: nowrap;
}

.total-carrito {
    margin: 0;
    color: #ffd700;
    font-size: 1.15rem;
    font-weight: 800;
    text-align: right;
}

.fila-carrito h2 {
    margin: 4px 0 12px;
    color: #fff;
    font-size: 22px;
}

.fila-carrito p {
    margin: 0 0 8px;
    color: #ddd;
}

.categoria-carrito {
    color: #ffd700 !important;
    text-transform: capitalize;
}

.boton-quitar {
    margin-top: 0;
    padding: 8px 14px;
    border: 1px solid #ffd700;
    border-radius: 5px;
    background: transparent;
    color: #ffd700;
    cursor: pointer;
    font-weight: bold;
}

.boton-quitar:hover {
    background: #ffd700;
    color: #000;
}

.carrito-vacio {
    margin: 0;
    color: #ddd;
    text-align: center;
}

@media (max-width: 900px) {
    .grilla-categorias,
    .grilla-productos {
        grid-template-columns: repeat(2, 1fr);
    }

    .detalle-producto {
        grid-template-columns: 1fr;
    }

    .foto-grande {
        min-height: 360px;
        height: 360px;
    }
}

@media (max-width: 640px) {
    .pagina-productos {
        padding: 120px 20px 60px;
    }

    .pagina-producto {
        padding: 120px 20px 60px;
    }

    .pagina-carrito {
        padding: 120px 20px 60px;
    }

    .titulo-productos {
        margin-bottom: 36px;
        font-size: 40px;
    }

    .grilla-categorias,
    .grilla-productos {
        grid-template-columns: 1fr;
    }

    .caja-categoria {
        min-height: 220px;
    }

    .lado-derecho {
        margin-left: auto;
    }

    .lado-derecho .boton-volver {
        display: none;
    }

    .foto-grande {
        min-height: 260px;
        height: 260px;
    }

    .info-grande {
        padding: 32px 24px;
    }

    .nombre-grande {
        font-size: 36px;
    }

    .descripcion-producto {
        font-size: 18px;
    }

    .fila-carrito {
        grid-template-columns: 100px 1fr;
    }

    .fila-carrito img {
        width: 100px;
        height: 100%;
        min-height: 150px;
    }
}
