/* ===== RESET Y BASE ===== */
* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: clamp(16px, 3vw, 28px);
    background: #000000;
    color: #8fe08a;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    text-align: center;
    overflow-x: hidden;
    padding: clamp(16px, 4vw, 40px) clamp(8px, 2vw, 40px);
}

/* ===== SLIDER ===== */
.slider {
    position: relative;
    width: min(96%, 1100px);
    height: clamp(240px, 45vw, 420px);
    margin: clamp(6px, 1vw, 10px) auto clamp(20px, 3vw, 40px);
    border-radius: 18px;
    overflow: hidden;
    border: 2px solid rgba(111, 168, 106, 0.9);
    box-shadow: 0 18px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(111, 168, 106, 0.18);
}

.slider::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: 0 0 40px rgba(111, 168, 106, 0.12) inset;
}

.slides {
    position: absolute;
    inset: 0;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 1s ease, transform 1s ease;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
}

.slider-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(20px, 4vw, 40px) clamp(20px, 5vw, 56px);
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.28) 40%, rgba(0, 0, 0, 0.18) 100%);
}

.slider-content {
    max-width: 640px;
    margin-top: clamp(4px, 1vw, 12px);
    text-align: left;
    width: min(100%, 640px);
}

.slider-content h1 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(1.4rem, 4.2vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    word-wrap: break-word;
}

.slider-content p {
    margin: 8px 0 0;
    color: #bfe9b2;
    font-size: clamp(0.82rem, 1.6vw, 1.05rem);
    line-height: 1.7;
    max-width: 520px;
    opacity: 0.95;
}

.slider-controls {
    position: absolute;
    inset: auto 16px 16px;
    display: flex;
    justify-content: space-between;
    width: calc(100% - 32px);
    align-items: center;
    z-index: 5;
}

