/* ==========================================================
   VARIÁVEIS GLOBAIS (NIKE / UGMONK THEME)
   ========================================================== */
:root {
    --nike-black: #111111;
    --nike-white: #ffffff;
    --nike-grey-bg: #f5f5f5;
    --nike-grey-text: #707070;
    --green-wpp: #25d366;
    --red-alert: #e53e3e;
    --font-main: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--nike-white);
    color: var(--nike-black);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; }

/* ==========================================================
   NAVEGAÇÃO (BASE MOBILE)
   ========================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: transparent;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 100;
    color: var(--nike-white);
}

.logo {
    font-weight: 900;
    font-size: 20px;
    letter-spacing: -1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-atacado {
    background: var(--nike-white);
    color: var(--nike-black);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 900;
    letter-spacing: 0;
}

.nav-links, .hide-mobile {
    display: none;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    font-weight: 500;
}

.cart-btn {
    background: var(--nike-white);
    color: var(--nike-black);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
    display: flex;
    gap: 5px;
    align-items: center;
    transition: 0.3s;
}

.cart-btn:hover {
    background: var(--nike-grey-bg);
}

/* ==========================================================
   HERO SECTION
   ========================================================== */
.hero {
    height: 65vh;
    background-color: #2c2c2c; 
    background-image: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.6)), url('../img/hero-banner.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 40px 20px;
    color: var(--nike-white);
}

.hero-content h1 {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -1.5px;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 5px;
}

.hero-content a {
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 2px solid var(--nike-white);
    padding-bottom: 2px;
}

/* ==========================================================
   FILTRO DE CATEGORIAS
   ========================================================== */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 30px 15px;
    overflow-x: auto;
    white-space: nowrap;
}

.category-filter::-webkit-scrollbar { display: none; }

.filter-btn {
    font-size: 14px;
    font-weight: 500;
    color: var(--nike-grey-text);
    padding-bottom: 5px;
    position: relative;
    transition: color var(--transition-speed);
}

.filter-btn.active {
    color: var(--nike-black);
    font-weight: 700;
}

.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--nike-black);
}

/* ==========================================================
   CATÁLOGO DE PRODUTOS (THEMA UGMONK / GRID EXATO)
   ========================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 10px;
    padding: 0 15px 60px;
    max-width: 1600px;
    margin: 0 auto;
}

.product-card {
    display: flex;
    flex-direction: column;
}

.product-image-container {
    background-color: var(--nike-grey-bg);
    aspect-ratio: 4/5;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border-radius: 8px; /* Cantos levemente arredondados para acabamento premium */
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Garante que a imagem ocupe o quadro inteiro sem distorcer */
    display: block;
    transition: transform 0.5s ease;
}

.btn-quick-add {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(17, 17, 17, 0.95);
    color: var(--nike-white);
    padding: 10px 20px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 30px;
    opacity: 0;
    transition: 0.3s;
}

.product-image-container:hover img {
    transform: scale(1.05);
}

.product-image-container:hover .btn-quick-add {
    opacity: 1;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.product-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--nike-black);
    line-height: 1.3;
}

.product-version {
    font-size: 11px;
    color: var(--nike-grey-text);
}

.product-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--nike-black);
    margin-top: 4px;
}

.product-price small {
    font-size: 10px;
    font-weight: 400;
    color: var(--nike-grey-text);
}

/* ==========================================================
   MODAL DE PRODUTO
   ========================================================== */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: none; justify-content: center; align-items: flex-end; z-index: 1000; }
.modal-content { background: var(--nike-white); width: 100%; max-width: 500px; padding: 30px; border-radius: 20px 20px 0 0; position: relative; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 24px; font-weight: bold; }
.modal-content h3 { font-size: 18px; font-weight: 900; margin-bottom: 5px; }
.modal-preco { font-weight: 700; color: var(--nike-grey-text); margin-bottom: 20px; }
.modal-form label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; text-transform: uppercase;}
.modal-form select, .modal-form input { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; outline: none; }
.modal-form select:focus, .modal-form input:focus { border-color: var(--nike-black); }
.btn-add-cart { width: 100%; background: var(--nike-black); color: var(--nike-white); padding: 15px; font-weight: 800; text-transform: uppercase; border-radius: 6px; transition: 0.3s; }
.btn-add-cart:hover { opacity: 0.8; }

