/* Custom CSS for elements not easily styled with Tailwind */

/* Remover sublinhado de todos os links globalmente */
a {
    text-decoration: none !important;
}

/* Sobrescrever Bootstrap .bg-primary para usar cor do catálogo */
.bg-primary {
    background-color: var(--primary, #254e88) !important;
}

/* Sobrescrever Bootstrap .text-primary para usar cor do menu catálogo */
.text-primary {
    color: #000000 !important;
}

.dropdown:hover .dropdown-menu {
    display: block;
}
/* Garante estado inicial oculto do dropdown de categorias */
nav.menu-catalago .dropdown .dropdown-menu { display: none; }
nav.menu-catalago .dropdown:hover .dropdown-menu { display: block; }

/* Hero Carousel Styles */
.carousel-inner {
    display: flex;
    width: 100%;
    height: 100%;
}

.carousel-item {
    flex: 0 0 100%;
    height: 100%;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 10;
}

#hero-carousel {
    min-height: 0;
    height: auto;
    max-height: 100vh;
    overflow: hidden;
}

#hero-carousel img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    min-height: 0;
}

@media (min-width: 768px) {
    #hero-carousel {
        height: 400px;
    }
    #hero-carousel img {
        min-height: 400px;
    }
}

/* Carousel Controls */
.carousel-control {
    z-index: 20;
    font-size: 24px;
    cursor: pointer;
}

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

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

/* Product Card Styles */
.product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    height: auto;
}

.product-card img {
    height: 10rem;
    object-fit: contain;
    margin-bottom: 1rem;
}

.product-card .promo-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.product-card p {
    font-size: 0.75rem; /* 12px */
    color: #d1d5db;
    margin-bottom: 0.25rem;
}

.product-card h3 {
    font-size: 0.875rem; /* 14px */
    color: #1f2937;
    font-weight: bold;
    margin-bottom: 0.25rem;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.5rem;
}

.product-card .mt-auto {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.product-card .text-red-500 {
    font-size: 1.25rem; /* 20px */
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.product-card button,
.product-card a.whatsapp-buy {
    margin-top: 0.25rem;
    font-size: 0.75rem !important;
    text-align: center;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.product-card button.add-to-cart {
    background-color: #3b82f6;
    color: white;
}

.product-card button.add-to-cart:hover {
    background-color: #2563eb;
}

.product-card a.whatsapp-buy {
    background-color: #10b981;
    color: white;
    text-decoration: none;
    display: block;
}

.product-card a.whatsapp-buy:hover {
    background-color: #059669;
}

.product-card button:disabled,
.product-card button.cursor-not-allowed {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.product-card button:disabled.whatsapp-buy,
.product-card button.cursor-not-allowed.whatsapp-buy {
    background-color: #6ee7b7;
    cursor: not-allowed;
}

/* Hover Effect */
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Mobile Stack */
@media (max-width: 768px) {
    .mobile-stack {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Touch targets maiores para mobile */
    .product-card button,
    .product-card a.whatsapp-buy {
        min-height: 48px; /* 48px para melhor experiência mobile */
        padding: 0.875rem 1.25rem;
        font-size: 1rem; /* 16px - melhor legibilidade */
    }
}

/* Cookie Banner Styles */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    font-size: 14px;
    max-height: 60px;
    overflow: hidden;
    box-sizing: border-box;
}

#cookie-banner a {
    color: white;
    text-decoration: underline;
}

#cookie-banner button {
    background-color: #228B22;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

#cookie-banner button:hover {
    background-color: #006400;
}

/* Sidebar Cart Styles */
#sidebar-cart {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: white;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
    transition: right 0.3s ease;
    z-index: 1000;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow-x: hidden;
}

#sidebar-cart.open {
    right: 0;
}

@media (min-width: 768px) {
  #sidebar-cart {
    width: 440px;
  }
}

#close-cart {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* Ajuste do badge do carrinho no mobile */
@media (max-width: 768px) {
  [data-cart="amount"] {
    margin-top: -6px;
  }
}

