/* === IMAGENS DOS PRODUTOS - ASPECT RATIO MODERNO === */
.fixed-product-image {
    width: 100%;
    aspect-ratio: 1 / 1; /* Sempre quadrado, responsivo */
    object-fit: contain; /* Produto completo, sem corte */
    object-position: center;
    background-color: #f8f9fa; /* Fundo neutro */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Container da imagem */
.product-card-img {
    width: 100%;
    overflow: hidden;
    border-radius: 8px; /* Cantos arredondados suaves */
    background-color: #f8f9fa;
    flex-shrink: 0; /* Não permite que a imagem encolha */
}

/* Hover suave nas imagens - DESKTOP ZOOM */
@media (min-width: 992px) {
    .fixed-product-image:hover {
        transform: scale(1.15); /* Zoom maior desktop */
        cursor: zoom-in;
    }
    
    .product-card-img {
        overflow: hidden;
    }
}

@media (max-width: 991px) {
    .fixed-product-image:hover {
        transform: scale(1.02); /* Zoom sutil mobile */
    }
}

/* === BOTÃO COMPRAR DESTACADO === */
.buy-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3) !important;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

.buy-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4) !important;
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%) !important;
}

.buy-btn:active {
    transform: translateY(0) !important;
}

/* Ripple effect no clique */
.buy-btn:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.buy-btn:active:after {
    width: 300px;
    height: 300px;
}

/* === SAFE AREA (iPhone X+) === */
@supports (padding: env(safe-area-inset-top)) {
    /* Header com safe area */
    .vettor-header {
        padding-top: env(safe-area-inset-top);
    }
    
    /* Ajustar body padding para compensar */
    body {
        padding-top: calc(164px + env(safe-area-inset-top)) !important;
    }
    
    /* Barra inferior com safe area */
    @media (max-width: 768px) {
        .mobile-bottom-nav {
            padding-bottom: calc(6px + env(safe-area-inset-bottom)) !important;
        }
        
        body {
            padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
        }
    }
    
    /* Offcanvas com safe area */
    .offcanvas {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* === LAYOUT DE PREÇO COMPACTO === */
@media (max-width: 768px) {
    .product-card .pix-price,
    .product-card .card-price {
        font-size: 14px !important; /* Era 15px */
        display: inline !important;
    }
    
    .product-card .pix-label,
    .product-card .card-label {
        font-size: 12px !important; /* Era 14px */
        display: inline !important;
    }
    
    .product-card .mb-1 {
        margin-bottom: 0.25rem !important; /* Mais compacto */
    }
    
    .product-card .installment-info {
        font-size: 12px !important; /* Era 14px */
        margin-bottom: 8px !important; /* Era 12px */
    }
}

/* === MICRO-ANIMAÇÕES === */
/* Pulse no badge do carrinho */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.mobile-nav-badge,
#quickBuyCount,
#mobileBottomCartCount {
    animation: pulse 0.5s ease;
}

/* Shake em erro */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease;
}

/* Fade in suave para cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card-wrapper {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

/* Garantir fundo branco nos cards de produtos */
.product-card {
    background-color: #ffffff !important;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    /* Flexbox para estrutura vertical */
    display: flex;
    flex-direction: column;
    height: 100%; /* Ocupa toda altura disponível do grid */
}

.product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.product-card-wrapper:nth-child(1) { animation-delay: 0.05s; }
.product-card-wrapper:nth-child(2) { animation-delay: 0.1s; }
.product-card-wrapper:nth-child(3) { animation-delay: 0.15s; }
.product-card-wrapper:nth-child(4) { animation-delay: 0.2s; }
.product-card-wrapper:nth-child(5) { animation-delay: 0.25s; }
.product-card-wrapper:nth-child(6) { animation-delay: 0.3s; }