/* ==========================================================
   CARRINHO (GAVETA) E TRAVA DE ATACADO
   ========================================================== */
.cart-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; z-index: 1001; }
.cart-drawer { position: fixed; top: 0; right: -100%; width: 100%; max-width: 400px; height: 100%; background: var(--nike-white); z-index: 1002; display: flex; flex-direction: column; transition: right 0.3s ease; }
.cart-drawer.open { right: 0; }
.cart-header { padding: 20px; border-bottom: 1px solid #ddd; display: flex; justify-content: space-between; align-items: center; }
.cart-header h2 { font-weight: 900; font-size: 18px; }
.close-cart { font-size: 24px; font-weight: bold; }
.cart-items { flex: 1; overflow-y: auto; padding: 20px; }

.cart-item { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 15px; }
.item-info h4 { font-size: 13px; font-weight: 700; }
.item-info p { font-size: 11px; color: var(--nike-grey-text); margin-top: 3px; }
.item-remove { color: var(--red-alert); font-size: 11px; font-weight: 700; margin-top: 5px; display: block; }

.cart-footer { padding: 20px; background: #fafafa; border-top: 1px solid #ddd; }
.cart-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 800; margin-bottom: 15px; }
.input-nome { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; margin-bottom: 10px; outline: none; }
.input-nome:focus { border-color: var(--nike-black); }

/* A TRAVA VISUAL DO BOTÃO WHATSAPP */
.alerta-atacado { background: #fff5f5; color: var(--red-alert); border: 1px solid #feb2b2; padding: 10px; font-size: 12px; font-weight: 600; text-align: center; border-radius: 6px; margin-bottom: 15px; }
.btn-whatsapp { width: 100%; padding: 16px; font-weight: 800; color: var(--nike-white); border-radius: 6px; transition: 0.3s; border: none; }
.btn-whatsapp:disabled { background: #cccccc; cursor: not-allowed; }
.btn-whatsapp:not(:disabled) { background: var(--green-wpp); }
.btn-whatsapp:not(:disabled):hover { background: #1ebd59; }

/* ==========================================================
   GALERIA PINTEREST (MAIS VENDIDAS)
   ========================================================== */
.bestsellers-section {
    padding: 50px 15px 10px;
    max-width: 1600px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
}

.section-title h2 {
    font-size: 26px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: var(--nike-black);
}

.section-title p {
    font-size: 14px;
    color: var(--nike-grey-text);
    margin-top: 5px;
}

/* O Segredo do Pinterest: Divisão por colunas em vez de Grid/Flex */
.pinterest-gallery {
    column-count: 2; /* Sempre 2 colunas no celular */
    column-gap: 12px; /* Espaço entre as colunas */
}

.pin-item {
    break-inside: avoid; /* Impede que a foto seja cortada no meio da coluna */
    margin-bottom: 12px; /* Espaço vertical entre as fotos */
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--nike-grey-bg);
    cursor: pointer;
}

/* A imagem DEVE ter height: auto para respeitar o aspecto original (Vertical/Horizontal) */
.pin-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

/* Efeito Hover e Overlay de Compra */
.pin-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 15px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 1; /* Visível no mobile por padrão */
}

.pin-title {
    color: var(--nike-white);
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    margin-bottom: 5px;
}

.pin-action {
    color: var(--nike-white);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    width: max-content;
    backdrop-filter: blur(5px);
}

.pin-item:hover img {
    transform: scale(1.05); /* Microinteração da imagem crescendo */
}

/* ==========================================================
   MEDIA QUERIES (DESKTOP PROGRESSIVO)
   ========================================================== */
@media (min-width: 768px) {
    .navbar { padding: 20px 40px; }
    .logo { font-size: 24px; }
    .nav-links, .hide-mobile { display: flex; }
    .nav-links { gap: 30px; font-weight: 500; font-size: 14px; }
    
    .hero { height: 70vh; padding: 60px 40px; }
    .hero-content h1 { font-size: 48px; }
    
    .category-filter { gap: 40px; padding: 50px 20px; }
    .filter-btn { font-size: 16px; }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px 20px;
        padding: 0 40px 80px;
    }
    .product-title { font-size: 15px; }
    .product-version { font-size: 13px; }
    .product-price { font-size: 15px; }

    /* CORREÇÃO AQUI: Centraliza perfeitamente o Modal no Desktop */
    .modal-overlay { 
        align-items: center; /* Força o alinhamento central */
    }
    
    .modal-content { 
        border-radius: 20px; /* Arredonda os 4 cantos no PC */
        animation: popInCenter 0.3s ease forwards;
    }
    
    @keyframes popInCenter { 
        from { opacity: 0; transform: scale(0.95); } 
        to { opacity: 1; transform: scale(1); } 
    }

    /* Expande a galeria Pinterest no Desktop */
    .bestsellers-section { padding: 60px 40px 20px; }
    .section-title h2 { font-size: 32px; }
    .pinterest-gallery { column-count: 3; column-gap: 20px; }
    .pin-item { margin-bottom: 20px; }
    
    /* Esconde o botão no desktop e mostra só ao passar o mouse */
    .pin-overlay { opacity: 0; transition: opacity 0.3s ease; }
    .pin-item:hover .pin-overlay { opacity: 1; }

}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .pinterest-gallery { column-count: 4; }
}