#cart-items {
    margin-top: 20px;
    flex: 1 1 auto;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0px;
}

/* Texto longo reduzido em uma linha com reticências */
.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Rodapé fixo dentro do carrinho */
.cart-footer {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    padding-top: 8px;
    padding-bottom: 8px;
    border-top: 1px solid #e5e7eb; /* tailwind gray-200 */
}

/* Altura do input de quantidade */
.qty-input {
    height: 32px;
    line-height: 32px;
}

/* Duas linhas com reticências */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Global Overflow Control */
html, body {
    height: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    overflow-y: auto;
}

/* Carousel Slide Styles */
.carousel-slide {
    transition: transform 0.3s ease-in-out;
}

/* Marquee/rolagem contínua para carrosséis */
.continuous-marquee {
    display: flex;
    gap: 1.5rem; /* 24px para combinar com .gap-6 */
    animation: marquee var(--marquee-duration, 30s) linear infinite;
    will-change: transform;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(calc(var(--scroll-distance, 0px) * -1)); }
}

#promotions-carousel {
    padding-bottom: 10px;
}

.carousel-inner {
    width: 100%;
    height: 100%;
}
.carousel-item {
    min-height: 100%;
}

#promotions-prev,
#promotions-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#promotions-prev {
    left: -1rem;
}

#promotions-next {
    right: -1rem;
}

@media (max-width: 640px) {
    #promotions-prev,
    #promotions-next {
        display: none;
    }
}

.h-80 {
  height: 28rem!important;
  margin-bottom: 10px;
}

#hero-carousel {
    overflow: visible;
}
.carousel-inner {
    width: 400%; /* 100% per item */
    height: 100%;
}
.carousel-item {
    min-height: 100%;
}

.carousel-slide {
    display: flex;
    gap: 1.5rem;
    scroll-behavior: smooth;
}

#new-arrivals-carousel,
#featured-carousel,
#promotions-carousel,
#brands-carousel {
    overflow: hidden;
}

/* Evita interação em clones para não gerar cliques inativos */
.continuous-marquee [data-clone="1"] .whatsapp-buy,
.continuous-marquee [data-clone="1"] .add-to-cart {
    pointer-events: none;
}

/* Banner Carousel Custom Styles - Mobile First */
#banner-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 25vh; /* Proporcional ao viewport - Mobile */
    max-height: 250px;
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    #banner-carousel {
        height: 30vh;
        max-height: 300px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    #banner-carousel {
        height: 35vh;
        max-height: 400px;
    }

    /* Ocultar swipe indicator em tablet+ */
    .swipe-indicator {
        display: none !important;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    #banner-carousel {
        height: 40vh;
        max-height: 450px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    #banner-carousel {
        height: 45vh;
        max-height: 500px;
    }
}

#banner-carousel .banner-inner {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
    height: 100%;
}

#banner-carousel .banner-item {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
}

#banner-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

#banner-prev,
#banner-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#banner-prev {
    left: 0.5rem;
}

#banner-next {
    right: 0.5rem;
}

/* Desktop: botões maiores */
@media (min-width: 768px) {
    #banner-prev {
        left: 1rem;
        padding: 0.75rem;
    }

    #banner-next {
        right: 1rem;
        padding: 0.75rem;
    }
}

/* Hover effects */
#banner-prev:hover,
#banner-next:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Active/pressed state */
#banner-prev:active,
#banner-next:active {
    transform: translateY(-50%) scale(0.95);
}

#banner-carousel .banner-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: manipulation;
}

#banner-carousel .banner-dot.active {
    background-color: #fff;
    opacity: 1;
    transform: scale(1.2);
}

/* Mobile: dots menores */
@media (max-width: 767px) {
    #banner-carousel .banner-dot {
        width: 0.625rem;
        height: 0.625rem;
    }

    #banner-carousel .banner-dot.active {
        width: 0.875rem;
        height: 0.875rem;
    }

    /* Não ocultar botões em mobile, apenas ajustar */
    #banner-prev,
    #banner-next {
        display: flex !important;
    }
}

