/* Estilos específicos para a vitrine (Bootstrap 5) */

.products-grid { /* rely on Bootstrap gutters (g-2) */ }
.products-grid .item { display: block; box-sizing: border-box; }

.product-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
    box-sizing: border-box;
}

.product-thumbnail { position: relative; }

/* Faz a área da imagem ser quadrada e mantém as imagens cobrindo toda a área */
.pr-img-area {
    position: relative;
    overflow: hidden;
    background: #fff;
    padding-top: 100%; /* força proporção 1:1 */
}

.pr-img-area picture { position: absolute; inset: 0; width: 100%; height: 100%; }
.pr-img-area img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Espaçamento interno para o figure, evitando que a imagem encoste/"coma" a borda */
.pr-img-area figure {
    position: absolute;
    inset: 6px; /* cria um gap entre imagem e borda */
    margin: 0;
    overflow: hidden;
    border-radius: 0.375rem; /* levemente menor que a borda externa */
}

@media (max-width: 575.98px) {
    .pr-img-area figure { inset: 4px; border-radius: 0.25rem; }
}

.pr-img-area img.first-img { transition: opacity 0.35s ease; opacity: 1; }
.pr-img-area img.hover-img { position: absolute; top: 0; left: 0; opacity: 0; transition: opacity 0.35s ease; }
.product-item:hover .pr-img-area img.hover-img { opacity: 1; }
.product-item:hover .pr-img-area img.first-img { opacity: 0; }

