@font-face {
    font-family: 'Inter';
    src: url('./fonts/inter-v20-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap; 
}

@font-face {
    font-family: 'Inter';
    src: url('./fonts/inter-v20-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Press Start 2P';
    src: url('./fonts/press-start-2p-v16-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

p {
    font-family: 'Press Start 2P', sans-serif;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #1D4ED8;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1),
                0 4px 6px -2px rgba(0,0,0,0.05);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
}

main {
    flex: 1;
    padding-top: 86px;
    transition: opacity 0.2s ease-in-out;
}

main.loading {
    opacity: 0;
}

.logo-texto {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-texto h1, .logo-texto h2 {
    margin: 0;
}

.logo-texto h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
}

.menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu a {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    margin-left: 20px;
    text-decoration: none;
    color: white;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
}

.menu a:hover {
    color: #FACC15;
}

.menu img {
    width: 36px;
    height: auto;
    display: block;
    transform: translateY(-1px);
}

.cart-button {
    background-color: #1E40AF;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    position: relative;
}

.cart-button:hover {
    background-color: #1E3A8A;
}

.cart-button img {
    width: 34px;
    height: auto;
    display: block;
    transform: translate(1.5px, 0.8px);
}

#cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 13px;
    height: 16px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-family: Inter, sans-serif;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

@keyframes badge-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.pulse-animation {
    animation: badge-pulse 0.3s ease-in-out;
}

footer {
    background: #f0f1f5;
    border-top: 2px solid #e6e7eb;
    margin-top: 3rem;
    padding: 2rem 0;
}

footer p {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
}

.footer-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.675rem;
}

.footer-container .slogan {
    margin-top: 0.5rem;
    font-style: italic;
}

items-page:not(:defined), items-page[loading],
cart-page:not(:defined), cart-page[loading],
item-details-page:not(:defined), item-details-page[loading],
checkout-success-page:not(:defined), checkout-success-page[loading],
not-found-page:not(:defined), not-found-page[loading] {
    opacity: 0;
    transition: opacity 0.2s ease-in;
}

@media (max-width: 768px) {
    header {
        padding: 12px 16px;
    }

    .logo-texto {
        -webkit-tap-highlight-color: transparent;
    }

    .logo-texto h2 {
        font-size: 0.9rem;
    }

    .menu {
        gap: 12px;
    }

    .menu a {
        margin-left: 0;
        -webkit-tap-highlight-color: transparent;
    }

    .menu a:active, .cart-button:active, .logo-texto img:active {
        transform: scale(0.96);
        opacity: 0.75;
    }

    .menu a:hover {
        color: white;
    }

    .cart-button {
        width: 48px;
        height: 48px;
    }

    .cart-button img {
        width: 28px;
    }

    main {
        padding-top: 72px;
    }
}