/* ==========================================================================
   ESTILOS GLOBAIS DA MAD GAMES (CARRINHO, COOKIES/LGPD, MODAL, TEMA E MOBILE)
   ========================================================================== */

/* Animações globais suaves */
@keyframes deslizarGaveta {
    from { transform: translateX(100%); opacity: 0.4; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes subirBanner {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes surgirModal {
    from { opacity: 0; transform: scale(0.95) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Botão do carrinho no menu superior */
.btn-carrinho-nav {
    background: none;
    border: none;
    color: var(--texto-principal, antiquewhite);
    font-family: "Poppins", "Inter", Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.btn-carrinho-nav:hover {
    background-color: #be9e0b;
    color: #050d1a;
}

/* Bolinha dourada com a quantidade de itens no carrinho */
.badge-carrinho {
    background-color: #be9e0b;
    color: #050d1a;
    font-weight: 700;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 50px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.btn-carrinho-nav:hover .badge-carrinho {
    background-color: #050d1a;
    color: #ffd166;
}

/* ================= GAVETA LATERAL DO CARRINHO ================= */
.carrinho-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(5px);
    z-index: 2500;
    display: flex;
    justify-content: flex-end;
}

.carrinho-gaveta {
    width: 380px;
    max-width: 92vw;
    height: 100%;
    background: #071426;
    color: #ffffff;
    border-left: 1px solid rgba(190, 158, 11, 0.3);
    display: flex;
    flex-direction: column;
    padding: 24px;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.6);
    font-family: "Poppins", "Inter", Arial, sans-serif;
    animation: deslizarGaveta 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.carrinho-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 14px;
}

.carrinho-topo h2 {
    font-family: "Orbitron", sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    color: #ffd166;
}

.carrinho-topo button {
    background: none;
    border: none;
    color: inherit;
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}

.carrinho-topo button:hover {
    color: #be9e0b;
    transform: scale(1.15);
}

.carrinho-lista {
    flex: 1;
    overflow-y: auto;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-carrinho {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px;
    border-radius: 10px;
    transition: border-color 0.25s ease;
}

.item-carrinho:hover {
    border-color: rgba(190, 158, 11, 0.45);
}

.item-carrinho img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 8px;
}

.item-info {
    flex: 1;
    font-size: 14px;
}

.item-info strong {
    display: block;
    color: #ffd166;
    margin-top: 3px;
}

.item-controles {
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-controles button {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 6px;
    background: #13294b;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.item-controles button:hover {
    background: #be9e0b;
    color: #050d1a;
}

.carrinho-rodape {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 14px;
}

.carrinho-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 14px;
}

.btn-ir-checkout {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #be9e0b, #ffd166);
    color: #050d1a;
    font-weight: 700;
    font-size: 15.5px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-ir-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(190, 158, 11, 0.45);
}

/* ================= BANNER DE COOKIES E LGPD (BRASIL) ================= */
.banner-cookies {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(7, 20, 38, 0.97);
    backdrop-filter: blur(10px);
    border-top: 2px solid #be9e0b;
    color: #fff;
    padding: 18px 28px;
    z-index: 3000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-family: "Poppins", "Inter", Arial, sans-serif;
    font-size: 14px;
    animation: subirBanner 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.banner-cookies p {
    flex: 1;
    min-width: 260px;
    line-height: 1.55;
}

.banner-cookies a {
    color: #ffd166;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.cookies-acoes {
    display: flex;
    gap: 10px;
}

.btn-cookie-aceitar {
    background: linear-gradient(135deg, #be9e0b, #ffd166);
    color: #050d1a;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-cookie-aceitar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(190, 158, 11, 0.4);
}

.btn-cookie-recusar {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-cookie-recusar:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffd166;
}

/* ================= MODAL DE POLÍTICA DE PRIVACIDADE (LGPD) ================= */
.lgpd-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(5px);
    z-index: 3500;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lgpd-box {
    background: #0b1b33;
    color: #fff;
    max-width: 650px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(190, 158, 11, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    font-family: "Poppins", "Inter", Arial, sans-serif;
    line-height: 1.65;
    animation: surgirModal 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.lgpd-box h2 {
    font-family: "Orbitron", sans-serif;
    font-size: 20px;
    color: #ffd166;
    margin-bottom: 14px;
}

.lgpd-box h4 {
    margin-top: 16px;
    margin-bottom: 6px;
    color: #7fceff;
}

/* ================= NOTIFICAÇÃO FLUTUANTE (TOAST) ================= */
.toast-global {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0b1b33;
    color: #fff;
    border-left: 4px solid #be9e0b;
    padding: 14px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
    font-family: "Poppins", "Inter", Arial, sans-serif;
    font-size: 14px;
    z-index: 4000;
    animation: surgirModal 0.25s ease;
}

.oculto {
    display: none !important;
}

/* ================= ADAPTAÇÃO AO MODO CLARO (ACESSIBILIDADE) ================= */
body.modo-claro .carrinho-gaveta {
    background: #ffffff;
    color: #0b1b33;
    border-left-color: rgba(11, 27, 51, 0.14);
}

body.modo-claro .carrinho-topo {
    border-bottom-color: rgba(11, 27, 51, 0.12);
}

body.modo-claro .carrinho-topo h2 {
    color: #9a7400;
}

body.modo-claro .item-carrinho {
    background: #f4f6fa;
    border-color: rgba(11, 27, 51, 0.1);
}

body.modo-claro .item-info strong {
    color: #9a7400;
}

body.modo-claro .item-controles button {
    background: #e2e8f0;
    color: #0b1b33;
}

body.modo-claro .item-controles button:hover {
    background: #be9e0b;
    color: #050d1a;
}

body.modo-claro .carrinho-rodape {
    border-top-color: rgba(11, 27, 51, 0.12);
}

body.modo-claro .banner-cookies {
    background: rgba(255, 255, 255, 0.97);
    color: #0b1b33;
    box-shadow: 0 -6px 24px rgba(11, 27, 51, 0.12);
}

body.modo-claro .banner-cookies a {
    color: #9a7400;
}

body.modo-claro .btn-cookie-recusar {
    color: #0b1b33;
    border-color: rgba(11, 27, 51, 0.3);
}

body.modo-claro .lgpd-box {
    background: #ffffff;
    color: #0b1b33;
    border-color: rgba(11, 27, 51, 0.15);
}

body.modo-claro .lgpd-box h2 {
    color: #9a7400;
}

body.modo-claro .lgpd-box h4 {
    color: #0b4b99;
}

body.modo-claro .toast-global {
    background: #ffffff;
    color: #0b1b33;
    box-shadow: 0 10px 26px rgba(11, 27, 51, 0.18);
}

/* ================= RESPONSIVIDADE (CELULAR E TABLET) ================= */
@media (max-width: 768px) {
    nav {
        height: auto !important;
        padding: 6px 0;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    nav li {
        height: 42px !important;
        min-width: 30%;
    }

    .menu, .btn-carrinho-nav {
        font-size: 13px !important;
        padding: 4px 6px;
    }

    .divisoria {
        display: none;
    }
}