/* ===== VARIABLES DE MARCA ===== */
:root {
    --azul:       #0060B6;
    --azul-oscuro:#004E96;
    --azul-claro: #E8F1FB;
    --blanco:     #ffffff;
    --gris-borde: #d4e4f5;
    --gris-texto: #444;
    --sombra:     0 2px 16px rgba(0, 96, 182, 0.10);
}

/* ===== RESET BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--blanco);
    color: #111;
}

hr {
    border: none;
    border-top: 1px solid var(--gris-borde);
    margin: 0;
}

/* ===== HEADER ===== */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--azul);
    position: relative;
    box-shadow: 0 2px 12px rgba(0, 96, 182, 0.18);
    border-bottom: 2px solid rgba(255,255,255,0.08);
}

/* ===== BOTON HAMBURGUESA ===== */
.hamburger {
    font-size: 22px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 4px;
    margin-right: 15px;
    line-height: 1;
    color: var(--blanco);
    border-radius: 6px;
    transition: background 0.2s;
}

.hamburger:hover {
    background: rgba(255,255,255,0.15);
}

header section {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== TITULO DEL HEADER ===== */
header h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--blanco);
    letter-spacing: 2px;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

/* ===== LOGO EN HEADER ===== */
.header-logo {
    height: 36px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

header p {
    display: none;
}

/* ===== BOTON CARRITO FIJO EN HEADER ===== */
#carrito-btn {
    position: relative;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    padding: 6px 10px;
    line-height: 1;
    color: var(--blanco);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
}

#carrito-btn:hover {
    background: rgba(255,255,255,0.25);
}

#carrito-badge {
    background: #fff;
    color: var(--azul);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* ===== MENU LATERAL (SIDE MENU) ===== */
.side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100%;
    background: var(--blanco);
    box-shadow: 4px 0 24px rgba(0, 96, 182, 0.15);
    z-index: 1000;
    padding: 24px 20px;
    transition: left 0.3s ease;
    box-sizing: border-box;
    border-right: 2px solid var(--azul-claro);
}

.side-menu.open {
    left: 0;
}

.side-menu h2 {
    margin-top: 44px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--azul);
}

.side-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-menu ul li a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #222;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    border-left: 3px solid transparent;
}

.side-menu ul li a:hover {
    background: var(--azul-claro);
    color: var(--azul);
    border-left-color: var(--azul);
}

/* ===== BOTON CERRAR (X) ===== */
.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--azul-claro);
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--azul);
    line-height: 1;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.close-btn:hover {
    background: var(--azul);
    color: var(--blanco);
}

/* ===== OVERLAY OSCURO ===== */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 60, 120, 0.35);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay.visible {
    opacity: 1;
    pointer-events: all;
}

/* ===== MAIN Y SECCIONES ===== */
main {
    padding: 0 20px 40px;
}

main section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    padding: 28px 0 8px;
}

main section h2 {
    width: 100%;
    font-size: 13px;
    font-weight: 700;
    color: var(--azul);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 4px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--azul-claro);
    display: flex;
    align-items: center;
    gap: 8px;
}

main section h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--azul);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ===== TARJETAS DE PRODUCTO ===== */
main section article {
    width: calc((100% - (20px * 2)) / 3);
    box-sizing: border-box;
    background: var(--blanco);
    border: 1.5px solid var(--gris-borde);
    border-radius: 12px;
    padding: 12px 12px 14px;
    margin-bottom: 4px;
    box-shadow: var(--sombra);
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
    display: flex;
    flex-direction: column;
}

main section article:hover {
    box-shadow: 0 8px 28px rgba(0, 96, 182, 0.18);
    transform: translateY(-3px);
    border-color: #b3cceb;
}

main section article img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 10px;
    background: var(--azul-claro);
}

main section article h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #111;
    flex: 1;
}

main section article p {
    font-size: 12px;
    color: #666;
    margin: 0 0 6px;
}

/* ===== PRECIO ===== */
main section article .precio {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: var(--azul);
    margin: 0 0 10px;
    letter-spacing: 0.3px;
}

/* ===== BOTON "AGREGAR AL CARRITO" ===== */
main section article button {
    width: 100%;
    padding: 9px 0;
    background: var(--azul);
    color: var(--blanco);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.2s;
    margin-top: auto;
}

main section article button:hover {
    background: var(--azul-oscuro);
}

/* ===== FOOTER ===== */
footer {
    background: var(--azul);
    color: var(--blanco);
    text-align: center;
    padding: 24px 20px;
    font-size: 13px;
}

footer a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--blanco);
    text-decoration: underline;
}

footer p {
    margin: 4px 0;
}

/* ===== FOOTER SOCIAL LINKS ===== */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.9) !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.footer-social-link:hover {
    background: rgba(255,255,255,0.22) !important;
    color: var(--blanco) !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

/* ===== ICONO SVG EN BOTON CARRITO ===== */
#carrito-btn svg {
    display: block;
    flex-shrink: 0;
}

/* ===== RESPONSIVO: CELULARES ===== */
@media (max-width: 768px) {
    main section article {
        width: calc((100% - 20px) / 2);
    }

    header h1 {
        font-size: 16px;
    }
}