/* Hover states */
#banner-carousel .banner-dot:hover {
    opacity: 1;
    transform: scale(1.15);
}


/* Scrollbar fina para navegadores WebKit (Chrome, Edge, Safari) */
#new-arrivals-carousel::-webkit-scrollbar,
#featured-carousel::-webkit-scrollbar,
#promotions-carousel::-webkit-scrollbar,
#search-carousel::-webkit-scrollbar,
#brands-carousel::-webkit-scrollbar {
    height: 6px; /* altura do scroll horizontal */
}

#new-arrivals-carousel::-webkit-scrollbar-thumb,
#featured-carousel::-webkit-scrollbar-thumb,
#promotions-carousel::-webkit-scrollbar-thumb,
#search-carousel::-webkit-scrollbar-thumb,
#brands-carousel::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

#new-arrivals-carousel::-webkit-scrollbar-track,
#featured-carousel::-webkit-scrollbar-track,
#promotions-carousel::-webkit-scrollbar-track,
#search-carousel::-webkit-scrollbar-track,
#brands-carousel::-webkit-scrollbar-track {
    background: transparent;
}

/* Força a topbar desaparecer em resoluções menores que 768px */
@media (max-width: 767px) {
    .topbar-md-only {
        display: none !important;
    }
}

/* Utilitário para esconder scrollbar (menu horizontal) */
.no-scrollbar {
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
}
.no-scrollbar::-webkit-scrollbar { display: none; }

/* Truncar com reticências para categorias longas */
.truncate-ellipsis {
  display: inline-block;
  max-width: 12rem; /* ~192px em md */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 1024px) {
  .truncate-ellipsis { max-width: 16rem; }
}

/* Centralização e largura do trilho de categorias sem depender de Tailwind JIT */
.category-strip-container { position: relative; margin-left: auto; margin-right: auto; max-width: 85vw; }
@media (min-width: 1024px) { .category-strip-container { max-width: 60vw; } }
.category-strip-container .cat-btn { z-index: 40; }
nav.menu-catalago .dropdown-menu { z-index: 60; }

/* Forçar dimensões dos cards de marcas iguais aos de produto */
.brand-card { width: 16rem; height: 12rem; flex: 0 0 auto; }
.brand-card img { max-height: 7rem; object-fit: contain; }
.brand-card p { margin-top: 0.25rem; }

/* Mobile: marcas com mesmo tamanho dos produtos */
@media (max-width: 767px) {
    .brand-card {
        width: 100%;
        max-width: 180px;
        height: auto;
        min-height: 140px;
    }
    .brand-card img {
        max-height: 80px;
    }
}

/* ============================================
   MELHORIAS VISUAIS MODERNAS
   ============================================ */

/* Dropdown com animação suave */
[id^="dropdown-"] {
    animation: dropdownFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
}

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

#banner-carousel .banner-dot {
    transition: all 0.3s ease;
}

#banner-carousel .banner-dot.active {
    transform: scale(1.4);
}

#banner-prev,
#banner-next {
    transition: all 0.3s ease;
}

#banner-prev:hover,
#banner-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Busca com estados melhorados */
#search-form input {
    transition: all 0.3s ease;
}

#search-form input:focus {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Cards de produtos com micro-interações */
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.product-card:active {
    transform: translateY(-6px);
}