.control {
    width: clamp(40px, 6vw, 56px);
    height: clamp(40px, 6vw, 56px);
    border: 1px solid rgba(143, 224, 138, 0.6);
    background: rgba(0, 0, 0, 0.35);
    color: #b8e6a8;
    border-radius: 50%;
    font-size: clamp(1rem, 2vw, 1.4rem);
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.2s ease, transform 0.12s ease, box-shadow 0.12s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.control:hover {
    background: rgba(111, 168, 106, 0.12);
    transform: scale(1.05);
    box-shadow: 0 4px 18px rgba(111, 168, 106, 0.08);
}

.dots {
    position: absolute;
    left: 50%;
    bottom: clamp(10px, 1.5vw, 22px);
    transform: translateX(-50%);
    display: flex;
    gap: clamp(6px, 1vw, 12px);
    align-items: center;
    z-index: 5;
}

.dot {
    width: clamp(9px, 1.2vw, 12px);
    height: clamp(9px, 1.2vw, 12px);
    border-radius: 50%;
    border: 1px solid rgba(143, 224, 138, 0.6);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
    padding: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.dot.active,
.dot:hover {
    background: rgba(143, 224, 138, 0.96);
    transform: scale(1.35);
    box-shadow: 0 6px 18px rgba(111, 168, 106, 0.12);
}

/* ===== SECCIONES DE CATÁLOGO ===== */
.steam-catalog-section {
    width: min(95%, 1200px);
    margin: 0 auto clamp(30px, 4vw, 60px);
    padding: 0 6px;
}

.catalog-header {
    margin-bottom: clamp(14px, 2vw, 24px);
    text-align: center;
}

.catalog-header h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: clamp(1.2rem, 3vw, 2.2rem);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.catalog-header p {
    margin: 0;
    color: #bfe9b2;
    opacity: 0.9;
    font-size: clamp(0.8rem, 1.4vw, 1rem);
}

/* ===== GRID DE CATÁLOGO (scroll horizontal con snap) ===== */
.catalog-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 6px 2px 12px;
    scroll-behavior: smooth;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    width: 100%;
}

.catalog-grid::-webkit-scrollbar {
    height: 8px;
}

.catalog-grid::-webkit-scrollbar-thumb {
    background: rgba(124, 255, 140, 0.35);
    border-radius: 999px;
}

.steam-card {
    position: relative;
    flex: 0 0 clamp(130px, 18vw, 180px);
    border-radius: 12px;
    overflow: visible;
    border: 1px solid rgba(143, 224, 138, 0.28);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    background: #111;
    scroll-snap-align: start;
    margin-bottom: 4px;
}

.steam-card-image-wrap {
    position: relative;
    border-bottom: 1px solid rgba(143, 224, 138, 0.12);
    border-radius: 12px 12px 0 0;
    overflow: visible;
    height: clamp(130px, 18vw, 180px);
}

.steam-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.steam-card:hover img,
.steam-card-image-wrap:hover img {
    transform: scale(1.06);
}

/* ===== OVERLAY DE TARJETA ===== */
.steam-overlay {
    position: absolute;
    left: 4px;
    top: 4px;
    width: min(420px, 52vw);
    max-width: calc(100vw - 24px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 18px 16px;
    background: rgba(16, 24, 33, 0.96);
    border: 1px solid rgba(96, 230, 133, 0.22);
    border-radius: 14px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: auto;
    transform: translateY(4px);
    transform-origin: top left;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    z-index: 999;
}

/* Detalles del overlay */
.steam-overlay::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 14px;
    width: 70px;
    height: 10px;
    border-radius: 8px 8px 0 0;
    background: rgba(46, 62, 80, 0.96);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.steam-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 14px;
    width: calc(100% - 28px);
    height: 44px;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(180deg, rgba(32, 42, 54, 0.95), rgba(12, 18, 20, 0.95));
    z-index: -1;
}

.steam-card-image-wrap:hover .steam-overlay,
.steam-card .steam-overlay:hover,
.steam-card:focus-within .steam-overlay {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* En dispositivos táctiles mostrar overlay siempre */
@media (hover: none) {
    .steam-overlay {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        width: calc(100% - 8px);
        max-width: none;
        position: static;
        margin: 6px;
        border-radius: 12px;
        box-shadow: none;
    }

    .steam-card-image-wrap {
        height: auto;
        display: flex;
        flex-direction: column;
    }

    .steam-card-image-wrap > img {
        width: 100%;
        height: clamp(130px, 30vw, 180px);
        object-fit: cover;
        border-radius: 12px 12px 0 0;
    }

    .steam-overlay::before,
    .steam-overlay::after {
        display: none;
    }

    .steam-card-meta {
        display: none;
    }
}

.steam-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 0 4px;
}

.steam-overlay-header h3 {
    margin: 0;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    line-height: 1.2;
    color: #f5fff3;
}

.steam-overlay-header span {
    font-size: 0.72rem;
    color: #bfe8b8;
    opacity: 0.85;
    white-space: nowrap;
}

.steam-overlay-desc {
    margin: 0;
    color: #d3f9d0;
    font-size: clamp(0.75rem, 1.2vw, 0.83rem);
    line-height: 1.55;
    text-align: left;
    padding: 0 4px;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.steam-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.steam-tag {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(78, 131, 79, 0.2);
    color: #c1ffc1;
    font-size: clamp(0.65rem, 1vw, 0.72rem);
    letter-spacing: 0.2px;
}

.steam-overlay-footer {
    display: flex;
    justify-content: flex-start;
}

.streaming-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.streaming-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.streaming-options label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: #bfe9b2;
    font-size: 0.7rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.streaming-select {
    padding: 5px 8px;
    border-radius: 8px;
    border: 1px solid rgba(143, 224, 138, 0.45);
    background: rgba(6, 12, 8, 0.9);
    color: #d3f9d0;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    cursor: pointer;
}

.streaming-select:focus {
    outline: none;
    border-color: #8fffa6;
    box-shadow: 0 0 8px rgba(143, 224, 138, 0.3);
}

.streaming-total {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d3f9d0;
    font-size: 0.78rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.streaming-total-price {
    color: #8fffa6;
    font-weight: 700;
    font-size: 1rem;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
}

.steam-card-meta {
    padding: 12px 14px 16px;
    text-align: left;
    color: #d3f9d0;
}

.steam-card-meta h3 {
    margin: 0;
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.steam-overlay h3 {
    margin: 0;
    color: #b7ffc4;
    font-size: clamp(0.85rem, 1.4vw, 0.98rem);
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.5px;
}

.steam-overlay p {
    margin: 0;
    color: #b8ffbf;
    font-size: clamp(0.75rem, 1.2vw, 0.82rem);
    line-height: 1.4;
    font-family: 'Courier New', Courier, monospace;
    text-shadow: 0 0 4px rgba(124, 255, 140, 0.1);
}

.steam-overlay a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    color: #8fffa6;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.75rem, 1.2vw, 0.82rem);
    font-family: 'Courier New', Courier, monospace;
    border: 1px solid rgba(0, 255, 102, 0.35);
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.32);
    white-space: nowrap;
}

.steam-overlay a:hover {
    text-decoration: none;
    background: rgba(0, 255, 102, 0.12);
    box-shadow: 0 0 8px rgba(0, 255, 102, 0.2);
}

.steam-card.left-overlay .steam-overlay {
    left: auto;
    right: 50%;
    transform: translateX(50%) translateY(0);
    transform-origin: top center;
}

/* ===== DESCRIPCIÓN EXTRA (caja con scroll) ===== */
.steam-description-box {
    max-height: 140px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 14px;
    border: 1px solid rgba(96, 230, 133, 0.15);
    border-radius: 12px;
    background: rgba(8, 14, 16, 0.88);
    text-align: left;
}

.steam-description-box::-webkit-scrollbar {
    width: 8px;
}

.steam-description-box::-webkit-scrollbar-thumb {
    background: rgba(124, 255, 140, 0.35);
    border-radius: 999px;
}

.steam-description-box p {
    margin: 0;
    color: #c7ffc7;
    font-size: 0.82rem;
    line-height: 1.55;
    text-align: left;
}

/* ===== BOTONES SUPERIORES (iniciar sesión + carrito, esquina superior derecha) ===== */
.top-buttons {
    position: fixed;
    top: 14px;
    right: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: #2f9d44;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    font-size: clamp(0.8rem, 1.4vw, 0.95rem);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
}

.cart-btn:hover {
    background: #37b350;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(47, 157, 68, 0.35);
}

.cart-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

#cartCount {
    min-width: 24px;
    text-align: center;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.85rem;
}

@media (max-width: 480px) {
    .top-buttons {
        top: 10px;
        right: 10px;
    }

    .cart-btn {
        padding: 7px 12px;
    }

    .cart-icon {
        width: 18px;
        height: 18px;
    }
}

/* ===== PANEL LATERAL DEL CARRITO ===== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1500;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(420px, 100%);
    background: #101820;
    border-left: 1px solid rgba(143, 224, 138, 0.25);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.55);
}

.cart-overlay.open .cart-panel {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(143, 224, 138, 0.15);
}

.cart-header h2 {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #ffffff;
}

.cart-header h2 span {
    font-size: 0.85rem;
    color: #bfe9b2;
    font-weight: 400;
}

.cart-close {
    background: none;
    border: none;
    color: #bfe9b2;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.cart-close:hover {
    background: rgba(143, 224, 138, 0.12);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-items::-webkit-scrollbar {
    width: 8px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: rgba(124, 255, 140, 0.35);
    border-radius: 999px;
}

.cart-empty {
    text-align: center;
    color: #bfe9b2;
    opacity: 0.7;
    margin-top: 48px;
}

.cart-item {
    display: flex;
    gap: 12px;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(143, 224, 138, 0.18);
    border-radius: 12px;
    padding: 10px;
}

.cart-item-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.cart-item-info h4 {
    margin: 0 0 6px;
    font-size: 0.88rem;
    line-height: 1.3;
    color: #f5fff3;
    word-break: break-word;
}

.cart-item-price {
    margin: 0 0 8px;
    color: #8fffa6;
    font-weight: 600;
    font-size: 0.92rem;
}

.cart-item-variant {
    margin: 0 0 6px;
    color: #a8e8c0;
    font-size: 0.78rem;
    font-style: italic;
}

.cart-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(143, 224, 138, 0.35);
    border-radius: 999px;
    overflow: hidden;
}

.cart-qty button {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: #bfe9b2;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}

.cart-qty button:hover {
    background: rgba(143, 224, 138, 0.15);
}

.cart-qty span {
    min-width: 26px;
    text-align: center;
    color: #ffffff;
    font-weight: 600;
}

.cart-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.75;
    padding: 6px;
    border-radius: 6px;
    transition: opacity 0.15s ease, background 0.15s ease;
    align-self: flex-start;
}

.cart-remove:hover {
    opacity: 1;
    background: rgba(255, 80, 80, 0.12);
}

.cart-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid rgba(143, 224, 138, 0.15);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.cart-total-row > span:first-child {
    color: #bfe9b2;
    font-size: 1rem;
}

.cart-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

#cartTotalUsd {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
}

#cartTotalBs {
    color: #8fffa6;
    font-size: 0.85rem;
}

.btn-checkout {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(90deg, #e91e63, #ff9800);
    color: #ffffff;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(233, 30, 99, 0.35);
}

@media (max-width: 480px) {
    .cart-panel {
        width: 100%;
        border-left: none;
    }

    .cart-item-img {
        width: 60px;
        height: 60px;
    }
}

/* ===== PÁGINA PRINCIPAL (índice) ===== */
.texto-animado {
    margin: 18px 0 6px;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    color: #bff6c9;
    animation: glow 2.6s ease-in-out infinite;
}

@keyframes glow {
    0% { text-shadow: 0 0 6px rgba(143, 224, 138, 0.3); }
    50% { text-shadow: 0 0 18px rgba(143, 224, 138, 0.9); }
    100% { text-shadow: 0 0 6px rgba(143, 224, 138, 0.3); }
}

.boton {
    display: inline-block;
    margin: 0;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    background: #6fa86a;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(111, 168, 106, 0.12);
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.boton:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(111, 168, 106, 0.18);
}

#titulillo { background: #2f9d44; }
#raquitico { background: #f39c12; }

.imagen-oculta { display: none; }

#manola {
    max-width: 420px;
    width: min(86%, 420px);
    margin: 12px auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.imagen-mostrada { display: block; }

.botones {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2vw, 14px);
    justify-content: center;
    align-items: center;
}

