[data-bs-theme=base] {
    --bs-bg-page: #e3e3e3;
    --bs-bg-nav: #384148;
    --bs-bg-header: #a0b0bf;
    --bs-bg-navlink: #3086c0;
    --bs-txt-nav: #fafafa;
    --bs-bg-cardheader: #384148;
    --bs-txt-cardheader: #eaedf0;
}

body {
    background-color: var(--bs-bg-page);
}

.card_titulo_h5 {
    font-size: 1.2rem;
}

@media (max-width: 576px) {
    .card_titulo_h5 {
        font-size: 0.8rem;
    }   
}

/* Deixar imagem em escala de cinza */
.imagem-pb {
    filter: grayscale(100%);
    filter: gray; /* Para IE */
    -webkit-filter: grayscale(100%);
    opacity: 0.4;
}

/* ============================================
   BANNER HISTÓRICO
============================================ */
.history-carousel-container {
    overflow: hidden;
    position: relative;
    padding: 0.5rem 0;
}

.history-carousel-track {
    display: flex;
    gap: 1.25rem; /* 20px */
    transition: transform 0.3s ease;
    will-change: transform;
}

.history-item {
    flex: 0 0 auto;
}

.history-product-image {
    position: relative;
}

.history-badge {
    position: absolute;
    top: 8px;
    font-weight: 400;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 5px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.history-product-card {
    background: white;
    border-radius: 5px;
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
    overflow: hidden;
    transition: transform 0.1s ease; /* Suaviza a animação */
}

.history-product-card:hover {
    transform: translateY(-1px);
    border: 1px solid #808080;
    cursor: pointer;
    box-shadow: 0 0 0.3rem 0.1rem rgba(0, 0, 0, 0.25);
}

.history-product-image {
    height: 150px;
    overflow: hidden;
    border-radius: 5px 5px 0 0;
    background-color: white;
}

.history-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.history-product-card:hover .history-product-image img {
    transform: scale(1.05);
}

.history-product-card .card-body {
    padding: 0.5em;
    line-height: 1em;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.history-product-card .card-title {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--lead-gray-light);
    line-height: 1;
}

.history-product-card .card-prince {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--lead-gray);
}

.history-prev,
.history-next {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--lead-gray);
    color: rgb(68, 68, 68);
    background-color: rgb(188, 211, 225);
    transition: all 0.3s ease;
}

.history-prev:hover,
.history-next:hover {
    background-color: rgb(68, 96, 135);
    color: white;
    border-color: var(--lead-gray);
    transform: scale(1.05);
}

.history-prev:disabled,
.history-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: var(--gray-light);
    border-color: var(--gray);
    color: var(--gray);
}

.history-prev:disabled:hover,
.history-next:disabled:hover {
    transform: none;
    background-color: var(--gray-light);
    color: var(--gray);
}

/* Small (sm): ≥ 576px */
@media (min-width: 576px) {
    .history-item {
        width: calc(50% - 1rem);
    }
    
    .history-product-card .card-title {
        font-size: 0.85rem;
    }
    
    .history-product-card .card-prince {
        font-size: 1rem;
    }
}

/* Medium (md): ≥ 768px */
@media (min-width: 768px) {
    .history-item {
        width: calc(50% - 1rem);
    }
}

/* Large (lg): ≥ 992px */
@media (min-width: 992px) {
    .history-item {
        width: calc(33.333% - 1rem);
    }
}

/* Extra large (xl): ≥ 1200px */
@media (min-width: 1200px) {
    .history-item {
        width: calc(25% - 1rem);
    }
}

/* X-Small: < 576px */
@media (max-width: 575.98px) {
    .history-carousel-container {
        overflow-x: auto;
        scrollbar-width: thin;
        padding-bottom: 0.5rem;
    }
    
    .history-carousel-track {
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }
    
    .history-carousel-container::-webkit-scrollbar {
        height: 4px;
    }
    
    .history-carousel-container::-webkit-scrollbar-track {
        background: var(--baby-blue-light);
        border-radius: 2px;
    }
    
    .history-carousel-container::-webkit-scrollbar-thumb {
        background: var(--lead-gray-light);
        border-radius: 2px;
    }
    
    .history-product-image {
        height: 140px;
    }
}