/* === BREADCRUMB COMPACTO MOBILE === */
@media (max-width: 768px) {
    .breadcrumb {
        font-size: 0.8rem !important;
        padding: 0.5rem 0 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .breadcrumb-item {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .breadcrumb-item:first-child,
    .breadcrumb-item:last-child {
        max-width: 100px;
    }
}

/* === FILTROS STICKY DESKTOP === */
@media (min-width: 992px) {
    .filters-sidebar {
        position: sticky;
        top: 180px; /* Altura do header + navbar */
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1; /* Ocupar todas as colunas do grid */
}

.empty-state i {
    font-size: 4rem;
    color: #ccc;
    opacity: 0.5;
    margin-bottom: 1rem;
}

.empty-state h4 {
    color: #666;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #999;
    margin-bottom: 1.5rem;
}

/* === SKELETON LOADERS === */
.skeleton-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.skeleton-line.title {
    height: 20px;
}

.skeleton-line.short {
    width: 70%;
}

.skeleton-line.button {
    height: 40px;
    margin-top: 1rem;
}

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

/* === TOAST ANIMADO === */
.animated-toast {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* === GRID DE PRODUTOS - CSS GRID MODERNO === */
/* 
 * SISTEMA DE ALINHAMENTO UNIFORME DOS CARDS
 * 
 * O grid-auto-rows: 1fr garante que todos os cards em uma linha tenham a mesma altura.
 * Combinado com flexbox nos cards internos, isso mantém os botões "COMPRAR" 
 * perfeitamente alinhados independente do conteúdo (nome longo, preço diferente, etc).
 * 
 * Documentação completa: docs/CARDS-PRODUTOS-ALINHAMENTO.md
 */
.products-grid-mobile {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* 2 colunas mobile */
    gap: 0.75rem !important;
    width: 100% !important;
    grid-auto-rows: 1fr; /* IMPORTANTE: Todas as linhas com mesma altura */
}

/* Tablet: 2 colunas */
@media (min-width: 768px) and (max-width: 991px) {
    .products-grid-mobile {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        grid-auto-rows: 1fr; /* Mantém altura uniforme */
    }
}

/* Desktop: 3 colunas */
@media (min-width: 992px) {
    .products-grid-mobile {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.25rem !important;
        grid-auto-rows: 1fr; /* Mantém altura uniforme */
    }
}

/* Desktop grande: 4 colunas */
@media (min-width: 1400px) {
    .products-grid-mobile {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1.5rem !important;
        grid-auto-rows: 1fr; /* Mantém altura uniforme */
    }
}

/* === CARDS DE PRODUTOS - ESTRUTURA FLEXBOX PARA ALINHAMENTO === */
/* 
 * Sistema de distribuição vertical do conteúdo:
 * 1. Imagem: altura fixa (flex-shrink: 0)
 * 2. Título: altura fixa com 2 linhas (flex-shrink: 0)
 * 3. Preço: área flexível que cresce (flex-grow: 1)
 * 4. Botão: altura fixa, sempre no final (margin-top: auto)
 */

/* Cards ocupam todo o espaço disponível */
.product-card-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    height: 100%; /* Crucial: ocupa 100% da célula do grid */
}

.product-card {
    width: 100%;
    height: 100%; /* Ocupa 100% do wrapper */
    display: flex;
    flex-direction: column;
}

/* Container da imagem - altura fixa para consistência */
.product-card .product-card-img {
    flex-shrink: 0; /* Não encolhe */
    margin-bottom: 0.75rem;
}

/* Área de conteúdo flexível que empurra o botão para baixo */
.product-card-content {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important; /* Cresce para ocupar o espaço disponível */
    height: 100% !important;
    min-height: 0; /* Permite que o flex funcione */
}

/* Título com altura fixa para consistência - TODAS AS TELAS */
.product-card .product-heading {
    flex-shrink: 0; /* Não encolhe */
    /* Limitar a 2 linhas com ellipsis em TODAS as telas */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.4 !important;
    min-height: 2.8em !important; /* 2 linhas x 1.4 line-height = 2.8em */
    max-height: 2.8em !important;
    margin-bottom: 0.5rem !important;
}

.product-card .product-heading a {
    display: block !important;
    color: inherit;
    text-decoration: none;
}

/* Container de preço cresce para empurrar botão para baixo */
.product-card .product-price-wrapper {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0; /* Permite que o flex funcione corretamente */
    margin-bottom: 0.5rem; /* Espaço antes do botão */
}

.product-card .retail-price-section,
.product-card .wholesale-price-section {
    display: flex;
    flex-direction: column;
    /* Limitar altura máxima para manter consistência */
    max-height: none; /* Remove limitação para permitir crescimento natural */
}

/* Garantir que linhas de preço tenham altura consistente */
.product-card .retail-price-section p,
.product-card .wholesale-price-section p {
    margin-bottom: 0.25rem !important;
    line-height: 1.3 !important;
}

/* Botão COMPRAR sempre no final */
.product-card .buy-btn {
    margin-top: auto !important; /* Empurra para o final do container flex */
    flex-shrink: 0 !important; /* Não encolhe */
}


.floating-video {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 140px;
    height: 240px;
    z-index: 9999;
    border: 3px solid #000;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    max-width: calc(100vw - 40px) !important;
    max-height: calc(100vh - 40px) !important;
}

/* Mobile: ajustar floating video */
@media (max-width: 768px) {
    .floating-video {
        width: 100px !important;
        height: 180px !important;
        left: 10px !important;
    }
}

@media (max-width: 576px) {
    .floating-video {
        width: 80px !important;
        height: 140px !important;
        left: 5px !important;
    }
}

.floating-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.floating-video .close-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: #fff;
    color: #000;
    border: 1px solid #000;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    line-height: 22px;
    text-align: center;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== CLASSES DE TEXTO GLOBAIS ===== */
.text-white {
    color: #ffffff !important;
}

.text-black {
    color: #000000 !important;
}

.text-dark {
    color: #212529 !important;
}

.text-light {
    color: #f8f9fa !important;
}

.text-primary {
    color: #0d6efd !important;
}

.text-secondary {
    color: #6c757d !important;
}

.text-success {
    color: #198754 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #0dcaf0 !important;
}

/* ===== CLASSES DE FUNDO GLOBAIS ===== */
.bg-dark {
    background-color: #212529 !important;
}

.bg-white {
    background-color: #ffffff !important;
}

.bg-black {
    background-color: #000000 !important;
}

.bg-primary {
    background-color: #0d6efd !important;
}

.bg-secondary {
    background-color: #6c757d !important;
}

.bg-success {
    background-color: #198754 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
}

.bg-info {
    background-color: #0dcaf0 !important;
}

/* ===== ESTILIZAÇÃO DA DESCRIÇÃO DO PRODUTO ===== */

/* Container da descrição do produto */
.product-description {
    font-size: 15px;
    line-height: 1.7;
    color: #495057;
}

/* Texto em negrito na descrição - DESTAQUE ESCURO */
.product-description strong,
.product-description b {
    color: #1a1a1a !important;
}

/* Texto em itálico na descrição */
.product-description em,
.product-description i {
    color: #6c757d !important;
    font-style: italic !important;
    font-weight: 500 !important;
}

/* Parágrafos na descrição */
.product-description p {
    margin-bottom: 16px !important;
    color: #495057 !important;
}

/* Primeira linha da descrição - destaque especial */
.product-description strong {    
    font-weight: 500 !important;
    color: #343a40 !important;
}

/* Lista na descrição */
.product-description ul,
.product-description ol {
    margin: 12px 0 !important;
    padding-left: 20px !important;
}

.product-description li {
    margin-bottom: 6px !important;
    color: #495057 !important;
}

/* Links na descrição */
.product-description a {
    color: #ecac55 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

.product-description a:hover {
    color: #20c997 !important;
    text-decoration: underline !important;
}

/* ===== ESTILOS DO MENU VETTOR-PRINT ===== */

/* Header Principal - Mobile Responsivo */
.vettor-header {
    z-index: 1031;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    top: 32px;
    min-height: 65px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Quando não há alert, header fica no topo */
body.no-alert .vettor-header {
    top: 0 !important;
}

body.no-alert .vettor-navbar {
    top: 92px !important;
}

.vettor-header .container {
    min-height: 65px !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.vettor-header .d-flex {
    /*min-height: 100px;*/
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* ===== BUSCA MOBILE NO RODAPÉ DO HEADER ===== */

/* Campo de busca mobile no rodapé */
.mobile-search-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 12px 0 !important;
    background: rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(5px) !important;
}

/* Input group mobile */
.search-input-group-mobile {
    position: relative !important;
    width: 100% !important;
}

/* Input de busca mobile */
.search-input-mobile {
    border-radius: 25px !important;
    background-color: #ffffff !important;
    border: 2px solid #ffffff !important;
    padding: 12px 60px 12px 20px !important;
    height: 44px !important;
    font-size: 16px !important;
    color: #333 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    width: 100% !important;
}

.search-input-mobile:focus {
    border-color: #ecac55 !important;
    box-shadow: 0 0 0 0.2rem rgba(236, 172, 85, 0.25) !important;
    outline: none !important;
}

.search-input-mobile::placeholder {
    color: #6c757d !important;
    font-style: italic !important;
}

/* Botão de busca mobile */
.btn-search-mobile {
    border-radius: 25px !important;
    background-color: #ffffff !important;
    border: 2px solid #ffffff !important;
    color: #333333 !important;
    width: 60px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    z-index: 10 !important;
    transition: all 0.3s ease !important;
    margin-right: 2px !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
}

.btn-search-mobile:hover {
    background-color: #f8f9fa !important;
    border-color: #f8f9fa !important;
    color: #ecac55 !important;
    transform: scale(1.05) !important;
}

.btn-search-mobile:active {
    transform: scale(0.95) !important;
    background-color: #e9ecef !important;
}

.btn-search-mobile i {
    color: #333333 !important;
    transition: color 0.3s ease !important;
}

.btn-search-mobile:hover i {
    color: #ecac55 !important;
}

/* Ajustar altura do header em mobile - OTIMIZADO COM BUSCA COMPACTA */
@media (max-width: 768px) {
    .vettor-header {
        min-height: 90px !important; /* Era 140px - Reduzido 36% */
    }
    
    .vettor-navbar {
        top: 122px !important;
    }
    
    body.no-alert .vettor-navbar {
        top: 91px !important;
    }
    
    /* Ajustar padding da linha do header */
    .header-top-row {
        padding: 6px 0 !important;
    }
    
    /* Campo de busca mobile COMPACTO */
    .mobile-search-footer {
        padding: 6px 0 !important;
        display: block !important;
    }
    
    .search-input-mobile {
        height: 36px !important;
        padding: 8px 48px 8px 14px !important;
        font-size: 14px !important;
    }
    
    .btn-search-mobile {
        width: 44px !important;
        height: 32px !important;
    }
    
    .btn-search-mobile i {
        font-size: 18px !important;
    }
}

@media (max-width: 576px) {
    .vettor-header {
        min-height: 86px !important; /* Era 130px - Reduzido 34% */
    }
    
    .vettor-navbar {
        top: 118px !important;
    }
    
    body.no-alert .vettor-navbar {
        top: 87px !important;
    }
    
    /* Header ainda mais compacto */
    .header-top-row {
        padding: 4px 0 !important;
    }
    
    /* Campo de busca compacto */
    .mobile-search-footer {
        padding: 4px 0 !important;
    }
    
    .search-input-mobile {
        height: 34px !important;
        padding: 6px 44px 6px 12px !important;
        font-size: 14px !important;
    }
    
    .btn-search-mobile {
        width: 40px !important;
        height: 30px !important;
    }
}

.vettor-header .logo-section img {
    transition: transform 0.3s ease;
}

.vettor-header .logo-section img:hover {
    transform: scale(1.05);
}

/* Logo responsivo */
.logo-img {
    max-height: 60px;
    width: auto;
    transition: all 0.3s ease;
}

/* Logo COMPACTO em mobile - OTIMIZADO */
@media (max-width: 768px) {
    .logo-img {
        max-height: 42px !important; /* Era 85px - Reduzido 50% */
        width: auto !important;
    }
}

@media (max-width: 576px) {
    .logo-img {
        max-height: 38px !important; /* Era 80px - Mais compacto */
        width: auto !important;
    }
}

/* ===== CONTROLES MOBILE MELHORADOS ===== */

/* Botões de ícones mobile */
.mobile-icon-btn {
    color: #ffffff !important;
    text-decoration: none !important;
    border: none !important;
    background: none !important;
    padding: 14px !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    min-width: 56px !important;
    min-height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

.mobile-icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    transform: scale(1.05) !important;
}

.mobile-icon-btn:focus {
    box-shadow: none !important;
    outline: none !important;
}

.mobile-icon-btn:active {
    transform: scale(0.95) !important;
}

/* Ícones mobile maiores */
.mobile-icon-btn i {
    font-size: 32px !important;
    color: #ffffff !important;
    transition: all 0.3s ease !important;
}

/* Ícones específicos com tamanhos otimizados */
.mobile-icon-btn i.bi-person {
    font-size: 36px !important;
}

.mobile-icon-btn i.bi-bag {
    font-size: 36px !important;
}

.mobile-icon-btn:hover i {
    color: #1de9b6 !important;
    transform: scale(1.1) !important;
}

/* Badge do carrinho mobile - COMPACTO */
.mobile-cart-badge {
    font-size: 9px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    width: 16px !important;
    height: 16px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #ecac55 !important;
    color: white !important;
    border-radius: 50% !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    border: 1px solid #000000 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    text-align: center !important;
    overflow: hidden !important;
}

/* Badge mobile com números de 2 dígitos */
.mobile-cart-badge {
    letter-spacing: -0.5px !important;
}

/* Badge mobile para números grandes */
#quickBuyCountMobile.mobile-cart-badge {
    font-size: 10px !important;
    letter-spacing: -0.8px !important;
}

/* Controles Mobile - Layout geral */
.mobile-controls {
    gap: 1rem !important;
}

.mobile-controls .btn-link {
    color: #ffffff !important;
    text-decoration: none !important;
    border: none !important;
    background: none !important;
    padding: 8px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
}

.mobile-controls .btn-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.mobile-controls .btn-link:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* Campo de Busca */
.vettor-header .search-section {
    max-width: 600px;
    margin-left: auto;
}

.vettor-header .search-input-group {
    position: relative;
    border-radius: 25px 25px 25px 25px;
    overflow: hidden;
}

/* Forçar arredondamento do campo de busca */
.vettor-header .search-input-group .form-control,
.vettor-header .search-input,
input[name="q"] {
    border-radius: 20px 0 0 20px !important;
    background-color: #ffffff !important;
    border: 2px solid #ffffff !important;
    padding: 8px 50px 8px 16px !important;
    font-size: 14px !important;
    color: #333 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    height: 40px !important;
}

.vettor-header .search-input:focus {
    border-color: #ecac55;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    outline: none;
}

.vettor-header .search-input::placeholder {
    color: #6c757d;
    font-style: italic;
}

.vettor-header .btn-search {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 20px 20px 0 !important;
    width: 45px !important;
    color: #333 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease;
    z-index: 10 !important;
    height: 40px !important;
}

.vettor-header .btn-search:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Links do Usuário */
.vettor-header .user-links .user-link {
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: left;
    min-width: 120px;
    display: flex;
    align-items: center;
}

.vettor-header .user-links .user-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.vettor-header .user-links .user-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.vettor-header .user-links .user-link svg {
    width: 35px;
    height: 35px;
    color: #ffffff !important;
    margin-right: 8px;
    display: block !important;
    fill: currentColor !important;
    flex-shrink: 0;
}

/* Badge do carrinho */
.vettor-header .user-links .user-link #quickBuyCount {
    font-size: 10px !important;
    min-width: 18px !important;
    height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 8px !important;
    background-color: #ecac55 !important;
    color: white !important;
    border-radius: 50% !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

.vettor-header .user-links .user-link i {
    font-size: 29px;
    color: #ffffff !important;
    margin-right: 8px;
    display: block !important;
    font-family: "bootstrap-icons" !important;
    font-style: normal !important;
    font-weight: normal !important;
    line-height: 1 !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    flex-shrink: 0;
}

.vettor-header .user-links .user-text {
    line-height: 1.2;
    font-size: 13px;
    white-space: normal;
    text-align: left;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 0.2px;
}

/* Badge do Carrinho */
.vettor-header #quickBuyCount {
    font-size: 12px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Menu de Navegação - Mobile Responsivo */
.vettor-navbar {
    z-index: 1030;
    padding: 0px 0 0 0 !important;
    position: fixed;
    /*top: 100px !important;*/
    top: 91px !important;
    left: 0;
    right: 0;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important; /* MUDANÇA CRÍTICA: permite dropdown aparecer */
}

.vettor-navbar .container > div {
    justify-content: center !important;
    overflow: visible !important; /* MUDANÇA CRÍTICA: permite dropdown aparecer */
}

.vettor-navbar .container {
    overflow: visible !important; /* MUDANÇA CRÍTICA: permite dropdown aparecer */
}

.vettor-navbar .navbar-nav {
    justify-content: center;
    width: 100%;
    gap: 0.5rem;
}

.vettor-navbar .navbar-nav .nav-link {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
    padding: 12px 12px!important;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.vettor-navbar .navbar-nav .nav-item {
    margin: 0 5px;
}

.vettor-navbar .navbar-nav .menu-link:hover {
    background-color: transparent;
    color: #ffffff !important;
    transform: none;
}

.vettor-navbar .navbar-nav .menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.vettor-navbar .navbar-nav .menu-link:hover::after {
    width: 100%;
}

/* Dropdown Menu */
.vettor-navbar .dropdown {
    position: relative !important;
}

.vettor-navbar .dropdown-menu {
    background: linear-gradient(145deg, #000000, #0a0a0a) !important;
    border: 1px solid #ecac55 !important;
    border-radius: 12px !important;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(236, 172, 85, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    margin-top: 4px !important;
    z-index: 9999 !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    min-width: 240px !important;
    display: none !important;
    padding: 12px 0 !important;
    backdrop-filter: blur(10px) !important;
    border-top: 2px solid #ecac55 !important;
}

.vettor-navbar .dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Hover effect para o dropdown toggle - MELHORADO */
.vettor-navbar .dropdown-toggle {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    position: relative !important;
}

.vettor-navbar .dropdown:hover .dropdown-toggle {
    background: linear-gradient(135deg, rgba(236, 172, 85, 0.15), rgba(236, 172, 85, 0.08)) !important;
    color: #ecac55 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(236, 172, 85, 0.2) !important;
}

/* Efeito de "glow" sutil */
.vettor-navbar .dropdown:hover .dropdown-toggle::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(236, 172, 85, 0.1), transparent);
    border-radius: 8px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vettor-navbar .dropdown:hover .dropdown-toggle::before {
    opacity: 1;
}

/* Animação da setinha no hover - MELHORADA */
.vettor-navbar .dropdown-toggle i {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-size: 12px !important;
    margin-left: 6px !important;
    transform-origin: center !important;
}

.vettor-navbar .dropdown:hover .dropdown-toggle i,
.vettor-navbar .dropdown.show .dropdown-toggle i {
    transform: rotate(180deg) scale(1.1) !important;
    color: #ecac55 !important;
}

/* CSS puro para hover como fallback - FORÇADO */
.vettor-navbar .navbar-nav .dropdown:hover > .dropdown-menu,
.vettor-navbar .navbar-nav .dropdown.show > .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    z-index: 9999 !important;
    position: absolute !important;
    top: calc(100% - 2px) !important;
    left: 0 !important;
}

/* CSS específico por classe para debug */
.d-none.d-xl-flex .dropdown:hover .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Override qualquer estilo Bootstrap que possa interferir */
.navbar-nav .dropdown-menu {
    position: absolute !important;
}

.navbar-nav .dropdown-menu.show {
    display: block !important;
}

/* TESTE DIRETO - FORÇAR HOVER EM QUALQUER DROPDOWN */
.navbar-nav .nav-item.dropdown:hover .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 9999 !important;
    background-color: #000000 !important;
    border: 1px solid #28a745 !important;
    border-radius: 8px !important;
    min-width: 220px !important;
    padding: 8px 0 !important;
}

/* Forçar posicionamento correto */
.vettor-navbar .nav-item.dropdown {
    position: relative !important;
}

/* Garantir que o dropdown não seja cortado */
.vettor-navbar .container {
    overflow: visible !important;
}

.vettor-navbar .navbar-nav {
    overflow: visible !important;
}

/* Garantir que os itens do menu não quebrem linha */
.vettor-navbar .navbar-nav {
    flex-wrap: nowrap;
    overflow: visible !important; /* MUDANÇA CRÍTICA: permite dropdown aparecer */
}

.vettor-navbar .navbar-nav::-webkit-scrollbar {
    display: none;
}

.vettor-navbar .navbar-nav {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Itens do dropdown - MELHORADOS */
.vettor-navbar .dropdown-item {
    color: #ffffff !important;
    padding: 14px 20px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 8px !important;
    margin: 2px 8px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    position: relative !important;
    overflow: hidden !important;
    text-decoration: none !important;
}

.vettor-navbar .dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #ecac55;
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom;
}

.vettor-navbar .dropdown-item:hover {
    background: linear-gradient(135deg, rgba(236, 172, 85, 0.15), rgba(236, 172, 85, 0.08)) !important;
    color: #ffffff !important;
    transform: translateX(4px) !important;
    box-shadow: 0 2px 8px rgba(236, 172, 85, 0.2) !important;
}

.vettor-navbar .dropdown-item:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

/* Efeito especial no primeiro item */
.vettor-navbar .dropdown-item:first-child {
    margin-top: 4px !important;
}

.vettor-navbar .dropdown-item:last-child {
    margin-bottom: 4px !important;
}

/* Melhorias de Acessibilidade */
.vettor-navbar .dropdown-item:focus {
    /*outline: 2px solid #ecac55 !important;*/
    outline-offset: 2px !important;
    background: linear-gradient(135deg, rgba(236, 172, 85, 0.15), rgba(236, 172, 85, 0.08)) !important;
}

/* Reduzir movimento para usuários sensíveis */
@media (prefers-reduced-motion: reduce) {
    .vettor-navbar .dropdown-toggle,
    .vettor-navbar .dropdown-toggle i,
    .vettor-navbar .dropdown-item {
        transition: none !important;
    }
    
    .vettor-navbar .dropdown:hover .dropdown-toggle {
        transform: none !important;
    }
    
    .vettor-navbar .dropdown-item:hover {
        transform: none !important;
    }
}

/* Melhor contraste para high contrast mode */
@media (prefers-contrast: high) {
    .vettor-navbar .dropdown-menu {
        border: 2px solid #ecac55 !important;
        background: #000000 !important;
    }
    
    .vettor-navbar .dropdown-item {
        border-bottom: 1px solid rgba(236, 172, 85, 0.3) !important;
    }
}

/* Menu Mobile - DESIGN PREMIUM */
#mobileMenu {
    width: 320px !important;
    max-width: 90vw;
    background: linear-gradient(145deg, #000000, #1a1a1a) !important;
    border-right: 2px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 
        4px 0 20px rgba(0, 0, 0, 0.5),
        inset -1px 0 0 rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px) !important;
}

/* Header Mobile Elegante */
#mobileMenu .offcanvas-header {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 24px 20px !important;
    position: relative;
}

#mobileMenu .offcanvas-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

#mobileMenu .offcanvas-title {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

#mobileMenu .btn-close-white {
    opacity: 0.8 !important;
    transition: all 0.3s ease !important;
    filter: brightness(0) invert(1) !important;
}

#mobileMenu .btn-close-white:hover {
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

#mobileMenu .offcanvas-body {
    padding: 24px 16px !important;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Navigation Items - PREMIUM DESIGN */
#mobileMenu .navbar-nav {
    flex-direction: column;
    width: 100%;
    gap: 4px;
}

#mobileMenu .navbar-nav .nav-item {
    width: 100%;
    margin-bottom: 0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

#mobileMenu .navbar-nav .nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.2));
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

#mobileMenu .navbar-nav .nav-item:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

#mobileMenu .navbar-nav .nav-link {
    padding: 18px 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    position: relative !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 12px !important;
    margin: 0 4px !important;
    width: calc(100% - 8px) !important;
}

