/* =========================================================
   GRID
========================================================= */

.products-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
    gap:26px;
}

/* =========================================================
   PRODUCT TILE
========================================================= */

.product-item{
    position:relative;
}

.product-thumb{
    width:100%;
    border:none;
    padding:0;
    background:transparent;
    cursor:pointer;
    position:relative;
    overflow:hidden;

    border-radius:var(--radius-xl);

    box-shadow:
        var(--shadow-md);

    transition:
        transform .35s ease,
        box-shadow .35s ease;
}

/* hover */
.product-thumb:hover{
    transform:
        translateY(-8px)
        scale(1.01);

    box-shadow:
        var(--shadow-lg);
}

/* imagem */
.product-thumb img{
    width:100%;
    aspect-ratio:1/1;
    object-fit:cover;
    display:block;

    transition:
        transform .7s ease,
        filter .35s ease;

    filter:
        saturate(.96)
        contrast(1.02)
        brightness(.98);
}

/* zoom */
.product-thumb:hover img{
    transform:scale(1.08);

    filter:
        saturate(1.05)
        contrast(1.04)
        brightness(1);
}

/* overlay */
.product-thumb::after{
    content:"";
    position:absolute;
    inset:0;

    background:
        linear-gradient(
            to top,
            rgba(0,0,0,.55),
            rgba(0,0,0,.05),
            rgba(0,0,0,.05)
        );

    opacity:.65;
    transition:.35s ease;
}

.product-thumb:hover::after{
    opacity:.9;
}

/* borda suave */
.product-thumb::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius:inherit;

    border:1px solid rgba(255,255,255,.18);

    z-index:2;
    pointer-events:none;
}

/* badge */
.product-badge{
    position:absolute;
    top:14px;
    right:14px;
    z-index:3;

    background:var(--color-danger);
    color:#fff;

    font-size:11px;
    font-weight:var(--font-weight-bold);

    padding:6px 10px;

    border-radius:var(--radius-full);

    box-shadow:var(--shadow-sm);
}
/* =========================================================
   SECTION HEADER (CATÁLOGO PREMIUM HEADER)
========================================================= */

.section-header {
    text-align: center;
    margin-bottom: 35px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

/* TAG (Catálogo de Produtos) */
.section-tag {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-accent);
    font-weight: 600;
    background: rgba(37, 99, 235, 0.08);
    padding: 6px 12px;
    border-radius: 999px;
}

/* TITULO (Nossos Produtos) */
.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
}

/* SUBTITULO */
.section-header p {
    font-size: 14px;
    color: var(--color-gray-500);
    margin: 0;
}

/* =========================================================
   FILTER BAR (as 3 opções)
========================================================= */

.product-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

/* botão base */
.filter-btn {
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--color-gray-100);
    color: var(--color-gray-700);
    font-size: 13px;
    text-decoration: none;
    transition: all .2s ease;
    border: 1px solid transparent;
}

/* hover leve premium */
.filter-btn:hover {
    transform: translateY(-1px);
    background: var(--color-gray-200);
}