/* Botões com efeito ripple */
.btn-add-cart,
.btn-details,
.btn-whatsapp,
.add-to-cart {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-add-cart:hover,
.btn-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Animação de sucesso ao adicionar ao carrinho */
.btn-add-cart.added {
    animation: cartSuccess 0.5s ease;
}

@keyframes cartSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* WhatsApp shake animation */
.whatsapp-buy.shake {
    animation: whatsappShake 0.5s ease;
}

@keyframes whatsappShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

/* Toast notifications */
.toast {
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
}

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

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

/* Loading spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

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

/* Skeleton Card para Produtos */
.skeleton-card {
    background: white;
    border-radius: 0.5rem;
    padding: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    width: 100%;
    flex-shrink: 0;
}

.skeleton-card .skeleton-image {
    width: 100%;
    height: 160px;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.skeleton-card .skeleton-title {
    height: 40px;
    margin-bottom: 0.5rem;
    width: 90%;
}

.skeleton-card .skeleton-text {
    height: 16px;
    margin-bottom: 0.5rem;
    width: 60%;
}

.skeleton-card .skeleton-price {
    height: 28px;
    margin-top: auto;
    width: 40%;
}

.skeleton-card .skeleton-button {
    height: 44px;
    margin-top: 0.5rem;
    width: 100%;
    border-radius: 0.375rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.empty-state-icon {
    font-size: 5rem;
    color: #d1d5db;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 1rem;
}

.empty-state-description {
    font-size: 1rem;
    color: #6b7280;
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.empty-state-action {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--primary, #254e88);
    color: white;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.empty-state-action:hover {
    background-color: var(--primary, #1e3f6d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Empty State para Carrossel */
.carousel-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    width: 100%;
    min-height: 200px;
}

.carousel-empty-state i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.carousel-empty-state h4 {
    font-size: 1.1rem;
    color: #6b7280;
    margin: 0;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 320px;
    max-width: 420px;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--primary, #254e88);
}

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.warning {
    border-left-color: #f59e0b;
}

.toast.info {
    border-left-color: #3b82f6;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast.success .toast-icon { color: #10b981; }
.toast.error .toast-icon { color: #ef4444; }
.toast.warning .toast-icon { color: #f59e0b; }
.toast.info .toast-icon { color: #3b82f6; }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.25rem;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #374151;
}

.toast.removing {
    animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

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

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

/* Toast no Mobile */
@media (max-width: 640px) {
    .toast-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* Swipe Actions em Product Cards */
.product-card {
    position: relative;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.product-card.swiping {
    transition: transform 0.3s ease;
}

.product-card .swipe-actions {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.product-card.swiping .swipe-actions {
    opacity: 1;
}

.product-card .swipe-action {
    width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: width 0.3s ease;
    pointer-events: auto;
}

.product-card.swiping .swipe-action {
    width: 70px;
}

.product-card .swipe-action.whatsapp {
    background-color: #10b981;
}

.product-card .swipe-action.share {
    background-color: #3b82f6;
}

/* ============================================
   SEARCH AUTOCOMPLETE
   ============================================ */

.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-autocomplete.active {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-autocomplete-loading {
    padding: 1rem;
    text-align: center;
    color: #6b7280;
}

.search-autocomplete-loading .spinner {
    display: inline-block;
    margin-right: 0.5rem;
}

.search-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
}

.search-autocomplete-item:last-child {
    border-bottom: none;
}

.search-autocomplete-item:hover,
.search-autocomplete-item.selected {
    background: #f9fafb;
}

.search-autocomplete-item-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 0.375rem;
    background: #f9fafb;
}

.search-autocomplete-item-content {
    flex: 1;
    min-width: 0;
}

.search-autocomplete-item-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-autocomplete-item-code {
    font-size: 0.75rem;
    color: #6b7280;
}

.search-autocomplete-item-price {
    font-weight: 700;
    color: #dc2626;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.search-autocomplete-empty {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
}

.search-autocomplete-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* Scrollbar personalizada */
.search-autocomplete::-webkit-scrollbar {
    width: 6px;
}

.search-autocomplete::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.search-autocomplete::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ============================================
   INFINITE SCROLL
   ============================================ */

.infinite-scroll-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.infinite-scroll-loader .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary, #254e88);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.infinite-scroll-loader p {
    margin-top: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.infinite-scroll-end {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
}

.infinite-scroll-end i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* ============================================
   IMAGE ZOOM
   ============================================ */

.product-card .product-image-container {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

.product-card .product-image-container img {
    transition: transform 0.3s ease;
}

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

/* Modal de Zoom */
.image-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.image-zoom-modal.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

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

.image-zoom-modal img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.image-zoom-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: background 0.2s;
}

.image-zoom-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.image-zoom-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: background 0.2s;
}

.image-zoom-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.image-zoom-nav.prev {
    left: 1rem;
}

.image-zoom-nav.next {
    right: 1rem;
}

.image-zoom-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
}

/* Mobile bottom navigation */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        padding: 0.5rem;
        display: flex;
        justify-content: space-around;
        z-index: 999;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    }

    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 10px;
        color: #6b7280;
        transition: color 0.3s ease;
    }

    .mobile-bottom-nav a:hover,
    .mobile-bottom-nav a.active {
        color: var(--primary, #254e88);
    }

    .mobile-bottom-nav i {
        font-size: 20px;
        margin-bottom: 2px;
    }

    /* Ajustar padding do footer para não cobrir nav */
    body {
        padding-bottom: 60px;
    }
}

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

/* Focus visible para acessibilidade - melhorado */
:focus-visible {
    outline: 3px solid var(--primary, #254e88);
    outline-offset: 3px;
}

/* Focus melhorado para botões */
button:focus-visible,
a:focus-visible,
.product-card button:focus-visible,
.product-card a.whatsapp-buy:focus-visible {
    outline: 3px solid var(--primary, #254e88);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 78, 136, 0.2);
}

/* Remove outline no mouse, mantém no teclado */
:focus:not(:focus-visible) {
    outline: none;
}

/* Seleção de texto com cor primária */
::selection {
    background-color: var(--primary, #254e88);
    color: white;
}

::-moz-selection {
    background-color: var(--primary, #254e88);
    color: white;
}

/* Scrollbar customizada para toda página */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

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

/* ============================================
   CARROSSEL PROFISSIONAL - Barras de Progresso
   ============================================ */

/* Barra de progresso dos carrosséis - Mais sutil e elegante */
.carousel-progress {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border-radius: 1px;
}

.carousel-progress-bar {
    height: 100%;
    background: var(--primary, #254e88);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
    border-radius: 1px;
}

/* Animação suave da barra de progresso */
.carousel-progress-bar {
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

/* Container dos carrosséis com posição relativa para a barra de progresso */
#banner-carousel,
#featured-carousel,
#promotions-carousel,
#new-arrivals-carousel,
#brands-carousel {
    position: relative;
}

/* Botões de navegação dos carrosséis com melhorias */
#banner-prev,
#banner-next,
#featured-prev,
#featured-next,
#promotions-prev,
#promotions-next,
#new-arrivals-prev,
#new-arrivals-next,
#brands-prev,
#brands-next {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
}

#banner-prev:hover,
#banner-next:hover,
#featured-prev:hover,
#featured-next:hover,
#promotions-prev:hover,
#promotions-next:hover,
#new-arrivals-prev:hover,
#new-arrivals-next:hover,
#brands-prev:hover,
#brands-next:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#banner-prev:active,
#banner-next:active,
#featured-prev:active,
#featured-next:active,
#promotions-prev:active,
#promotions-next:active,
#new-arrivals-prev:active,
#new-arrivals-next:active,
#brands-prev:active,
#brands-next:active {
    transform: translateY(-50%) scale(0.95);
}

/* Dots do banner com melhorias */
.banner-dot {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.banner-dot:hover {
    transform: scale(1.2);
    opacity: 0.8 !important;
}

.banner-dot.active {
    transform: scale(1.4);
}

/* Track do carrossel com cursor grab */
.carousel-slide,
.banner-inner {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.carousel-slide:active,
.banner-inner:active {
    cursor: grabbing;
}

/* Indicador de paginação para carrosséis (opcional) */
.carousel-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 1rem;
}

.carousel-pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-pagination-dot:hover {
    background: rgba(0, 0, 0, 0.4);
}

.carousel-pagination-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--primary, #254e88);
}

/* ============================================
   LOGO ANIMADA
   ============================================ */

.logo-animated {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Hover effect - escala suave */
.logo-animated:hover {
    transform: scale(1.08) rotate(-2deg);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
}

/* Pulse effect sutil (executa continuamente) */
.logo-animated {
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    }
    50% {
        transform: scale(1.03);
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
    }
}

/* Hover pausa a animação de pulse */
.logo-animated:hover {
    animation-play-state: paused;
}

/* Shimmer effect na logo (brilho) */
.logo-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: skewX(-25deg);
    animation: logoShimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes logoShimmer {
    0% {
        left: -100%;
    }
    20%, 100% {
        left: 200%;
    }
}

/* Logo wrapper para posicionar o ::before */
header img.logo-animated {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

/* ============================================
   CARROSSEL - MELHORIAS DE ANIMAÇÃO
   ============================================ */

/* Product cards nos carrosséis com animação de entrada */
.carousel-slide .product-card {
    opacity: 0;
    transform: translateY(20px);
    animation: cardFadeIn 0.5s ease forwards;
}

.carousel-slide .product-card:nth-child(1) { animation-delay: 0ms; }
.carousel-slide .product-card:nth-child(2) { animation-delay: 50ms; }
.carousel-slide .product-card:nth-child(3) { animation-delay: 100ms; }
.carousel-slide .product-card:nth-child(4) { animation-delay: 150ms; }
.carousel-slide .product-card:nth-child(5) { animation-delay: 200ms; }
.carousel-slide .product-card:nth-child(6) { animation-delay: 250ms; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animação de transição entre slides */
.carousel-slide {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Loading spinner para carrossel */
.carousel-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary, #254e88);
    border-radius: 50%;
    animation: carouselSpin 1s linear infinite;
}

@keyframes carouselSpin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Animação dos dots/bullets com glow */
.banner-dot {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
}

.banner-dot.active {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);
    }
}

/* Animação de entrada para botões de navegação */
#banner-prev,
#banner-next,
#featured-prev,
#featured-next,
#promotions-prev,
#promotions-next,
#new-arrivals-prev,
#new-arrivals-next,
#brands-prev,
#brands-next {
    opacity: 0;
    transform: translateY(-50%) scale(0.8);
    animation: navButtonFadeIn 0.5s ease forwards;
}

@keyframes navButtonFadeIn {
    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

#banner-prev { animation-delay: 0.3s; }
#banner-next { animation-delay: 0.4s; }

/* Brand cards com animação especial */
.brand-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-card:hover {
    transform: translateY(-12px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.brand-card:hover img {
    transform: scale(1.1) rotate(5deg);
    transition: transform 0.4s ease;
}

/* Progress bar com animação de preenchimento */
.carousel-progress-bar {
    position: relative;
    overflow: hidden;
}

.carousel-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: progressShimmer 1.5s ease-in-out infinite;
}

@keyframes progressShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Swipe indicator para mobile */
@media (max-width: 768px) {
    .swipe-indicator {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        gap: 8px;
        color: white;
        font-size: 12px;
        opacity: 0.7;
        animation: swipeIndicator 2s ease-in-out infinite;
        pointer-events: none;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }

    .swipe-indicator i {
        animation: swipeArrow 1s ease-in-out infinite;
    }
}

@keyframes swipeIndicator {
    0%, 100% {
        opacity: 0.3;
        transform: translateX(-50%);
    }
    50% {
        opacity: 0.7;
        transform: translateX(-50%) translateX(-10px);
    }
}

@keyframes swipeArrow {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(10px);
    }
}

/* Efeito de glassmorphism nos controles do carrossel */
#banner-prev,
#banner-next {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

/* Auto-scroll indicator */
.auto-scroll-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    color: white;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#banner-carousel:hover .auto-scroll-indicator {
    opacity: 1;
}

.auto-scroll-indicator .dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: autoScrollDot 1.5s ease-in-out infinite;
}

.auto-scroll-indicator .dot:nth-child(2) { animation-delay: 0.2s; }
.auto-scroll-indicator .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes autoScrollDot {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}
