@import url('variaveis.css');

/* =====================================
   RAT CREW - PÁGINA DE CATEGORIAS
===================================== */

.category-page {
    background: #ffffff;
    min-height: 70vh;
    padding: 30px 0 80px;
}

.category-page .container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

/* BREADCRUMB */

.category-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    color: #888;
    margin-bottom: 35px;
}

.category-breadcrumb a {
    color: #777;
    text-decoration: none;
    transition: color 0.2s;
}

.category-breadcrumb a:hover {
    color: #f47721;
}

.category-breadcrumb span:last-child {
    color: #222;
    font-weight: 600;
}

/* CABEÇALHO DA CATEGORIA */

.category-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-bottom: 28px;
    border-bottom: 1px solid #eeeeee;
    margin-bottom: 25px;
}

.category-eyebrow {
    display: block;
    color: #f47721;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.category-heading h1 {
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 900;
    letter-spacing: -1.5px;
    color: #171717;
    margin: 0;
    text-transform: uppercase;
}

.category-heading p {
    font-size: 14px;
    color: #777;
    margin: 10px 0 0;
}

/* BARRA DE FILTROS E ORDENAÇÃO */

.category-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 25px;
}

#productCount {
    font-size: 12px;
    color: #777;
}

.category-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-sort label {
    font-size: 12px;
    color: #777;
}

.category-sort select {
    min-width: 160px;
    padding: 10px 12px;
    border: 1px solid #dddddd;
    border-radius: 3px;
    background: #ffffff;
    color: #222;
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

.category-sort select:focus {
    border-color: #f47721;
}

/* GRADE DE PRODUTOS */

.category-products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 35px 22px;
}

/* CARDS */

.category-products .product-card {
    min-width: 0;
    background: #ffffff;
    overflow: hidden;
}

.category-products .product-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f5f5;
}

.category-products .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.category-products .product-card:hover .product-image img {
    transform: scale(1.04);
}

.category-products .product-info {
    padding: 13px 2px 5px;
}

.category-products .product-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #222;
    text-decoration: none;
    margin-bottom: 8px;
}

.category-products .product-name:hover {
    color: #f47721;
}

.category-products .product-price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.category-products .product-price-old {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.category-products .product-price-current {
    font-size: 17px;
    font-weight: 800;
    color: #171717;
}

.category-products .product-price-current.promotion {
    color: #f47721;
}

/* ETIQUETAS */

.category-products .product-labels {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    pointer-events: none;
}

.category-products .product-label {
    position: static;
    display: inline-block;
    width: fit-content;
    padding: 6px 9px;
    border-radius: 2px;
    font-size: 9px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: var(--orange);
    color: #ffffff;
}

.category-products .product-label.promotion {
    background: var(--orange);
}

.category-products .product-label.featured {
    background: var(--orange);
}

.category-products .product-label.new {
    background: var(--orange);
    color: white;
}

/* CARREGAMENTO */

.category-loading {
    grid-column: 1 / -1;
    padding: 70px 20px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

/* CATEGORIA VAZIA */

.empty-category {
    text-align: center;
    padding: 80px 20px;
}

.empty-category h2 {
    font-size: 22px;
    font-weight: 900;
    color: #171717;
}

.empty-category p {
    font-size: 14px;
    color: #777;
    margin: 12px 0 25px;
}

.empty-category a {
    display: inline-block;
    padding: 13px 22px;
    background: #171717;
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: background 0.2s;
}

.empty-category a:hover {
    background: #f47721;
}

/* RESPONSIVIDADE */

@media (max-width: 1000px) {
    .category-products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 28px 18px;
    }
}

@media (max-width: 650px) {
    .category-page {
        padding: 22px 0 55px;
    }

    .category-page .container {
        width: 92%;
    }

    .category-breadcrumb {
        margin-bottom: 25px;
    }

    .category-heading {
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .category-heading h1 {
        font-size: 30px;
    }

    .category-heading p {
        font-size: 12px;
    }

    .category-toolbar {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 20px;
    }

    .category-sort {
        width: 100%;
        justify-content: space-between;
    }

    .category-sort select {
        flex: 1;
        min-width: 0;
    }

    .category-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 25px 12px;
    }

    .category-products .product-info {
        padding-top: 10px;
    }

    .category-products .product-name {
        font-size: 12px;
    }

    .category-products .product-price-current {
        font-size: 15px;
    }

    .category-products .product-label {
        font-size: 8px;
        padding: 5px 7px;
    }
}



/* BOTÃO VER PRODUTO */

.category-products .product-view-button {
    display: block;
    width: 100%;
    margin-top: 13px;

    border: 1px solid var(--black);
    padding: 11px;

    text-align: center;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;

    transition: 0.3s;
}

.category-products .product-view-button:hover {
    background: var(--black);
    color: white;
}

/* AJUSTE PARA CELULAR */

@media (max-width: 650px) {
    .category-products .product-view-button {
        padding: 11px 6px;
        font-size: 9px;
        margin-top: 10px;
    }
}



/* =====================================
   PAGINAÇÃO
===================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 45px 0 20px;
    flex-wrap: wrap;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination button {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #171717;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.pagination button:hover:not(:disabled),
.pagination button.active {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}

.pagination button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pagination-arrow {
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* MOBILE */

@media (max-width: 480px) {

    .pagination {
        gap: 6px;
        margin-top: 30px;
    }

    .pagination-numbers {
        gap: 5px;
    }

    .pagination button {
        min-width: 36px;
        height: 38px;
        padding: 0 8px;
        font-size: 11px;
    }

    .pagination-arrow {
        font-size: 10px !important;
    }
}