/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* ===== LAYOUT GENERAL ===== */
body {
    background-color: #0f0f0f;
    color: #eaeaea;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* MAIN (unificado + footer abajo) */
main {
    flex: 1;
    max-width: 1300px;   /* 👈 más ancho para 4 columnas */
    margin: 0 auto;
    padding: 35px 20px;
}

/* ===== HEADER (BÁSICO por si alguna página usa <header> simple) ===== */
header {
    background-color: #0b0b0b;
    border-bottom: 1px solid #1f1f1f;
    padding: 20px 30px;
}

header h1 {
    color: #e10600;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* ===== NAV (BÁSICO por si alguna página usa <nav> simple) ===== */
nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

nav a {
    color: #eaeaea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

nav a:hover {
    color: #e10600;
}

/* ===== HEADER MEJORADO (PRO) ===== */
.header {
    background-color: #0b0b0b;
    border-bottom: 1px solid #1f1f1f;
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 18px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* LOGO */
.logo h1 {
    color: #e10600;
    font-size: 1.6rem;
    white-space: nowrap;
    margin: 0; /* importante */
}

/* MENÚ */
.menu {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    justify-content: center;
}

.menu a {
    color: #eaeaea;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.menu a:hover {
    color: #e10600;
}

/* USUARIO */
.user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.user span {
    color: #cccccc;
}

.user a {
    color: #eaeaea;
    text-decoration: none;
    font-weight: 500;
}

.user a:hover {
    color: #e10600;
}

.user .logout {
    color: #e10600;
}

.user .logout:hover {
    text-decoration: underline;
}

/* ===== SECTIONS ===== */
section {
    background-color: #1a1a1a;
    border: 1px solid #262626;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

/* ===== TITULOS ===== */
section h2 {
    color: #ffffff;
    margin-bottom: 12px;
    font-size: 1.4rem;
}

section p {
    color: #cccccc;
    line-height: 1.6;
}

/* ===== CATÁLOGO: 4 por fila en PC ===== */
.catalogo {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 👈 4 columnas */
    gap: 22px;
    align-items: stretch;
    margin-top: 10px;
}

/* Cards */
.card {
    background-color: #141414;
    border: 1px solid #262626;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: border .25s, transform .25s;
}

.card:hover {
    border-color: #e10600;
    transform: translateY(-3px);
}

.card h3 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.card p {
    color: #bbbbbb;
}

/* Botón como link */
.btn {
    display: inline-block;
    margin-top: 14px;
    padding: 10px 16px;
    background: #e10600;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}
.btn:hover { opacity: .9; }

/* Por si alguna página aún usa <button> */
.card button {
    margin-top: 15px;
    padding: 10px 18px;
    background-color: #e10600;
    border: none;
    border-radius: 5px;
    color: #ffffff;
    font-weight: bold;
    cursor: pointer;
}
.card button:hover { opacity: 0.9; }

/* ===== FAQ ===== */
.faq-item {
    padding: 15px 0;
    border-bottom: 1px solid #2a2a2a;
}

.faq-item h3 {
    color: #ffffff;
    margin-bottom: 5px;
}

.faq-item p {
    color: #bbbbbb;
}

/* ===== RECOMENDACIONES ===== */
.recomendaciones {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.reco-card {
    background-color: #141414;
    border: 1px solid #262626;
    border-radius: 10px;
    padding: 20px;
}

/* ===== FORMULARIOS ===== */
form {
    max-width: 420px;
    margin: 0 auto;
    background-color: #141414;
    border: 1px solid #262626;
    padding: 25px;
    border-radius: 10px;
}

form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #2a2a2a;
    background-color: #0f0f0f;
    color: #ffffff;
}

form button {
    width: 100%;
    padding: 12px;
    background-color: #e10600;
    border: none;
    border-radius: 5px;
    color: #ffffff;
    font-weight: bold;
    cursor: pointer;
}
form button:hover { opacity: .92; }

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 20px;
    background-color: #0b0b0b;
    border-top: 1px solid #1f1f1f;
    color: #888;
    font-size: 0.85rem;
}

/* =====================================================
   SHOUTBOX / CHAT (LO QUE TE FALTABA)
===================================================== */

.shoutbox{
    background: #141414;
    border: 1px solid #262626;
    border-radius: 12px;
    overflow: hidden;
}

.shoutbox-header{
    padding: 14px 16px;
    border-bottom: 1px solid #242424;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shoutbox-header h3{
    margin: 0;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.shoutbox-header a{
    color: #e10600;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
}

.shoutbox-header a:hover{
    opacity: .85;
}

/* CAJA DE MENSAJES (siempre visible) */
.shoutbox-body{
    display: block;
    height: 320px;
    min-height: 320px;
    overflow-y: auto;
    padding: 10px 14px;
    background: #101010;
}

.shout-msg{
    padding: 10px 6px;
    border-bottom: 1px solid #202020;
    display: flex;
    gap: 10px;
}

.shout-msg:last-child{
    border-bottom: none;
}

.shout-time{
    color: #9a9a9a;
    font-size: .85rem;
    min-width: 70px;
    white-space: nowrap;
}

.shout-user{
    color: #f0c674;
    font-weight: 700;
    margin-right: 6px;
    white-space: nowrap;
}

.shout-text{
    color: #eaeaea;
    line-height: 1.35;
    word-break: break-word;
}

.shoutbox-footer{
    border-top: 1px solid #242424;
    padding: 12px;
    background: #101010;
}

.shout-form{
    display: flex;
    gap: 10px;
}

.shout-form input{
    flex: 1;
    margin: 0;
}

/* Scrollbar elegante */
.shoutbox-body::-webkit-scrollbar{
    width: 10px;
}
.shoutbox-body::-webkit-scrollbar-thumb{
    background: #2a2a2a;
    border-radius: 8px;
}
.shoutbox-body::-webkit-scrollbar-track{
    background: #101010;
}

/* =====================================================
   RESPONSIVE
===================================================== */

/* Header pro: tablet/móvil */
@media (max-width: 900px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .menu {
        gap: 14px;
    }

    .user {
        align-self: flex-end;
    }
}

/* Catálogo: tablet 2 columnas */
@media (max-width: 1024px) {
    .catalogo {
        grid-template-columns: repeat(2, 1fr);
    }
    .recomendaciones {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Catálogo: celular 1 columna */
@media (max-width: 600px) {
    .catalogo {
        grid-template-columns: 1fr;
    }
    .recomendaciones {
        grid-template-columns: 1fr;
    }

    .shoutbox-body{
        height: 260px;
        min-height: 260px;
    }
}