#mobileMenu .navbar-nav .nav-link:last-child {
    border-bottom: none !important;
}

#mobileMenu .navbar-nav .nav-link:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)) !important;
    color: #ffffff !important;
    transform: translateX(6px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

/* Dropdown Mobile - PREMIUM DESIGN */
#mobileMenu .dropdown-menu {
    background: linear-gradient(145deg, rgba(16, 20, 26, 0.95), rgba(8, 10, 13, 0.98)) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    margin: 8px 0 8px 12px !important;
    padding: 12px 0 !important;
    position: static !important;
    display: none !important;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(8px) !important;
    border-left: 3px solid rgba(255, 255, 255, 0.2) !important;
    overflow: hidden;
}

#mobileMenu .dropdown-menu.show {
    display: block !important;
    animation: slideDownMobile 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideDownMobile {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        max-height: 400px;
    }
}

#mobileMenu .dropdown-item {
    color: #ffffff !important;
    padding: 14px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    margin: 0 8px !important;
    border-radius: 8px !important;
}

#mobileMenu .dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3));
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileMenu .dropdown-item:last-child {
    border-bottom: none !important;
}

#mobileMenu .dropdown-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)) !important;
    color: #ffffff !important;
    transform: translateX(4px) !important;
    border-bottom-color: rgba(255, 255, 255, 0.15) !important;
}