/* ============================================
   BANNER TOPO
   ============================================ */

.banner-carousel .carousel-item img {
    width: 100%;
    object-fit: cover;
}

/* Estilos dos controles e indicadores (opcionais) */
.banner-carousel .carousel-control-prev,
.banner-carousel .carousel-control-next {
    width: 8%;
    opacity: 0.7;
    transition: opacity 0.3s;
    
}
.banner-carousel .carousel-control-prev:hover,
.banner-carousel .carousel-control-next:hover {
    opacity: 1;
}
.banner-carousel .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: #fff;
    opacity: 0.5;
}
.banner-carousel .carousel-indicators button.active {
    opacity: 1;
    background-color: #646464;
}

.contato-icons {
    color: #efefef;
}

/* ============================================
   BANNER PROMOCIONAL
   ============================================ */
.promo-banner {
    position: relative;
    overflow: hidden;
}

.promo-banner .oferta-titulo {
    font-weight: 700;
    font-size: 1.8rem;
}
.promo-banner .oferta-destaque {
    font-weight: 700;
    font-size: 1.2rem;
}
.promo-banner .oferta-descricao {
    font-weight: 400;
    font-size: 0.9rem;
}

/* Breakpoint MD (768px a 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .promo-banner .oferta-titulo {
        font-size: 1.4rem;
    }
    .promo-banner .oferta-destaque {
        font-size: 1.1rem;
    }
    .promo-banner .oferta-descricao {
        font-size: 0.8rem;
    }
}

/* Breakpoint SM (576px a 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .promo-banner .oferta-titulo {
        font-size: 1.1rem;
    }
    .promo-banner .oferta-destaque {
        font-size: 0.9rem;
    }
    .promo-banner .oferta-descricao {
        font-size: 0.7rem;
    }
}

/* Breakpoint XS (menor que 576px) */
@media (max-width: 575.98px) {
    .promo-banner .oferta-titulo {
        font-size: 1rem;
    }
    .promo-banner .oferta-destaque {
        font-size: 0.8rem;
    }
    .promo-banner .oferta-descricao {
        font-size: 0.7rem;
    }
}

.countdown-item {
    min-width: 50px;
}

.countdown-value {
    border: 1px solid #d7d7d7;
    font-size: 1.0rem;
    font-weight: 700;
    padding: 0.45rem 0;
    background: rgba(168, 35, 35, 0.9);
    color: #676767;
    border-radius: 5px;
}

.countdown-label {
    color: rgb(41, 82, 215);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.img_promo {
    transition: all 0.2s ease;
    cursor: pointer;
    border-radius: 10px;
    max-width: 100%;
}

.img_promo:hover {
    transform: translateY(-3px);
    opacity: 0.95;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

/*
# Paginação
*/
.page-link {
    color: #303030 !important;
}
.page-link.disabled, .disabled > .page-link {
    color: #dbdbdb !important;
    background-color: #ffffff !important;
}
.page-link:hover {
    color: #dbdbdb !important;
    background-color: #4a4a4a !important;
}
.page-link.active, .active > .page-link {
    color: #dbdbdb !important;
    border-color: #88929b;
    background-color: #323232 !important;
}

.card_hover {
    transition: transform 0.1s ease; /* Suaviza a animação */
}

.card_hover:hover {
    border: 1px solid #0083bf;
    cursor: pointer;
    box-shadow: 0 0 0.3rem 0.1rem rgba(0, 140, 255, 0.398);
    transform: scale(1.01);
}

/*NAVBAR*/
/* A ul precisa ter position: relative */
.navbar-nav {
    transition: all 0.2s;
}

/* Container do input de busca - posicionado absolutamente para sobrepor os links */
.search-container {
    position: absolute;
    left: 0;
    top: 3px;
    width: auto;
    min-width: 150px;
    max-width: 100%;
    z-index: 1050;
    /* Animação de entrada */
    animation: slideInFromLeft 0.3s ease-out forwards;
}

/* Animação da esquerda para a direita (entrada) */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-20px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Animação de saída (para a direita) */
.search-container.hiding {
    animation: slideOutToRight 0.25s ease-in forwards;
}

@keyframes slideOutToRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(20px);
        opacity: 0;
    }
}