.botones img {
    max-width: 90%;
}

/* ===== BREAKPOINTS ===== */
@media (max-width: 900px) {
    .steam-card {
        flex-basis: 150px;
    }

    .steam-card-image-wrap {
        height: 150px;
    }
}

@media (max-width: 768px) {
    .catalog-grid {
        gap: 10px;
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px 6px;
        gap: 14px;
    }

    .slider {
        height: 240px;
    }

    .slider-overlay {
        padding: 16px;
    }

    .slider-content h1 {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }

    .slider-content p {
        font-size: 0.78rem;
        line-height: 1.5;
        max-height: 4.5em;
        overflow: hidden;
    }

    .steam-card {
        flex-basis: 130px;
    }

    .steam-card-image-wrap {
        height: 130px;
    }

    .catalog-header h2 {
        font-size: 1.2rem;
    }

    .catalog-header p {
        font-size: 0.75rem;
    }
}

/* ===== MODAL DE AUTENTICACIÓN (inicio de sesión estilo Steam) ===== */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1600;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-overlay.open {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    position: relative;
    width: min(420px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: #101820;
    border: 1px solid rgba(143, 224, 138, 0.35);
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(26, 159, 255, 0.12);
    padding: 22px 24px;
    text-align: center;
    transform: translateY(14px) scale(0.97);
    transition: transform 0.25s ease;
}

.auth-overlay.open .auth-modal {
    transform: translateY(0) scale(1);
}

.auth-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: #bfe9b2;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.auth-close:hover {
    background: rgba(143, 224, 138, 0.12);
}