#mobileMenu .dropdown-item:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

/* Ícone de seta no menu mobile - SUTIL */
#mobileMenu .nav-link i {
    font-size: 11px !important;
    opacity: 0.6 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    transition: all 0.3s ease !important;
    margin-left: auto !important;
}

#mobileMenu .nav-link[aria-expanded="true"] i {
    transform: rotate(180deg);
    opacity: 0.8 !important;
}

/* Hover sutil na seta */
#mobileMenu .nav-link:hover i {
    opacity: 0.9 !important;
}

/* Responsividade */
@media (max-width: 1199.98px) {
    .vettor-header .search-section {
        max-width: 300px;
    }
    
    .vettor-header .user-links .user-text {
        font-size: 12px;
    }
    
    .vettor-header .user-links .user-link {
        min-width: 70px;
        padding: 6px 8px;
    }
}

@media (max-width: 991.98px) {
    .vettor-header .search-section {
        max-width: 250px;
    }
    
    .vettor-header .user-links {
        gap: 2rem !important;
    }
}

@media (max-width: 767.98px) {
    .vettor-header .search-section {
        max-width: 200px;
    }
    
    .vettor-header .user-links {
        gap: 1rem !important;
    }
    
    .vettor-header .user-links .user-link {
        padding: 6px 8px;
    }
    
    .vettor-navbar {
        padding: 10px 0;
    }
}

