/* ===== VARIÁVEIS DE COR ===== */
:root {
    --azul-escuro:   #0d2b6e;
    --azul-medio:    #1a4bb5;
    --azul-claro:    #4a90d9;
    --azul-palido:   #ddeeff;
    --azul-gelo:     #f0f6ff;
    --branco:        #ffffff;
    --cinza-suave:   #f5f7fa;
    --cinza-texto:   #5a6472;
    --amarelo-acento:#ffc107;
    --verde-estoque: #1a9c52;
    --sombra-card:   0 4px 20px rgba(13,43,110,.10);
    --sombra-hover:  0 8px 32px rgba(13,43,110,.18);
    --radius:        14px;
    --radius-sm:     8px;
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Nunito', sans-serif;
    background: var(--cinza-suave);
    color: #1e2635;
    min-height: 100vh;
}

/* ===== HEADER ===== */
.site-header {
    background: linear-gradient(135deg, var(--azul-escuro) 0%, var(--azul-medio) 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 16px rgba(0,0,0,.22);
}
.header-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .75rem 1.5rem;
}
.logo-area { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.logo-icon {
    width: 44px; height: 44px;
    background: var(--branco);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    flex-shrink: 0;
}
.logo-text { line-height: 1.1; }
.logo-text .brand { font-family: 'Playfair Display', serif; font-size: 1.35rem; color: #fff; letter-spacing: .5px; }
.logo-text .tagline { font-size: .72rem; color: var(--azul-palido); letter-spacing: .8px; text-transform: uppercase; }

.search-bar {
    flex: 1;
    max-width: 560px;
    display: flex;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.search-bar input {
    flex: 1;
    border: none;
    padding: .55rem 1.2rem;
    font-family: 'Nunito', sans-serif;
    font-size: .93rem;
    outline: none;
    background: #fff;
}
.search-bar button {
    background: var(--amarelo-acento);
    border: none;
    padding: .55rem 1.1rem;
    color: var(--azul-escuro);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background .2s;
}
.search-bar button:hover { background: #e0a800; }

.header-actions { margin-left: auto; display: flex; gap: .6rem; align-items: center; }
.btn-header {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.22);
    color: #fff;
    border-radius: 50px;
    padding: .4rem .9rem;
    font-size: .82rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    display: flex; align-items: center; gap: .35rem;
    text-decoration: none;
}
.btn-header:hover { background: rgba(255,255,255,.25); color: #fff; }
.cart-badge {
    background: var(--amarelo-acento);
    color: var(--azul-escuro);
    border-radius: 50%;
    width: 18px; height: 18px;
    font-size: .68rem;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800;
}

/* NAV SECUNDÁRIA */
.header-nav {
    background: rgba(0,0,0,.15);
    border-top: 1px solid rgba(255,255,255,.08);
}
.header-nav .nav-link {
    color: rgba(255,255,255,.85);
    font-size: .82rem;
    font-weight: 700;
    padding: .45rem .9rem;
    transition: color .2s;
    letter-spacing: .3px;
}
.header-nav .nav-link:hover, .header-nav .nav-link.active { color: var(--amarelo-acento); }

/* ===== HERO CARROSSEL ===== */
.hero-carousel-wrapper {
    background: var(--azul-gelo);
    padding: 0;
}
.hero-carousel .carousel-item { height: 320px; }
@media (max-width: 768px) { .hero-carousel .carousel-item { height: 190px; } }
.hero-slide {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 3rem;
    position: relative;
    overflow: hidden;
}
.hero-slide-1 { background: linear-gradient(120deg, #0d2b6e 40%, #1a4bb5 100%); }
.hero-slide-2 { background: linear-gradient(120deg, #1a4bb5 0%, #4a90d9 100%); }
.hero-slide-3 { background: linear-gradient(120deg, #0a1e4f 30%, #1a4bb5 100%); }
.hero-deco {
    position: absolute; right: -30px; top: -30px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
}
.hero-deco2 {
    position: absolute; right: 120px; bottom: -60px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
}
.hero-content { position: relative; z-index: 1; }
.hero-content .badge-tag {
    background: var(--amarelo-acento);
    color: var(--azul-escuro);
    font-size: .72rem;
    font-weight: 800;
    padding: .25rem .7rem;
    border-radius: 50px;
    letter-spacing: .5px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: .6rem;
}
.hero-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.1rem;
    color: #fff;
    line-height: 1.15;
    margin-bottom: .5rem;
}
@media (max-width: 768px) { .hero-content h2 { font-size: 1.25rem; } }
.hero-content p { color: rgba(255,255,255,.8); font-size: .9rem; margin-bottom: .9rem; }
.btn-hero {
    background: var(--amarelo-acento);
    color: var(--azul-escuro);
    border: none;
    border-radius: 50px;
    padding: .5rem 1.4rem;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    font-size: .88rem;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    text-decoration: none;
    display: inline-block;
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.2); color: var(--azul-escuro); }
.carousel-control-prev-icon, .carousel-control-next-icon { filter: none; }
.carousel-control-prev, .carousel-control-next { width: 40px; }

/* ===== LAYOUT PRINCIPAL ===== */
.main-layout {
    display: grid;
    gap: 1.2rem;
    max-width: 1400px;
    margin: 1.2rem auto;
    padding: 0 1rem;
}
@media (max-width: 860px) {
    .main-layout { grid-template-columns: 1fr; }
    .side-ads { display: none; }
}

/* ===== SIDEBAR ADS ===== */
.side-ads { display: flex; flex-direction: column; gap: .9rem; position: relative; }
.side-sticky { position: sticky; top: 90px; display: flex; flex-direction: column; gap: .9rem; }
.side-ad-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--sombra-card);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.side-ad-card:hover { transform: translateY(-3px); box-shadow: var(--sombra-hover); }

/* Carrossel lateral */
.side-carousel .carousel-item { height: 220px; }
.side-slide {
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem .8rem;
    position: relative;
}
.side-slide-1 { background: linear-gradient(160deg, var(--azul-escuro), var(--azul-medio)); }
.side-slide-2 { background: linear-gradient(160deg, #0a2a5e, #1a4bb5); }
.side-slide-3 { background: linear-gradient(160deg, #1a4bb5, var(--azul-claro)); }
.side-slide-4 { background: linear-gradient(160deg, #0d2b6e, #4a90d9); }
.side-slide .icon-big { font-size: 2.8rem; margin-bottom: .5rem; }
.side-slide .slide-label {
    font-size: .68rem;
    font-weight: 800;
    color: var(--amarelo-acento);
    text-transform: uppercase;
    letter-spacing: .6px;
}
.side-slide .slide-title {
    font-size: .9rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin: .2rem 0 .5rem;
}
.side-slide .slide-price {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--amarelo-acento);
}
.side-slide .slide-old {
    font-size: .72rem;
    color: rgba(255,255,255,.6);
    text-decoration: line-through;
}

/* ===== ÁREA CENTRAL ===== */
.catalog-area { min-width: 0; }

/* Filtros / barra de categorias */
.category-bar {
    background: var(--branco);
    border-radius: var(--radius);
    padding: .7rem 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--sombra-card);
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.cat-pill {
    background: var(--azul-gelo);
    color: var(--azul-medio);
    border: 1.5px solid var(--azul-palido);
    border-radius: 50px;
    padding: .3rem .85rem;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}
.cat-pill:hover, .cat-pill.active {
    background: var(--azul-medio);
    color: #fff;
    border-color: var(--azul-medio);
}

/* Barra de ordenação */
.sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .9rem;
    flex-wrap: wrap;
    gap: .5rem;
}
.sort-bar .results-count { font-size: .82rem; color: var(--cinza-texto); font-weight: 600; }
.sort-select {
    border: 1.5px solid var(--azul-palido);
    border-radius: 50px;
    padding: .3rem .9rem;
    font-family: 'Nunito', sans-serif;
    font-size: .8rem;
    font-weight: 700;
    color: var(--azul-escuro);
    outline: none;
    background: #fff;
    cursor: pointer;
}

/* ===== GRID DE PRODUTOS ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}
@media (max-width: 600px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
}

/* CARD DE PRODUTO */
.product-card {
    background: var(--branco);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--sombra-card);
    transition: transform .22s cubic-bezier(.22,.68,0,1.2), box-shadow .22s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    animation: fadeInUp .4s ease both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.product-card:hover { transform: translateY(-5px) scale(1.015); box-shadow: var(--sombra-hover); }

.product-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background: var(--azul-gelo);
}
.product-img-wrap img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    padding: .6rem;
    transition: transform .3s;
}
.product-card:hover .product-img-wrap img { transform: scale(1.06); }

.badge-desconto {
    position: absolute; top: 8px; left: 8px;
    background: #e53935;
    color: #fff;
    font-size: .65rem;
    font-weight: 800;
    padding: .2rem .5rem;
    border-radius: 50px;
    letter-spacing: .3px;
}
.badge-novo {
    position: absolute; top: 8px; left: 8px;
    background: var(--verde-estoque);
    color: #fff;
    font-size: .65rem;
    font-weight: 800;
    padding: .2rem .5rem;
    border-radius: 50px;
}
.btn-fav {
    position: absolute; top: 8px; right: 8px;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem;
    box-shadow: 0 1px 6px rgba(0,0,0,.12);
    cursor: pointer;
    transition: color .18s, transform .18s;
    color: #ccc;
}
.btn-fav:hover, .btn-fav.favoritado { color: #e53935; transform: scale(1.15); }

.product-info {
    padding: .7rem .75rem .8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.product-name {
    font-size: .82rem;
    font-weight: 700;
    color: #1e2635;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-desc {
    font-size: .72rem;
    color: var(--cinza-texto);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-price-row { display: flex; align-items: baseline; gap: .4rem; margin-top: .3rem; }
.product-price {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--azul-escuro);
}
.product-price-old {
    font-size: .72rem;
    color: #aaa;
    text-decoration: line-through;
}
.product-stock {
    font-size: .7rem;
    font-weight: 700;
    display: flex; align-items: center; gap: .25rem;
}
.stock-ok  { color: var(--verde-estoque); }
.stock-low { color: #e67e22; }
.stock-out { color: #e53935; }

.btn-comprar {
    margin-top: auto;
    background: var(--azul-medio);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: .45rem .5rem;
    font-family: 'Nunito', sans-serif;
    font-size: .8rem;
    font-weight: 800;
    cursor: pointer;
    transition: background .18s, transform .15s;
    display: flex; align-items: center; justify-content: center; gap: .35rem;
}
.btn-comprar:hover { background: var(--azul-escuro); transform: scale(1.02); }

/* ===== PAGINAÇÃO ===== */
.paginacao {
    margin-top: 1.5rem;
    display: flex; gap: .4rem;
}
.page-btn {
    background: var(--branco);
    border: 1.5px solid var(--azul-palido);
    color: var(--azul-medio);
    border-radius: var(--radius-sm);
    padding: .4rem .7rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: .82rem;
    cursor: pointer;
    transition: all .18s;
}
.page-btn:hover, .page-btn.active {
    background: var(--azul-medio); color: #fff; border-color: var(--azul-medio);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--azul-escuro);
    color: rgba(255,255,255,.7);
    padding: 2rem 1.5rem 1rem;
    margin-top: 2.5rem;
}
.footer-brand { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: #fff; }
.footer-tagline { font-size: .78rem; color: var(--azul-palido); margin-top: .2rem; }
.footer-links a { color: rgba(255,255,255,.7); text-decoration: none; font-size: .82rem; display: block; margin-bottom: .3rem; }
.footer-links a:hover { color: var(--amarelo-acento); }
.footer-divider { border-color: rgba(255,255,255,.1); margin: 1.2rem 0 .8rem; }
.footer-bottom { font-size: .72rem; text-align: center; color: rgba(255,255,255,.4); }

/* Decorativo header */
.pencil-deco {
    display: flex; align-items: center; gap: .5rem;
    font-size: .78rem; font-weight: 800;
    color: rgba(255,255,255,.6);
    letter-spacing: .5px;
}

/* animação stagger dos cards */
.product-card:nth-child(1)  { animation-delay: .05s }
.product-card:nth-child(2)  { animation-delay: .10s }
.product-card:nth-child(3)  { animation-delay: .15s }
.product-card:nth-child(4)  { animation-delay: .20s }
.product-card:nth-child(5)  { animation-delay: .25s }
.product-card:nth-child(6)  { animation-delay: .30s }
.product-card:nth-child(7)  { animation-delay: .35s }
.product-card:nth-child(8)  { animation-delay: .40s }
.product-card:nth-child(9)  { animation-delay: .45s }
.product-card:nth-child(10) { animation-delay: .50s }
.product-card:nth-child(11) { animation-delay: .55s }
.product-card:nth-child(12) { animation-delay: .60s }

/* toast notificação */
.toast-container-custom {
    position: fixed; bottom: 1.2rem; right: 1.2rem; z-index: 9999;
}
.toast-custom {
    background: var(--azul-escuro);
    color: #fff;
    border-radius: var(--radius);
    padding: .7rem 1.1rem;
    font-size: .85rem;
    font-weight: 700;
    box-shadow: 0 6px 24px rgba(0,0,0,.22);
    display: flex; align-items: center; gap: .5rem;
    animation: slideInToast .3s ease;
}
@keyframes slideInToast {
    from { opacity:0; transform: translateY(20px); }
    to   { opacity:1; transform: translateY(0); }
}

/* scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cinza-suave); }
::-webkit-scrollbar-thumb { background: var(--azul-claro); border-radius: 3px; }