/* ativo */
.filter-btn.active {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

/* =========================================================
   PAGINATION
========================================================= */

.pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* links */
.pagination a {
    min-width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    background: #fff;

    color: var(--color-gray-700);

    border: 1px solid var(--color-gray-200);

    transition:
        transform .2s ease,
        background .2s ease,
        color .2s ease,
        box-shadow .2s ease;
}

/* hover */
.pagination a:hover {
    transform: translateY(-2px);

    background: var(--color-gray-100);

    box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

/* página ativa */
.pagination a.active {
    background: var(--color-accent);

    color: #fff;

    border-color: var(--color-accent);

    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

/* setas */
.pagination a:first-child,
.pagination a:last-child {
    font-size: 16px;
}

/* mobile */
@media (max-width: 768px) {

    .pagination {
        gap: 8px;
    }

    .pagination a {
        min-width: 38px;
        height: 38px;
        font-size: 13px;
    }

}

/* =========================================================
   MODAL
========================================================= */

.product-modal{
    position:fixed;
    inset:0;
    z-index:var(--z-modal);

    display:flex;
    align-items:center;
    justify-content:center;

    padding:40px;

    background:rgba(2,6,23,.78);

    backdrop-filter:blur(14px);

    opacity:0;
    visibility:hidden;
    pointer-events:none;

    transition:.3s ease;
}

.product-modal.active{
    opacity:1;
    visibility:visible;
    pointer-events:all;
}

/* overlay */
.product-modal-overlay{
    position:absolute;
    inset:0;
}

/* modal box */
.product-modal-content{
    position:relative;
    z-index:3;

    width:min(1350px,100%);
    max-height:92vh;

    overflow:auto;

    background:#fff;

    border-radius:var(--radius-2xl);

    display:grid;
    grid-template-columns:1.1fr .9fr;

    box-shadow:var(--shadow-xl);

    animation:modalShow .35s ease;
}

/* animação */
@keyframes modalShow{

    from{
        opacity:0;
        transform:
            translateY(20px)
            scale(.96);
    }

    to{
        opacity:1;
        transform:
            translateY(0)
            scale(1);
    }

}

/* imagem */
.modal-image{
    position:relative;

    min-height:720px;

    background:var(--color-primary);

    display:flex;
    align-items:center;
    justify-content:center;

    overflow:hidden;
}

.modal-image img{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* info */
.modal-info{
    padding:48px;

    display:flex;
    flex-direction:column;
}

.modal-info h3{
    font-size:var(--font-size-3xl);
    line-height:1.1;

    margin-bottom:20px;

    color:var(--color-primary);

    font-weight:var(--font-weight-bold);
}

.modal-info p{
    font-size:var(--font-size-md);
    line-height:1.8;

    color:var(--color-gray-600);

    margin-bottom:28px;
}

/* meta */
.modal-meta{
    display:flex;
    flex-direction:column;
    gap:12px;

    margin-bottom:32px;
}

/* preço */
.modal-price{
    font-size:var(--font-size-2xl);
    font-weight:var(--font-weight-bold);

    color:var(--color-accent);
}

/* estoque */
.modal-stock{
    font-size:var(--font-size-sm);
    color:var(--color-gray-500);
}

/* whatsapp */
.modal-whatsapp-btn{
    margin-top:auto;

    display:flex;
    align-items:center;
    justify-content:center;

    width:100%;
    min-height:62px;

    border-radius:var(--radius-lg);

    background:linear-gradient(
        135deg,
        #25d366,
        #16a34a
    );

    color:#fff;
    text-decoration:none;

    font-size:var(--font-size-md);
    font-weight:var(--font-weight-bold);

    transition:.3s ease;

    box-shadow:var(--shadow-md);
}

.modal-whatsapp-btn:hover{
    transform:translateY(-3px);
    box-shadow:var(--shadow-lg);
}

/* fechar */
.modal-close{
    position:absolute;
    top:20px;
    right:20px;
    z-index:10;

    width:52px;
    height:52px;

    border:none;
    border-radius:var(--radius-full);

    background:rgba(255,255,255,.95);

    color:var(--color-primary);

    font-size:26px;

    cursor:pointer;

    display:flex;
    align-items:center;
    justify-content:center;

    box-shadow:var(--shadow-md);

    transition:.25s ease;
}

.modal-close:hover{
    transform:rotate(90deg) scale(1.05);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px){

    .product-modal-content{
        grid-template-columns:1fr;
    }

    .modal-image{
        min-height:500px;
    }

}

@media (max-width: 768px){

    .products-grid{
        grid-template-columns:repeat(2,1fr);
        gap:14px;
    }

    .product-modal{
        padding:14px;
    }

    .product-modal-content{
        max-height:95vh;
    }

    .modal-image{
        min-height:320px;
    }

    .modal-info{
        padding:28px;
    }

}

@media (max-width: 520px){

    .modal-image{
        min-height:260px;
    }

    .modal-info{
        padding:22px;
    }

}