@media (max-width: 767.98px) {
    /* Logo menor em mobile */
    .logo-img {
        max-height: 60px !important;
    }
    
    /* Header mais compacto em mobile */
    .vettor-header .d-flex {
        min-height: 70px;
    }
    
    .vettor-header .container > div {
        padding: 10px 0;
    }
}

@media (max-width: 575.98px) {
    .vettor-header .search-section {
        display: none;
    }
    
    .vettor-header .user-links {
        gap: 0.5rem !important;
    }
    
    .vettor-header .user-links .user-link {
        padding: 4px 6px;
    }
    
    .vettor-header .user-links .user-link i {
        font-size: 16px;
    }
    
    /* Header mais compacto */
    .vettor-header .d-flex {
        min-height: 70px !important;
    }
    
    .vettor-header .container > div {
        padding: 10px 0 !important;
    }
    
    /* Ícones mobile ainda maiores em telas pequenas */
    .mobile-icon-btn {
        min-width: 52px !important;
        min-height: 52px !important;
        padding: 12px !important;
    }
    
    .mobile-icon-btn i {
        font-size: 30px !important;
    }
    
    /* Ícones específicos responsivos para telas menores */
    .mobile-icon-btn i.bi-person {
        font-size: 36px !important;
    }

    .mobile-icon-btn i.bi-bag {
        font-size: 31px !important;
    }
    
    /* Badge do carrinho menor em telas pequenas */
    .mobile-cart-badge { 
        min-width: 25px !important;
        width: 25px !important;
        height: 25px !important;
        top:30px !important;
    }
    
    /* Controles mobile com espaçamento otimizado */
    .mobile-controls {
        gap: 0.75rem !important;
    }
    
    /* Menu mobile em telas muito pequenas */
    #mobileMenu {
        width: 100vw !important;
        max-width: 100vw;
    }
    
    #mobileMenu .offcanvas-body {
        padding: 15px;
    }
    
    #mobileMenu .navbar-nav .nav-link {
        padding: 12px 0;
        font-size: 13px;
    }
    
    #mobileMenu .dropdown-item {
        padding: 10px 15px !important;
        font-size: 12px !important;
    }
    
    /* Enhanced Mobile Menu Button - Full Width Touch Area for Small Screens */
    .mobile-hamburger-container {
        width: 70px !important;
        padding: 10px;
        margin-right: -10px;
    }
    
    .vettor-print-hamburger {
        width: 54px !important;
        height: 54px !important;
    }
    
    .vettor-print-hamburger i {
        font-size: 22px !important;
    }
}