/* Links do menu: transição suave de opacidade (não usamos display:none brusco) */
.menu-link-item {
    transition: opacity 0.2s ease, visibility 0.2s ease;
    opacity: 1;
    visibility: visible;
}

/* Quando a busca estiver aberta, esconde os links suavemente */
.navbar-nav.menu-links-hidden .menu-link-item {
    opacity: 0;
    visibility: hidden;
}

/* Largura responsiva do container de busca */
.search-container {
    width: 400px;
    max-width: 70vw;
}

/* Garante que os botões não quebrem linha */
.input-group-sm .btn {
    white-space: nowrap;
}

/* ========== ESTILOS DO GRUPO DE BUSCA ========== */
.search-input-group {
    display: flex;
    align-items: stretch;
}

/* Remove todas as bordas e define altura uniforme */
.search-input-group .btn,
.search-input-group .form-control {
    border: 0 !important;
    height: 31px;
    line-height: 1;
    box-shadow: none;
}

/* Remove o outline padrão e ajusta o foco */
.search-input-group .form-control:focus {
    outline: none;
    z-index: 2;
}

/* Botão ESQUERDO (Fechar) - arredondado apenas no lado esquerdo */
.search-input-group .btn:first-child {
    border-top-left-radius: 0.375rem !important;
    border-bottom-left-radius: 0.375rem !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Botão DIREITO (Submit) - arredondado apenas no lado direito */
.search-input-group .btn:last-child {
    border-top-right-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Input SEM arredondamento (cantos retos) */
.search-input-group .form-control {
    border-radius: 0 !important;
}

/* Remove qualquer sombra ou borda indesejada ao clicar */
.search-input-group .btn:focus,
.search-input-group .form-control:focus {
    outline: none;
}

.bg-body-navbar {
    background-color: var(--bs-bg-nav) !important;
}

.navbar {
    border-bottom: 0px solid #72808c !important;
    height: 55px;
}

.nav-link {
    color: var(--bs-txt-nav) !important;
}

.nav-link.active {
    background-color: var(--bs-bg-navlink) !important;
}

.img_logo_nav {
    max-height: 32px;
    margin-right: 2rem;
    padding: 0px;
}

@media (max-width: 767px) {
    .img_logo_nav {
        max-height: 30px;
        margin-right: 2rem;
        padding: 0px;
    }
}

.list-group {
    border-color: 1px solid #000;
    border: 0px;
}

/* ============================================
   CARDS PERSONALIZADOS
============================================ */
.card_bg1 {
    background-color: var(--bs-bg-cardheader) !important;
    color: var(--bs-txt-cardheader);
}
/* Active básico */
.list-group-item.active {
    background-color: #324a6e;
    border-color: #324a6e;
    font-weight: 600;
    color: rgb(214, 214, 214);
}

.list-group-item-action:hover {
    background-color: #5b7397 !important;
    border-color: #5b7397 !important;
    color: rgb(255, 255, 255) !important;
}

/* ============================================
   OFFCANVAS
============================================ */
.offcanvas_side {
    max-width: 250px;
}

.offcanvas_cart {
    max-width: 350px;
}

/* Efeito de vidro/fundo desfocado para offcanvas e modal */
.offcanvas-backdrop,
.modal-backdrop {
    backdrop-filter: blur(10px) saturate(100%) brightness(0.5);
    -webkit-backdrop-filter: blur(10px) saturate(100%) brightness(0.5);
    background: rgba(255, 255, 255, 0.2);
}

.offcanvas-backdrop.fade,
.modal-backdrop.fade {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.offcanvas-backdrop.show,
.modal-backdrop.show {
    opacity: 1;
}