/* ==========================================================
   RODAPÉ PREMIUM (CORRIGIDO: MAIS ESPAÇAMENTO E LEGIBILIDADE)
   ========================================================== */
.shop-footer {
    background-color: var(--nike-black);
    color: var(--nike-white);
    padding: 80px 0 0; /* Aumentado o respiro no topo do rodapé */
    border-top: 1px solid #222222;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile-First: Uma única coluna empilhada */
    gap: 45px; /* Maior espaçamento entre os blocos de conteúdo */
    padding: 0 30px 80px; /* Adicionado 30px nas laterais para afastar completamente das bordas do celular */
    max-width: 1400px; /* Alinha perfeitamente com a largura máxima do catálogo */
    margin: 0 auto;
}

.footer-logo {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: uppercase;
    margin-bottom: 20px; /* Mais espaço abaixo da logo */
    color: var(--nike-white);
}

.brand-info p {
    max-width: 400px;
    font-size: 14px; /* Ajuste sutil para melhorar a leitura */
    line-height: 1.7; /* Linhas levemente mais afastadas para melhor legibilidade */
    color: #a0a0a0;
}

.footer-column h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 24px; /* Mais espaço abaixo dos títulos das colunas */
    color: var(--nike-white);
}

.footer-column p {
    color: #a0a0a0;
    font-size: 14px;
    line-height: 1.7;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 14px; /* Maior espaçamento vertical entre os links */
}

.footer-column ul li a {
    color: #a0a0a0;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition-speed) ease;
}

.footer-column ul li a:hover {
    color: var(--nike-white);
}

.contact-item {
    margin-bottom: 14px;
    font-weight: 500;
}

.footer-socials {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.social-link {
    color: #a0a0a0;
    font-size: 14px;
    font-weight: 700;
    transition: color var(--transition-speed) ease;
    width: max-content;
}

.social-link:hover {
    color: var(--nike-white);
}

/* Faixa inferior de direitos autorais */
.footer-bottom {
    border-top: 1px solid #222222;
    padding: 35px 30px; /* Adicionado recuo lateral também na faixa inferior */
    text-align: center;
}

.footer-bottom p {
    color: #555555;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ==========================================================
   RESPONSIVIDADE DO RODAPÉ (LAPTOPS E DESKTOPS)
   ========================================================== */
@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr repeat(3, 1fr); /* Distribuição simétrica em 4 colunas */
        gap: 40px;
        padding: 0 40px 100px; /* No computador, ganha ainda mais recuo para respirar */
    }
}

/* ==========================================================
   FORMULÁRIO DE CHECKOUT (GAVETA DO CARRINHO)
   ========================================================== */
.checkout-form {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.checkout-form h4 {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--nike-black);
    letter-spacing: 0.5px;
}

.input-checkout {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.input-checkout:focus {
    border-color: var(--nike-black);
}

.input-row {
    display: flex;
    gap: 8px;
}

.input-checkout.readonly {
    background-color: #e2e8f0;
    color: #475569;
    cursor: not-allowed;
}