/* ===== ESTILOS APRIMORADOS DO MENU HAMBÚRGUER VETTOR-PRINT ===== */

/* Container do Menu Hambúrguer - Área de Toque Ampliada */
.mobile-hamburger-container {
    padding: 8px;
    margin-right: -8px;
    border-radius: 16px;
    transition: background-color 0.3s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(236, 172, 85, 0.2);
}

.mobile-hamburger-container:active {
    background-color: rgba(236, 172, 85, 0.1);
}

/* Botão Hambúrguer Aprimorado */
.vettor-print-hamburger {
    transition: all 0.3s ease;
    border-radius: 12px !important;
    backdrop-filter: blur(10px);
    background: rgba(16, 20, 26, 0.8) !important;
    border: 1.5px solid rgba(236, 172, 85, 0.4) !important;
    padding: 0.5rem !important;
    width: 56px !important;
    height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.vettor-print-hamburger:hover {
    background: rgba(236, 172, 85, 0.15) !important;
    border-color: rgba(236, 172, 85, 0.6) !important;
    transform: scale(1.05);
    color: #ffffff !important;
}

.vettor-print-hamburger:active {
    transform: scale(0.95);
}

.vettor-print-hamburger:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(236, 172, 85, 0.3) !important;
}

.vettor-print-hamburger i {
    transition: all 0.3s ease;
    color: #ffffff !important;
    font-size: 24px !important;
}

.vettor-print-hamburger:hover i {
    color: #ecac55 !important;
    transform: scale(1.1);
}

/* Responsive adjustments for medium screens */
@media (max-width: 768px) {
    .mobile-hamburger-container {
        padding: 10px;
        margin-right: -10px;
    }
    
    .vettor-print-hamburger {
        width: 52px !important;
        height: 52px !important;
    }
    
    .vettor-print-hamburger i {
        font-size: 37px !important;
    }
}

/* ===== CORREÇÕES PARA PREVENIR SCROLL HORIZONTAL MOBILE ===== */

/* Layout base - prevenir overflow horizontal */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    position: relative !important;
}

/* Container responsivo */
.container, .container-fluid {
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow-x: hidden !important;
}

/* Rows do Bootstrap - prevenir overflow */
.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
}

