:root {
    --primary: #023E74;
    --primary-dark: #06345e;
    --primary-light: #065ba7;
    --secondary: #ff9800;
    --dark: #263238;
    --light: #f5f5f5;
    --white: #ffffff;
    --gray: #757575;
    --success: #065ba7;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}
a {
    text-decoration: none;
}
body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

/*PAGINAÇÃO==============================================================*/
.page-link{
    background-color: var(--primary)!important;
    color: var(--white);
}
.active>.page-link, .page-link.active{
    color: var(--bs-pagination-active-color);
    background-color: var(--primary-dark)!important;
    border-color: var(--white);
}
/*PAGINAÇÃO==========================================================FIM====*/

/* NAVBAR */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--dark);
}

/* HERO SECTION */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1606787366850-de6330128bfc?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 5rem 0;
    margin-bottom: 3rem;
}

/* CARDS DE PRODUTO */
.card-product {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.card-product:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-img-top-wrapper {
    height: 200px;
    background-color: #ffffff;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.product-producer {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.product-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.2rem;
}

/* BOTÕES */
.btn-primary {
    background-color: var(--primary);
    border: none;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* BOTÃO FAVORITO */
.favorite-btn {
    min-width: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.5rem;
}

.favorite-btn i {
    font-size: 1rem;
}

.like-count {
    min-width: 20px;
    text-align: center;
    display: inline-block;
}

/* BOTÃO CURTIR */
.btn-like {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #0d6efd;
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.btn-like:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-like.liked {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

.btn-like .bi-heart-fill {
    color: var(--secondary);
    transition: transform 0.2s ease;
}

.scroll-categorias {
    max-height: 250px; /* Altura para mostrar ~5 categorias */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    border-radius: 5px;
    margin-top: 0.5rem;
}

.scroll-categorias a {
    text-decoration: none;
    color: #6c757d;
    transition: all 0.2s ease-in-out;
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 3px;
    margin-bottom: 1px;
    font-size: 0.9rem;
}

.scroll-categorias a:hover {
    color: var(--primary-light) !important;
    background-color: #f8f9fa;
    padding-left: 1rem;
}

.scroll-categorias a.text-primary {
    background-color: #e7f1ff;
    font-weight: 600;
}

/* Estilização da barra de rolagem */
.scroll-categorias::-webkit-scrollbar {
    width: 6px;
}

.scroll-categorias::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.scroll-categorias::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.scroll-categorias::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}


.categorias-sem-scroll {
    border: 1px solid #e9ecef;
    border-radius: 5px;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

.categorias-sem-scroll a {
    text-decoration: none;
    color: #6c757d;
    transition: all 0.2s ease-in-out;
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 3px;
    margin-bottom: 1px;
    font-size: 0.9rem;
}

.categorias-sem-scroll a:hover {
    color: var(--primary-light) !important;
    background-color: #f8f9fa;
    padding-left: 1rem;
}

.categorias-sem-scroll a.text-primary {
    background-color: #e7f1ff;
    font-weight: 600;
}



.lista-categorias {
    color: #676767;
    display: block;
}
.lista-categorias a {
    color: red!important;
}
.lista-categorias:hover {
    color: #333;
    font-weight: bold;
    transition: transform 0.3s;
}
.btn-like.liked .bi-heart-fill {
    transform: scale(1.2);
}

/* BADGES */
.pix-badge {
    background-color: #32bbad;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-left: 5px;
}
/* SECTION TITLES */
.section-title {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary);
}

/* FOOTER */
.footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 3rem 0;
    margin-top: 3rem;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-link {
    color: var(--light);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

/* CART BUTTON */
.cart-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    font-size: 1.5rem;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--secondary);
    color: white;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

/* PRODUTO ESPECÍFICO */
.product-gallery {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Ajuste para evitar corte nas imagens dos produtos */
.product-card img,
.card img,
.produto img {
  width: 100%;
  height: auto;
  object-fit: contain !important;
  object-position: center !important;
  max-height: 220px; /* ajuste conforme o layout */
  display: block;
  margin: 0 auto;
  background-color: #fff; /* evita fundo estranho se a imagem tiver transparência */
  padding: 15px;
}


.main-image-wrapper {
    width: 100%;
    height: 400px;
    background-color: #ffffff;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 15px;
    margin-top: 3em;
}

.thumbnail-container {
    display: flex;
    gap: 10px;
}

.thumbnail-wrapper {
    width: 80px;
    height: 80px;
    background-color: #ffffff;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.thumbnail-wrapper:hover,
.thumbnail-wrapper.active {
    border-color: #0d6efd;
}

.product-info {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
}

.product-meta {
    margin: 20px 0;
}

.product-meta span {
    display: block;
    margin-bottom: 5px;
    color: #6c757d;
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    font-size: 1.2rem;
    cursor: pointer;
}

.quantity-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #dee2e6;
    margin: 0 5px;
}

.quantity-selector small {
    flex-basis: 100%;
    margin-top: 5px;
}

.related-products {
    margin-top: 50px;
}

.related-product {
    transition: transform 0.3s;
}

.related-product:hover {
    transform: translateY(-5px);
}

/* ESTOQUE ESGOTADO */
.out-of-stock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 8px;
    text-align: center;
    z-index: 10;
    font-weight: bold;
}

.card-out-of-stock {
    opacity: 0.7;
    position: relative;
}

.img-out-of-stock {
    filter: grayscale(40%);
    opacity: 0.8;
}

.link-out-of-stock {
    opacity: 0.7;
}

.product-out-of-stock {
    opacity: 0.8;
}

.btn:disabled {
    cursor: not-allowed;
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .cart-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        bottom: 20px;
        right: 20px;
    }
    
    .out-of-stock-overlay {
        top: 3em;
        padding: 12px;
        font-size: 1.1rem;
    }
}

/* =============================
   GRID DE PRODUTOS + FILTROS
   ============================= */

/* Sidebar de filtros */
.sidebar-filters {
    position: sticky;
    top: 20px;
    height: fit-content;
    background-color: var(--white);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 1rem;
}

/* Layout da grade de produtos */
.product-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
}

@media (min-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Filtros dentro da sidebar */
.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.filter-section label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.5rem;
    color: var(--gray);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-section label:hover {
    color: var(--primary-light);
}

/* Checkboxes estilizados */
.filter-section input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Ajuste geral para manter harmonia */
.product-section {
    margin-top: 2rem;
}

.sidebar-filters .btn-apply {
    width: 100%;
    font-weight: 600;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    transition: var(--transition);
}

.sidebar-filters .btn-apply:hover {
    background-color: var(--primary-dark);
}
