:root {
    --primary-color: #be9a37;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

* {
    box-sizing: border-box;
}

body {
    color: var(--dark-text);
    background-color: var(--light-bg);
    line-height: 1.6;
    font-weight: 400;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced Navigation */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary-color);
}

.navbar-brand img {
    height: 45px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.nav-link {
    color: var(--secondary-color);
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-color);
}

/* Enhanced Buttons */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 12px 32px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-outline-primary {
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 10px 28px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-outline-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-outline-primary:hover::before {
    left: 0;
}

.btn-outline-primary:hover {
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

/* ===== SISTEMA DE BANNERS ===== */

/* Banner Principal Carousel */
.banner-principal-section {
    position: relative;
    margin-bottom: 3rem;
}

.banner-carousel .carousel-item {
    height: 600px;
    position: relative;
    overflow: hidden;
}

.banner-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.banner-overlay.overlay-escuro {
    background: rgba(0, 0, 0, 0.6);
}

.banner-content {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    padding: 2rem;
    max-width: 600px;
}

.banner-content.posicao-esquerda {
    left: 0;
    text-align: left;
}

.banner-content.posicao-centro {
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.banner-content.posicao-direita {
    right: 0;
    text-align: right;
}

.banner-titulo {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.banner-subtitulo {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s both;
}

.banner-descricao {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    animation: fadeInUp 1s ease 0.3s both;
}

.banner-cta {
    animation: fadeInUp 1s ease 0.4s both;
}

.banner-btn {
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: var(--border-radius);
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.banner-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.carousel-control-prev {
    left: 30px;
}

.carousel-control-next {
    right: 30px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Carousel Indicators */
.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background: white;
    transform: scale(1.2);
}

/* Banners Secundários */
.banners-secundarios {
    margin: 4rem 0;
}

.banner-secundario {
    position: relative;
    height: 250px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.banner-secundario:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.banner-secundario img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-secundario .banner-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.banner-secundario .banner-content {
    padding: 1.5rem;
    max-width: 400px;
}

.banner-secundario .banner-titulo {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    word-wrap: break-word;
}

.banner-secundario .banner-subtitulo {
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.banner-secundario .banner-btn {
    padding: 10px 25px;
    font-size: 0.9rem;
}

/* Banners Laterais */
.banners-laterais {
    position: sticky;
    top: 100px;
}

.banner-lateral {
    position: relative;
    height: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.banner-lateral:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.banner-lateral img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-lateral .banner-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.banner-lateral .banner-content {
    padding: 1.5rem;
    text-align: center;
}

.banner-lateral .banner-titulo {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    word-wrap: break-word;
}

.banner-lateral .banner-subtitulo {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.banner-lateral .banner-btn {
    padding: 8px 20px;
    font-size: 0.8rem;
}

/* Fallback Hero Section (quando não há banners) */
.hero-section {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4)), url('assets/img/banner.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-cta {
    animation: fadeInUp 1s ease 0.4s both;
}

/* Enhanced Section Titles */
.section-title {
    position: relative;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== PRODUCT CARDS COM ALTURA UNIFORME ===== */
.product-card {
    border: none;
    border-radius: calc(var(--border-radius) * 1.5);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-bottom: 30px;
    background-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    
    /* CORREÇÃO: Flexbox para altura uniforme */
    display: flex;
    flex-direction: column;
    height: 100%; /* Importante: ocupa toda altura disponível */
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.product-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-card:hover::before {
    opacity: 0.05;
}

.product-img {
    height: 250px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.4s ease;
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.product-content {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    
    /* CORREÇÃO: Flexbox para distribuir espaço */
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Ocupa o espaço restante */
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    
    /* CORREÇÃO: Limitar altura e número de linhas */
    height: 3.6rem; /* Altura fixa para 2 linhas */
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Máximo 2 linhas */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.product-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.product-price-promo {
    color: #dc3545;
    font-weight: 700;
    font-size: 1.4rem;
}

.product-price-original {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 1rem;
    margin-left: 0.5rem;
}

/* CORREÇÃO: Empurrar botões para o final do card */
.product-content .d-grid {
    margin-top: auto; /* Empurra botão para o final */
}

/* ===== CATEGORY CARDS COM ALTURA UNIFORME ===== */
.category-card {
    border: none;
    border-radius: calc(var(--border-radius) * 1.5);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-bottom: 30px;
    text-align: center;
    background-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    
    /* CORREÇÃO: Altura uniforme para categorias */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.category-card:hover::before {
    opacity: 0.1;
}

.category-img {
    height: 180px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.4s ease;
}

.category-card:hover .category-img {
    transform: scale(1.05);
}

.category-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 1.5rem 0;
    position: relative;
    z-index: 2;
    
    /* CORREÇÃO: Controlar altura do título da categoria */
    height: 3.2rem; /* Altura fixa */
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dropdown Enhancement */
.dropdown-toggle {
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.dropdown-toggle:hover {
    color: var(--accent-color);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: calc(var(--border-radius) * 1.2);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    color: var(--dark-text);
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(5px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Loading Animation */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Enhanced spacing */
.section-spacing {
    padding: 80px 0;
}

.section-spacing-lg {
    padding: 100px 0;
}

/* Banner Loading State */
.banner-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    height: 600px;
    border-radius: var(--border-radius);
}

/* Responsive Design */
@media (max-width: 768px) {
    .banner-titulo {
        white-space: normal;
        font-size: 2.5rem;
        word-wrap: break-word;
        hyphens: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .banner-content {
        padding: 1rem;
        max-width: 90%;
    }
    
    .banner-content.posicao-esquerda,
    .banner-content.posicao-direita {
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .product-img,
    .category-img {
        height: 200px;
    }
    
    .banner-secundario,
    .banner-lateral {
        height: 200px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 45px;
        height: 45px;
    }
    
    .carousel-control-prev {
        left: 15px;
    }
    
    .carousel-control-next {
        right: 15px;
    }
    
    /* CORREÇÃO: Ajustes responsivos para títulos */
    .product-title {
        height: 4.5rem; /* Mais altura no mobile para títulos grandes */
        -webkit-line-clamp: 3; /* Permitir 3 linhas no mobile */
        font-size: 1.1rem;
    }
    
    .category-title {
        height: 4rem;
        -webkit-line-clamp: 3;
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .product-title {
        height: auto; /* No mobile muito pequeno, deixar altura automática */
        -webkit-line-clamp: unset;
        max-height: 4.5rem;
    }
    
    .category-title {
        height: auto;
        -webkit-line-clamp: unset;
        max-height: 4rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus,
.banner-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}