/* Colunas Bootstrap - respeitando viewport */
[class*="col-"] {
    padding-left: 8px !important;
    padding-right: 8px !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Imagens responsivas */
img, video {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* Elementos de largura fixa que podem causar problemas */
.swiper-container, .swiper {
    max-width: 100% !important;
    overflow: hidden !important;
}

.swiper-wrapper {
    max-width: 100% !important;
}

.swiper-slide {
    max-width: 100% !important;
    word-wrap: break-word !important;
}

/* Tabelas responsivas */
table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
}

/* Elementos de texto - prevenir overflow */
h1, h2, h3, h4, h5, h6, p, span, div {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
}

/* Inputs e forms */
input, select, textarea, .form-control {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* ===== CORREÇÕES CRÍTICAS PARA OFFCANVAS MOBILE ===== */

/* Corrigir larguras fixas que causam scroll horizontal */
#offcanvasSearchProduct,
#cartOffcanvas {
    width: 500px !important;
    max-width: 100vw !important;
}

/* Mobile: Offcanvas responsivo - LARGURA TOTAL */
@media (max-width: 768px) {
    #offcanvasSearchProduct,
    #cartOffcanvas,
    .offcanvas {
        width: 100vw !important; /* Largura total em mobile */
        max-width: 100vw !important;
        right: 0 !important;
        left: auto !important;
    }
}

/* Tablet: Offcanvas ocupa 70% */
@media (min-width: 769px) and (max-width: 1024px) {
    #offcanvasSearchProduct,
    #cartOffcanvas {
        width: 70vw !important;
        max-width: 70vw !important;
    }
}

@media (max-width: 576px) {
    #offcanvasSearchProduct,
    #cartOffcanvas,
    .offcanvas {
        width: 100vw !important;
        max-width: 100vw !important;
    }
    
    .offcanvas-end {
        right: 0 !important;
        left: auto !important;
    }
    
    /* Padding interno mais compacto em mobile */
    .offcanvas-header {
        padding: 1rem !important;
    }
    
    .offcanvas-body {
        padding: 1rem !important;
    }
}

/* Ajuste para o conteúdo não ficar atrás do header fixo */
body {
    padding-top: 200px; /* Altura do alerta + header + menu de navegação */
}

/* Quando não há alert, reduzir padding */
body.no-alert {
    padding-top: 132px; /* Altura do header + menu de navegação */
}

/* Mobile: ajuste para nova altura do header COM busca compacta - OTIMIZADO */
@media (max-width: 768px) {
    body {
        padding-top: 172px; /* Era 220px - Reduzido 48px */
    }
    
    body.no-alert {
        padding-top: 140px; /* Era 188px - Reduzido 48px */
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 166px; /* Era 210px - Reduzido 44px */
    }
    
    body.no-alert {
        padding-top: 134px; /* Era 178px - Reduzido 44px */
    }
}

@media (max-width: 1199.98px) and (min-width: 769px) {
    body {
        padding-top: 160px; /* Altura do alerta + header em tablet */
    }
    
    body.no-alert {
        padding-top: 100px; /* Altura do header em tablet sem alert */
    }
}

/* ===== RESPONSIVE UTILITIES ESPECÍFICAS MOBILE ===== */