.auth-tabs {
    display: flex;
    gap: 6px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    margin-bottom: 18px;
}

.auth-tab {
    flex: 1;
    padding: 9px;
    background: transparent;
    border: none;
    color: #bfe9b2;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}

.auth-tab:hover {
    background: rgba(143, 224, 138, 0.08);
}

.auth-tab.active {
    background: rgba(143, 224, 138, 0.2);
    color: #ffffff;
}

.auth-panel {
    text-align: center;
}

.auth-panel h3 {
    margin: 0 0 4px;
    color: #ffffff;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

.auth-panel form {
    text-align: left;
}

.auth-panel label {
    display: block;
    margin: 14px 0 6px;
    color: #8fe08a;
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 1px;
}

.auth-panel input[type="text"],
.auth-panel input[type="password"],
.auth-panel input[type="email"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(143, 224, 138, 0.25);
    color: #ffffff;
    border-radius: 6px;
    padding: 11px 12px;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
}

.auth-panel input:focus {
    border-color: rgba(26, 159, 255, 0.7);
    box-shadow: 0 0 0 2px rgba(26, 159, 255, 0.2);
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #bfe9b2;
    font-size: 0.8rem;
    margin: 14px 0 4px;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    width: fit-content;
}

.auth-check input[type="checkbox"] {
    width: auto;
    accent-color: #1a9fff;
    cursor: pointer;
    margin: 0;
}

.auth-msg {
    margin: 10px 0 0;
    text-align: center;
    color: #ff8a8a;
    font-size: 0.8rem;
    line-height: 1.4;
    min-height: 14px;
}

.auth-info {
    color: #bfe9b2;
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: center;
    margin: 6px 0 0;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: linear-gradient(90deg, #1a9fff, #66c0f4);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(26, 159, 255, 0.35);
    filter: brightness(1.05);
}

.auth-link-btn {
    display: inline-block;
    background: none;
    border: none;
    color: #7ecbff;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 12px;
    text-decoration: underline;
}

.auth-link-btn:hover {
    color: #a8d8ff;
}

/* Botón "Iniciar sesión" destacado junto al carrito (estilo Steam) */
.cart-btn.account-btn {
    background: rgba(26, 159, 255, 0.12);
    border: 1px solid rgba(26, 159, 255, 0.5);
    color: #eaf6ff;
}

.cart-btn.account-btn:hover {
    background: rgba(26, 159, 255, 0.28);
    box-shadow: 0 10px 26px rgba(26, 159, 255, 0.32);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .auth-modal {
        padding: 18px 16px;
    }
}

/* ===== LEGAL PAGES ===== */
.legal-page {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

/* ===== MAIN FOOTER (legal links on store pages) ===== */
.main-footer {
    width: 100%;
    max-width: min(95%, 1100px);
    margin: clamp(30px, 4vw, 50px) auto 0;
    padding-top: clamp(16px, 3vw, 24px);
    border-top: 1px solid rgba(143, 224, 138, 0.15);
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(12px, 2vw, 20px);
    justify-content: center;
    margin-bottom: 10px;
}

.footer-links a {
    color: #bfe9b2;
    text-decoration: underline;
    font-size: clamp(0.8rem, 1.4vw, 0.92rem);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #d3f9d0;
}

.footer-copy {
    color: #8fe08a;
    font-size: clamp(0.75rem, 1.3vw, 0.85rem);
    opacity: 0.8;
}

.legal-header {
    text-align: center;
    margin-bottom: clamp(24px, 4vw, 42px);
}

.legal-header h1 {
    color: #ffffff;
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.legal-header .legal-meta {
    color: #8fe08a;
    font-size: clamp(0.8rem, 1.4vw, 0.92rem);
    opacity: 0.85;
}

.legal-content {
    text-align: left;
    color: #bfe9b2;
    line-height: 1.8;
    font-size: clamp(0.85rem, 1.6vw, 0.98rem);
}

.legal-content h2 {
    color: #d3f9d0;
    font-size: clamp(1rem, 2.2vw, 1.3rem);
    margin: clamp(20px, 3vw, 34px) 0 12px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(143, 224, 138, 0.25);
    padding-bottom: 6px;
}

.legal-content h3 {
    color: #b7ffc4;
    font-size: clamp(0.9rem, 1.8vw, 1.05rem);
    margin: clamp(14px, 2.4vw, 22px) 0 8px;
}

.legal-content p {
    margin: 0 0 14px;
}

.legal-content ul,
.legal-content ol {
    margin: 0 0 14px 0;
    padding-left: 20px;
}

.legal-content li {
    margin: 4px 0;
}

.legal-content a {
    color: #7ecbff;
    text-decoration: underline;
}

.legal-content a:hover {
    color: #a8d8ff;
}

.legal-content strong {
    color: #d3f9d0;
}

.legal-content .highlight {
    display: inline-block;
    background: rgba(111, 168, 106, 0.08);
    border: 1px solid rgba(111, 168, 106, 0.25);
    border-radius: 6px;
    padding: 2px 6px;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
}

.legal-footer {
    text-align: center;
    margin-top: clamp(30px, 5vw, 50px);
    padding-top: clamp(16px, 3vw, 24px);
    border-top: 1px solid rgba(143, 224, 138, 0.15);
    color: #8fe08a;
    font-size: clamp(0.8rem, 1.4vw, 0.9rem);
}

.legal-footer a {
    color: #bfe9b2;
    text-decoration: underline;
}

.legal-footer a:hover {
    color: #d3f9d0;
}

/* ===== TOAST NOTES ===== */
.toast {
    position: fixed;
    bottom: clamp(16px, 3vw, 24px);
    right: clamp(16px, 3vw, 24px);
    min-width: 220px;
    max-width: min(90%, 380px);
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(143, 224, 138, 0.5);
    border-radius: 8px;
    color: #d3f9d0;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    z-index: 3000;
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(111, 168, 106, 0.2);
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.toast-success {
    border-color: rgba(143, 224, 138, 0.7);
    color: #b7ffc4;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(111, 168, 106, 0.35);
}

.toast.toast-warning {
    border-color: rgba(255, 180, 60, 0.6);
    color: #ffd48a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 180, 60, 0.25);
}

.toast.toast-error {
    border-color: rgba(255, 80, 80, 0.6);
    color: #ff8a8a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 80, 80, 0.25);
}

/* ===== CONFIRM DIALOG (reemplazo no bloqueante de confirm()) ===== */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1700;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.confirm-overlay.open {
    opacity: 1;
    visibility: visible;
}

.confirm-box {
    width: min(400px, 100%);
    background: #101820;
    border: 1px solid rgba(143, 224, 138, 0.35);
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(26, 159, 255, 0.12);
    padding: 24px;
    text-align: center;
    transform: translateY(14px) scale(0.97);
    transition: transform 0.25s ease;
}

.confirm-overlay.open .confirm-box {
    transform: translateY(0) scale(1);
}

.confirm-msg {
    color: #d3f9d0;
    font-size: clamp(0.9rem, 1.6vw, 1rem);
    line-height: 1.5;
    margin: 0 0 18px;
    word-break: break-word;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-actions button {
    flex: 1 1 0;
    padding: 11px 14px;
    border-radius: 6px;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.confirm-cancel {
    background: transparent;
    color: #bfe9b2;
    border: 1px solid rgba(143, 224, 138, 0.4);
}

.confirm-cancel:hover {
    background: rgba(143, 224, 138, 0.12);
    transform: translateY(-2px);
}

.confirm-accept {
    background: linear-gradient(90deg, #1a9fff, #66c0f4);
    color: #ffffff;
    border: none;
}

.confirm-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(26, 159, 255, 0.35);
    filter: brightness(1.05);
}

/* ===== AVISO DE COOKIES: badge discreto + panel bajo demanda ===== */
.cookie-widget {
    position: fixed;
    left: clamp(10px, 1.6vw, 18px);
    bottom: clamp(10px, 1.6vw, 18px);
    z-index: 1400;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    pointer-events: none;
}

.cookie-widget > * {
    pointer-events: auto;
}

/* --- Badge circular (lo único visible por defecto) --- */
.cookie-badge {
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 24, 32, 0.7);
    border: 1px solid rgba(143, 224, 138, 0.22);
    border-radius: 50%;
    color: #bfe9b2;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.55;
    backdrop-filter: blur(4px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transition: opacity 0.2s ease, transform 0.2s ease,
                border-color 0.2s ease, box-shadow 0.2s ease;
}

.cookie-badge:hover,
.cookie-badge:focus-visible {
    opacity: 1;
    transform: translateY(-2px);
    border-color: rgba(143, 224, 138, 0.55);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 18px rgba(111, 168, 106, 0.22);
    outline: none;
}

/* Punto de aviso sutil en la primera visita (no abre nada por sí solo) */
.cookie-widget.attn .cookie-badge {
    opacity: 0.9;
    animation: cookiePulse 2.6s ease-in-out 3;
}

.cookie-widget.attn .cookie-badge::after {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 9px;
    height: 9px;
    background: #66c0f4;
    border: 2px solid #000000;
    border-radius: 50%;
}

@keyframes cookiePulse {
    0%, 100% { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
    50% { box-shadow: 0 6px 22px rgba(102, 192, 244, 0.45); }
}

/* --- Panel emergente (sólo al pulsar el badge) --- */
.cookie-popup {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    width: min(300px, calc(100vw - 32px));
    background: rgba(16, 24, 32, 0.97);
    border: 1px solid rgba(143, 224, 138, 0.3);
    border-radius: 12px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.65), 0 0 26px rgba(111, 168, 106, 0.1);
    padding: 14px 16px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.98);
    transform-origin: bottom left;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.cookie-popup.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.cookie-popup-title {
    margin: 0 0 8px;
    color: #d3f9d0;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.cookie-popup-text {
    margin: 0 0 12px;
    color: #bfe9b2;
    font-size: 0.8rem;
    line-height: 1.45;
}

.cookie-popup-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-popup-link {
    color: #7ecbff;
    font-size: 0.76rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-popup-link:hover {
    color: #a8d8ff;
}

.cookie-popup-btn {
    margin-left: auto;
    padding: 6px 14px;
    background: linear-gradient(90deg, #1a9fff, #66c0f4);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cookie-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 159, 255, 0.32);
}

@media (max-width: 480px) {
    .cookie-widget {
        left: 10px;
        bottom: 10px;
    }

    .cookie-popup {
        width: min(280px, calc(100vw - 20px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-widget.attn .cookie-badge {
        animation: none;
    }
}