.item-info {
    padding: 0.75rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-title a {
    color: #212529;
    text-decoration: none;
    font-weight: 600;
}

/* Não quebrar linha para o nome do produto e exibir reticências quando for muito longo */
.item-title a:first-child {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.icon-new-label {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #dc3545;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
}

.on-right-top {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
}

.vitrine-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
}

/* Ajustes responsivos finos */
@media (max-width: 575.98px) {
    .product-item { border-radius: 0.25rem; }
}

.page-title {
    margin-bottom: 20px;
}

@media (min-width: 992px) {
    .brindes-page-title {
        margin-top: 20px;
    }
}

.produtos-listing-layout {
    align-items: flex-start;
}

.produtos-filtros-panel {
    background: #fff;
    border: 1px solid var(--xb-line, #e9ecef);
    border-radius: .75rem;
    box-shadow: 0 .5rem 1.5rem rgba(33, 37, 41, .06);
    padding: 1.1rem;
    position: sticky;
    top: 1rem;
}

.produtos-filtros-header {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.produtos-filtros-kicker {
    color: var(--xb-red, #dc3545);
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.produtos-filtros-title {
    color: #212529;
    font-size: 1.15rem;
    font-weight: 800;
    margin: .15rem 0 0;
}

.produtos-filtros-title-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.produtos-filtros-active-inline {
    background: rgba(220, 53, 69, .08);
    border: 1px solid rgba(220, 53, 69, .18);
    border-radius: 999px;
    color: var(--xb-red, #dc3545);
    font-size: .74rem;
    font-weight: 800;
    line-height: 1;
    padding: .35rem .55rem;
    white-space: nowrap;
}

.produtos-filtros-count {
    background: #f8f9fa;
    border-radius: 999px;
    color: #495057;
    font-size: .82rem;
    font-weight: 700;
    padding: .4rem .75rem;
    white-space: nowrap;
}

.produtos-filtros-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.produtos-filtro-bloco {
    border-top: 1px solid var(--xb-line, #e9ecef);
    padding-top: 1rem;
}

.produtos-filtro-bloco:first-child {
    border-top: 0;
    padding-top: 0;
}

.produtos-filtro-bloco-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: .8rem;
}

.produtos-filtro-bloco-header h3 {
    color: #212529;
    font-size: .98rem;
    font-weight: 700;
    margin: 0;
}

.produtos-filtro-bloco-header span {
    color: #6c757d;
    font-size: .8rem;
    font-weight: 700;
}

.produtos-filtro-categorias {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    max-height: 18rem;
    overflow-y: auto;
    padding-right: .25rem;
}

.produtos-filtro-check {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    gap: .65rem;
    margin: 0;
}

.produtos-filtro-check input {
    margin-top: .15rem;
}

.produtos-filtro-check span {
    color: #343a40;
    font-size: .92rem;
    line-height: 1.45;
}

.produtos-filtro-cores {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
}

.produtos-filtro-color-item {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    margin: 0;
    min-width: auto;
}

.produtos-filtro-color-item input {
    display: none;
}

.produtos-filtro-color-swatch {
    background: var(--filter-color, #ccc);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(33, 37, 41, .14);
    display: inline-flex;
    flex: 0 0 1.85rem;
    height: 1.85rem;
    position: relative;
    width: 1.85rem;
}

.produtos-filtro-color-item input:checked + .produtos-filtro-color-swatch {
    box-shadow: 0 0 0 2px var(--xb-red, #dc3545);
}

.produtos-filtros-actions {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    padding-top: .35rem;
}

.produtos-filtros-toggle {
    border-color: var(--xb-red, #dc3545);
    color: var(--xb-red, #dc3545);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
}

.produtos-filtros-toggle-label {
    align-items: center;
    display: inline-flex;
}

.produtos-filtros-active-badge {
    background: var(--xb-red, #dc3545);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1;
    min-width: 1.5rem;
    justify-content: center;
    padding: .35rem .45rem;
}

.produtos-filtros-toggle:hover,
.produtos-filtros-toggle:focus {
    background: var(--xb-red, #dc3545);
    border-color: var(--xb-red, #dc3545);
    color: #fff;
}

.produtos-filtros-root.has-active-filters .produtos-filtros-panel {
    border-color: rgba(220, 53, 69, .22);
    box-shadow: 0 .75rem 1.75rem rgba(220, 53, 69, .08);
}

.vitrine-back-button {
    border-color: var(--xb-red, #dc3545);
    color: var(--xb-red, #dc3545);
    font-size: 1.125rem;
    padding: 0.9rem 2.25rem;
}

.vitrine-back-button:hover,
.vitrine-back-button:focus {
    background-color: var(--xb-red, #dc3545);
    border-color: var(--xb-red, #dc3545);
    color: #fff;
}

/* Breadcrumb: manter em uma linha e exibir reticências quando exceder a largura */
.breadcrumbs {
    overflow: hidden;
}
.breadcrumbs .breadcrumb {
    display: block; /* permite text-overflow funcionar no container */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
}
.breadcrumbs .breadcrumb .breadcrumb-item {
    display: inline-block;
    vertical-align: middle;
}

/* Slider responsivo dos banners da categoria */
.category-description .slider-items-products {
    background: var(--xb-soft);
    border: 1px solid var(--xb-line);
    border-radius: .5rem;
    overflow: hidden;
    width: 100%;
}
.category-description .slider-items-products .carousel-item {
    aspect-ratio: 8 / 3;
}
.category-description .slider-items-products .carousel-item picture {
    display: block;
    width: 100%;
    height: 100%;
}
.category-description .slider-items-products .carousel-item picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.category-description .slider-items-products .carousel-item picture img.is-legacy {
    object-fit: contain;
}
.category-description .slider-items-products .carousel-control-prev,
.category-description .slider-items-products .carousel-control-next {
    background: rgba(0, 0, 0, .28);
    bottom: 50%;
    height: 3rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
}

@media (max-width: 767.98px) {
    .category-description .slider-items-products .carousel-item {
        aspect-ratio: 16 / 9;
    }

    .brindes-page-banner .slider-items-products .carousel-item {
        aspect-ratio: auto;
    }

    .brindes-page-banner .slider-items-products .carousel-item picture,
    .brindes-page-banner .slider-items-products .carousel-item picture img {
        height: auto;
    }

    .brindes-page-banner .slider-items-products .carousel-item picture img {
        object-fit: contain;
    }
}
@media (max-width: 575.98px) {
    .category-description .slider-items-products .carousel-control-prev,
    .category-description .slider-items-products .carousel-control-next {
        height: 2.5rem;
        width: 2.5rem;
    }
}

.produtos-seo-description {
    background: #fff;
    border: 1px solid var(--xb-red);
    border-top: 4px solid var(--xb-red);
    border-radius: 6px;
    box-shadow: 0 .5rem 1.5rem rgba(33, 37, 41, .08);
    overflow: hidden;
    margin-bottom: 50px;
}

.produtos-seo-description .nav-tabs {
    border-bottom: 1px solid var(--xb-line);
    padding: 0 1.5rem;
}

.produtos-seo-description .nav-link {
    color: #4d5358;
    border: 0;
    border-bottom: 3px solid transparent;
    font-weight: 700;
    padding: 1rem .25rem .75rem;
    background: transparent;
    cursor: default;
}

.produtos-seo-description .nav-link.active {
    color: var(--xb-red) !important;
    border-bottom-color: var(--xb-red);
    background: transparent;
}

.produtos-seo-description .tab-content {
    padding: 0 1.5rem;
}

.produtos-seo-description .std-descricao {
    border: 0;
    padding: 0 !important;
    box-shadow: none;
    background: transparent;
}

.produtos-seo-content {
    color: #000;
    line-height: 1.7;
}

.produtos-seo-content img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 767.98px) {
    .produtos-filtros-panel {
        padding: 1rem;
        position: static;
        top: auto;
    }

    .produtos-filtro-color-item {
        min-width: auto;
    }

    .produtos-seo-description .nav-tabs,
    .produtos-seo-description .tab-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
