/* Reset básico */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    color: #111;
}

/* Header Estilo Nike */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li a {
    text-decoration: none;
    color: #111;
    font-weight: 700;
    margin: 0 15px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Grid de Produtos */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-title {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Card de Produto */
.product-card {
    background: #fff;
    padding: 15px;
    position: relative;
    transition: transform 0.3s ease;
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: #ddd;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #111;
    color: #fff;
    padding: 5px 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: bold;
}

.product-image {
    width: 100%;
    height: 300px;
    background: #f9f9f9; /* Fallback caso a imagem não carregue */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.product-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.product-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.category {
    color: #757575;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.price {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* Botão Estilo Industrial */
.btn-buy {
    width: 100%;
    padding: 15px;
    background: #111;
    color: #fff;
    border: none;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-buy:hover {
    background: #333;
}

/* Rodapé */
footer {
    text-align: center;
    padding: 50px;
    font-size: 0.8rem;
    color: #757575;
    background: #fff;
    margin-top: 50px;
}

/* Efeito de zoom na imagem ao passar o mouse */
.product-card:hover .product-image img {
    transform: scale(1.1);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-image {
    overflow: hidden; /* Corta a imagem que sair da borda no zoom */
}

.cart-drawer {
    position: fixed; /* ISSO É O MAIS IMPORTANTE */
    right: -400px;   /* Começa escondido à direita */
    top: 0;
    width: 350px;
    height: 100vh;   /* Ocupa a altura toda da tela */
    background: #fff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    z-index: 9999;   /* Garante que fique em cima de tudo */
    transition: 0.4s ease;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.cart-drawer {
    position: fixed;
    right: -400px;
    top: 0;
    width: 350px;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: 0.4s ease;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* Esta classe PRECISA estar separada para o JS funcionar */
.cart-drawer.active {
    right: 0 !important;
}

/* O fundo escurecido */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    z-index: 9998;
}

.overlay.active {
    display: block;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #111;
    padding-bottom: 15px;
    font-family: 'Oswald', sans-serif;
}

#cart-items {
    flex-grow: 1;
    overflow-y: auto;
    margin-top: 20px;
}

.cart-footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* Overlay (escurecer o fundo) */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 1500;
}

.overlay.active { display: block; }

/* Responsivo para celular */
@media (max-width: 480px) {
    .cart-drawer { width: 100%; right: -100%; }
}