/* Mobile First - ajustes gerais */
@media (max-width: 768px) {
    /* Reduzir padding lateral em mobile */
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Colunas mais compactas em mobile */
    [class*="col-"] {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    
    /* Textos menores em mobile para evitar overflow */
    .display-1, .display-2 {
        font-size: 2.5rem !important;
    }
    
    .display-3, .display-4 {
        font-size: 2rem !important;
    }
    
    .display-5, .display-6 {
        font-size: 1.5rem !important;
    }
    
    /* Buttons responsivos */
    .btn {
        font-size: 14px !important;
        padding: 8px 16px !important;
    }
    
    /* Cards responsivos */
    .card {
        margin-bottom: 1rem !important;
    }
    
    /* Grid gaps menores em mobile */
    .row.gy-6 {
        row-gap: 1.5rem !important;
    }
    
    .row.gx-4 {
        column-gap: 0.5rem !important;
    }
}

/* Mobile Extra Small - ajustes específicos */
@media (max-width: 576px) {
    /* Container mais compacto */
    .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    
    /* Textos ainda menores */
    h1 {
        font-size: 1.8rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.3rem !important;
    }
    
    /* Buttons compactos */
    .btn {
        font-size: 13px !important;
        padding: 6px 12px !important;
    }
    
    /* Grid super compacto */
    [class*="col-"] {
        padding-left: 3px !important;
        padding-right: 3px !important;
    }
}

/* Alerta de topo */
.alert[data-edit-target="header:alert"] {
    z-index: 1033;
    position: fixed;
    top: 0;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* ===== MELHORIAS ESPECÍFICAS PARA EXPERIÊNCIA MOBILE ===== */

/* Smooth scrolling e performance */
html {
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
}

body {
    overscroll-behavior: contain !important;
    -webkit-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
}

/* Touch improvements */
button, .btn, a, [role="button"] {
    -webkit-tap-highlight-color: rgba(236, 172, 85, 0.2) !important;
    touch-action: manipulation !important;
}

/* Prevent zoom on inputs - iOS */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea,
select {
    font-size: 16px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* Improve tap targets */
.btn, button {
    min-height: 44px !important;
    min-width: 44px !important;
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
    /* Ensure touch targets are adequate */
    .nav-link, .navbar-nav .nav-link {
        padding: 12px 16px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    /* Improve mobile menu spacing */
    .mobile-controls .btn-link {
        min-height: 44px !important;
        min-width: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Better product cards on mobile */
    .card {
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        transition: transform 0.2s ease !important;
    }
    
    .card:active {
        transform: scale(0.98) !important;
    }
    
    /* Improve form elements */
    .form-control {
        border-radius: 8px !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
    }
    
    /* Better spacing for content */
    section {
        padding: 1.5rem 0 !important;
    }
    
    .py-6 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .py-8 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Extra small devices optimizations */
@media (max-width: 576px) {
    /* Very compact spacing */
    section {
        padding: 1rem 0 !important;
    }
    
    .py-6, .py-8 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    /* Smaller text for very small screens */
    .lead {
        font-size: 1rem !important;
    }
    
    /* Compact buttons */
    .btn-lg {
        padding: 8px 16px !important;
        font-size: 14px !important;
    }
    
    /* Better modal and offcanvas on very small screens */
    .modal-dialog {
        margin: 0.5rem !important;
    }
    
    .offcanvas-header {
        padding: 0.75rem !important;
    }
    
    .offcanvas-body {
        padding: 0.75rem !important;
    }
}

/* High DPI displays optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
    }
}

/* ===== ESTILOS PARA SUBMENUS MULTINÍVEL ===== */

/* Submenu dropdown geral */
.dropdown-submenu {
    position: relative !important;
}

.dropdown-submenu > .dropdown-menu {
    top: 0 !important;
    left: 100% !important;
    margin-top: -1px !important;
    margin-left: -1px !important;
    border-radius: 0 8px 8px 8px !important;
    background-color: #000000 !important;
    border: 1px solid #28a745 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    z-index: 9999 !important;
    min-width: 180px !important;
}

/* Submenu dropdown para desktop */
.dropdown-submenu > .dropdown-toggle:after {
    display: none !important;
}

.dropdown-submenu > .dropdown-toggle::before {
    content: none !important;
}

/* Estilo do link com seta */
.dropdown-submenu .dropdown-toggle {
    position: relative !important;
    padding-right: 35px !important;
}

.dropdown-submenu .dropdown-toggle i {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 12px !important;
    color: #ffffff !important;
    transition: transform 0.3s ease !important;
}

/* Hover e focus states */
.dropdown-submenu:hover > .dropdown-menu,
.dropdown-submenu:focus-within > .dropdown-menu {
    display: block !important;
}

.dropdown-submenu .dropdown-toggle:hover i,
.dropdown-submenu .dropdown-toggle:focus i {
    transform: translateY(-50%) translateX(2px) !important;
    color: #ecac55 !important;
}

/* Hover state for submenu items */
.dropdown-submenu .dropdown-item:hover {
    background-color: #ecac55 !important;
    color: #ffffff !important;
}

/* Submenu items styling */
.submenu-dropdown .dropdown-item {
    color: #ffffff !important;
    padding: 10px 18px !important;
    font-size: 13px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
}

.submenu-dropdown .dropdown-item:last-child {
    border-bottom: none !important;
}

.submenu-dropdown .dropdown-item:hover {
    background-color: #ecac55 !important;
    color: #ffffff !important;
    padding-left: 22px !important;
}

/* Indicador visual para submenu aninhado */
.dropdown-submenu .dropdown-submenu .dropdown-toggle {
    padding-left: 25px !important;
}

.dropdown-submenu .dropdown-submenu .dropdown-toggle::before {
    content: "└" !important;
    position: absolute !important;
    left: 8px !important;
    color: #6c757d !important;
    font-size: 12px !important;
}

/* ===== ESTILOS PARA SUBMENUS MOBILE ===== */

/* Mobile submenu behavior */
@media (max-width: 1199.98px) {
    /* Para mobile, usamos collapse ao invés de hover */
    .dropdown-submenu > .dropdown-menu {
        position: static !important;
        float: none !important;
        box-shadow: none !important;
        border: none !important;
        border-left: 2px solid #ecac55 !important;
        border-radius: 0 !important;
        margin-left: 15px !important;
        margin-top: 5px !important;
        background-color: rgba(0, 0, 0, 0.8) !important;
        display: none !important;
    }
    
    .dropdown-submenu > .dropdown-menu.show {
        display: block !important;
    }
    
    /* Ajustar seta para mobile */
    .dropdown-submenu .dropdown-toggle i {
        right: 8px !important;
        font-size: 14px !important;
        transition: transform 0.3s ease !important;
    }
    
    /* Rotacionar seta quando expandido */
    .dropdown-submenu .dropdown-toggle[aria-expanded="true"] i {
        transform: translateY(-50%) rotate(90deg) !important;
    }
    
    /* Melhor visualização para itens mobile */
    .submenu-dropdown .dropdown-item {
        padding: 12px 20px !important;
        font-size: 14px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    }
    
    /* Aninhamento visual mais claro em mobile */
    .dropdown-submenu .dropdown-submenu .dropdown-toggle {
        padding-left: 30px !important;
        font-size: 13px !important;
    }
    
    .dropdown-submenu .dropdown-submenu .submenu-dropdown .dropdown-item {
        padding-left: 35px !important;
        font-size: 12px !important;
    }
}

/* ===== MELHORIAS DE PERFORMANCE E ACESSIBILIDADE ===== */

/* Melhor performance para transições */
.dropdown-submenu .dropdown-menu {
    will-change: transform, opacity !important;
    transition: all 0.2s ease !important;
}

/* Hover delays para prevenir flicker */
.dropdown-submenu:hover > .dropdown-menu {
    transition-delay: 0.1s !important;
}

/* Focus states para acessibilidade */
.dropdown-submenu .dropdown-toggle:focus {
    outline: 2px solid #ecac55 !important;
    outline-offset: 2px !important;
}

/* Cursor pointer para elementos interativos */
.dropdown-submenu .dropdown-toggle {
    cursor: pointer !important;
}

/* Prevenção de clique duplo */
.dropdown-submenu .dropdown-toggle {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* ===== DROPDOWN ESPECIAL PARA DESKTOP ===== */

/* Desktop: melhor posicionamento */
@media (min-width: 1200px) {
    /* Garantir que dropdowns principais funcionem em desktop */
    .vettor-navbar .dropdown {
        position: relative !important;
    }
    
    .vettor-navbar .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        display: none !important;
    }
    
    .vettor-navbar .dropdown-menu.show {
        display: block !important;
    }
    
    /* Submenus específicos */
    .dropdown-submenu > .dropdown-menu {
        left: calc(100% - 10px) !important;
        border-radius: 8px !important;
        padding: 8px 0 !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25) !important;
    }
    
    .submenu-dropdown .dropdown-item {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
}
    