/* Estilos compartilhados do componente de exibição de produtos */
/* Escopo isolado pela classe reutilizável .product-display */

/* Título e descrição da seção - FORÇAR CORES */
.product-display h2 {
    color: var(--theme-text) !important;
    font-size: 2.25rem !important;
    font-weight: 700 !important;
    margin-bottom: 1rem !important;
    line-height: 1.2 !important;
    text-align: center !important;
    opacity: 1 !important;
}

.product-display p {
    color: var(--theme-text-muted);
    font-size: 1.125rem !important;
    font-weight: 400 !important;
    line-height: 1.6 !important;
    max-width: 42rem !important;
    margin: 0 auto !important;
    text-align: center !important;
    opacity: 1 !important;
}

/* Estilos compartilhados da vitrine de produtos */

/* Prevenir rolagem horizontal */
.product-display {
    overflow-x: hidden;
    max-width: 100%;
}

#products-container {
    overflow-x: hidden;
    max-width: 100%;
    position: relative;
}

/* Quando Swiper está ativo, permitir overflow para setas */
#products-container:has(.products-carousel[style*="display: block"]) {
    overflow: visible;
}

#electronics-grid {
    overflow-x: hidden;
    max-width: 100%;
}

/* Card de produto */
.electronics-card {
    background: var(--theme-product-surface);
    border-radius: 16px;
    box-shadow: 0 4px 6px var(--palette-rgba-0-0-0-0-05);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid var(--theme-border);
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    max-width: 100%;
    box-sizing: border-box;
}

.product-display .electronics-card:hover {
    box-shadow: 0 20px 25px var(--palette-rgba-0-0-0-0-1);
    transform: translateY(-4px);
    border-color: var(--theme-border);
}

/* Imagem do Produto com SVG/Emoji */
.product-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--theme-product-surface) 0%, var(--theme-product-surface) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-display .product-icon {
    font-size: 80px;
    color: var(--theme-text-muted);
    transition: transform 0.3s ease;
}

.product-display .electronics-card:hover .product-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Badges Container */
.badges-container {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-display .discount-badge {
    background: linear-gradient(135deg, var(--palette-ef4444), var(--palette-dc2626));
    color: var(--palette-white);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 4px var(--palette-rgba-239-68-68-0-3);
}

.product-display .new-badge {
    background: linear-gradient(135deg, var(--palette-10b981), var(--palette-059669));
    color: var(--palette-white);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 4px var(--palette-rgba-16-185-129-0-3);
}

.product-display .new-badge.has-discount {
    margin-top: 0;
}

/* Seletor de quantidade */
.quantity-selector {
    position: relative;
}

/* Card footer precisa ser relativo para posicionar o alerta */
.product-display .card-footer {
    position: relative !important;
}

/* Container do alerta - sobreposto sem empurrar nada */
.product-display .quantity-alert-container {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 65px !important; /* Mais alto para não cobrir o botão */
    z-index: 200 !important;
    pointer-events: none !important; /* Não bloqueia cliques quando vazio */
}

.product-display .quantity-alert-container .quantity-alert {
    pointer-events: auto !important; /* Alerta em si pode receber cliques */
}

/* Div de alerta simples e clara */
.product-display .quantity-alert {
    background: var(--palette-ef4444) !important;
    color: var(--palette-white) !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-align: center !important;
    box-shadow: 0 4px 12px var(--palette-rgba-0-0-0-0-3) !important;
    animation: alertSlideIn 0.3s ease-out !important;
    border: 1px solid var(--palette-rgba-255-255-255-0-2) !important;
}

.product-display .quantity-alert.info {
    background: var(--theme-accent-light);
}

.product-display .quantity-alert.warning {
    background: var(--palette-f59e0b);
}

.product-display .quantity-alert.success {
    background: var(--palette-10b981);
}

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

.product-display .free-shipping-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--theme-accent-light), var(--theme-accent));
    color: var(--palette-white);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 4px var(--palette-rgba-59-130-246-0-3);
}

/* Selo empilha acima do frete grátis, ou fica sozinho no lugar dela
   quando não tem frete grátis - efeito natural do flex-column. */
.product-display .bottom-left-badges {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.product-display .product-image .bottom-left-badges .free-shipping-badge {
    position: static;
}

.product-display .selos {
    color: var(--palette-white);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 4px var(--palette-rgba-0-0-0-0-2);
}

.product-display .low-stock-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--palette-f59e0b), var(--theme-accent-dark));
    color: var(--palette-white);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 4px var(--palette-rgba-245-158-11-0-3);
}

/* Conteúdo do Produto */
.product-content {
    padding: 20px 20px 5px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
}

.product-display .product-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--theme-text);
    margin-bottom: 0px !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    height: 45px !important;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.product-display .product-description {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: var(--theme-text-muted);
    margin-bottom: 8px !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    height: 34px !important;
    max-width: none !important;
    margin: 0 0 8px 0 !important;
    text-align: left !important;
    opacity: 1 !important;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Dados secundários (variação/descrição/foto) - mesma regra da home
   (templates/__master/Styles/vitrines.css), generalizada pra qualquer grade
   de produto que use PRODUCTS_PANEL (categoria, busca, listagem). */
.product-display .electronics-card:not([data-secundario="descricao"]) .product-description:empty {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
}
.product-display .electronics-card[data-secundario="descricao"] .product-description:empty {
    min-height: 17px !important;
}
.product-display .product-foto-thumbnails {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 48px;
    margin: 2px 0 10px;
    overflow: hidden;
}
.product-display .electronics-card:has(.product-foto-thumbnails) .product-title {
    -webkit-line-clamp: 1 !important;
    height: 22px !important;
    white-space: normal;
}
.product-display .product-foto-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border: 2px solid var(--theme-border);
    border-radius: 8px;
    background: var(--theme-product-surface);
    box-shadow: 0 2px 5px rgba(15, 23, 42, .08);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.product-display .product-foto-thumbnail:hover {
    border-color: var(--theme-accent-light);
    box-shadow: 0 4px 9px rgba(37, 99, 235, .16);
    transform: translateY(-1px);
}
.product-display .product-foto-thumbnail.active {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .14);
}
.product-display .product-foto-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    object-fit: contain;
}
.product-display .product-image img.is-switching-gallery-image {
    opacity: .35;
    transition: opacity .18s ease;
}
.product-display .electronics-card.has-selected-gallery-image .product-image-hover {
    opacity: 0 !important;
    pointer-events: none;
}

/* 2ª foto do produto ao passar o mouse - mesmo padrão das vitrines da home. */
.product-display .product-image {
    -webkit-user-select: none;
    user-select: none;
}
.product-display .product-image-hover {
    pointer-events: none;
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--theme-product-surface);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.product-display .product-image-hover:not([src]) {
    visibility: hidden;
}
@media (hover: hover) {
    .product-display .electronics-card:hover .product-image-hover {
        opacity: 1;
    }
}
.product-display .electronics-card:focus-within .product-image-hover {
    opacity: 1;
}

/* Formato 3-1: 3 linhas título (topo) + 1 linha descrição (base) */
.product-display .product-content.format-3-1 {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 88px !important;
}

.product-display .product-title.format-3-1 {
    -webkit-line-clamp: 3;
    height: 67px;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

.product-display .product-description.format-3-1 {
    -webkit-line-clamp: 1 !important;
    height: 17px !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

/* Formato 2-2: 2 linhas título (topo) + 2 linhas descrição (base) */
.product-display .product-content.format-2-2 {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 88px !important;
}

.product-display .product-title.format-2-2 {
    -webkit-line-clamp: 2;
    height: 45px;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

.product-display .product-description.format-2-2 {
    -webkit-line-clamp: 2 !important;
    height: 34px !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

/* Formato 1-1: 1 linha título (topo) + 1 linha descrição (base) */
.product-display .product-content.format-1-1 {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    min-height: 88px !important;
}

/* Mesmo ajuste do format-1-1 em vitrines.css: alturas automáticas, sem buraco
   entre o nome curto e a descrição, e a segunda linha liberada para ela. */
.product-display .product-title.format-1-1 {
    -webkit-line-clamp: 2 !important;
    height: auto !important;
    max-height: 45px !important;
    margin-bottom: 2px !important;
    flex-shrink: 0;
}

.product-display .product-description.format-1-1 {
    -webkit-line-clamp: 2 !important;
    height: auto !important;
    max-height: 34px !important;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    flex-shrink: 0;
}

/* Formato 1-3: 1 linha título (topo) + 3 linhas descrição (base) */
.product-display .product-content.format-1-3 {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 88px !important;
}

.product-display .product-title.format-1-3 {
    -webkit-line-clamp: 1;
    height: 22px;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

.product-display .product-description.format-1-3 {
    -webkit-line-clamp: 3 !important;
    height: 51px !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

/* Formato 2-1: 2 linhas título (topo) + 1 linha vazia + 1 linha descrição (base) */
.product-display .product-content.format-2-1 {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 88px !important;
}

.product-display .product-title.format-2-1 {
    -webkit-line-clamp: 2;
    height: 45px;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

.product-display .product-description.format-2-1 {
    -webkit-line-clamp: 1 !important;
    height: 17px !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

/* Formato 4-0: 4 linhas título, 0 linhas descrição */
.product-display .product-title.format-4-0 {
    -webkit-line-clamp: 4;
    height: 90px;
}

.product-display .product-description.format-4-0 {
    display: none !important;
}

/* Formato 2-0: 2 linhas título, 0 linhas descrição */
.product-display .product-title.format-2-0 {
    -webkit-line-clamp: 2;
    height: 45px;
}

.product-display .product-description.format-2-0 {
    display: none !important;
}

/* Formato 3-0: 3 linhas título, 0 linhas descrição */
.product-display .product-title.format-3-0 {
    -webkit-line-clamp: 3;
    height: 67px;
}

.product-display .product-description.format-3-0 {
    display: none !important;
}

.product-display .product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.product-display .stars {
    color: var(--palette-fbbf24);
    font-size: 14px;
}

.product-display .star-empty {
    color: var(--theme-text-muted);
}

.product-display .rating-text {
    color: var(--theme-text-muted);
    font-size: 13px;
    margin-left: 2px;
}

/* Variações de produto */
.product-display .product-variations {
    margin-bottom: 12px !important;
}

.product-display .variation-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
}

.product-display .variation-label {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--theme-text) !important;
    min-width: 50px !important;
}

/* Opções de Cores */
.product-display .color-options {
    display: flex !important;
    gap: 8px !important;
}

.product-display .color-option {
    width: 28px !important;
    height: 28px !important;
    border-radius: 4px !important;
    border: 2px solid var(--theme-border) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    position: relative !important;
}

.product-display .color-option:hover {
    transform: scale(1.1) !important;
    border-color: var(--theme-accent-light);
}

.product-display .color-option.active {
    border-color: var(--theme-accent-light) !important;
    transform: scale(1.1) !important;
}

.product-display .color-option.active::after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: var(--palette-white) !important;
    font-size: 10px !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px var(--palette-rgba-0-0-0-0-7) !important;
}

/* Opções de Tamanho */
.product-display .size-options {
    display: flex !important;
    gap: 8px !important;
}

.product-display .size-option {
    padding: 4px 8px !important;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: var(--theme-text);
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-width: 30px !important;
    text-align: center !important;
}

.product-display .size-option:hover {
    background: var(--theme-surface);
    border-color: var(--theme-border);
}

.product-display .size-option.active {
    background: var(--theme-accent-light);
    border-color: var(--theme-accent-light);
    color: var(--palette-white);
}

/* Opções de Texto Genérico */
.product-display .text-options {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.product-display .text-option {
    padding: 4px 8px !important;
    background: var(--theme-surface) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: var(--theme-text) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
}

.product-display .text-option:hover {
    background: var(--theme-surface);
    border-color: var(--theme-border) !important;
}

.product-display .text-option.active {
    background: var(--theme-accent-light) !important;
    border-color: var(--theme-accent-light) !important;
    color: var(--theme-accent-text) !important;
}

/* Variações duplas */
.product-display .double-variations {
    position: relative !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
    margin-bottom: 12px !important;
}

.product-display .variation-step-1 {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
    min-height: 32px !important;
    box-sizing: border-box !important;
}

/* Ocultar todos os steps exceto o primeiro (suporta N variações - DINÂMICO) */
.product-display .variation-row[class*="variation-step-"]:not(.variation-step-1) {
    display: none !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
    min-height: 0 !important;
    height: 0 !important;
    box-sizing: border-box !important;
}

/* Mostrar step quando ativado com slide-in (suporta N variações - DINÂMICO) */
.product-display .variation-row[class*="variation-step-"].slide-in {
    display: flex !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    min-height: 32px !important;
    height: auto !important;
    margin-top: 8px !important;
}

.product-display .step1-selected-display {
    margin-right: 4px !important;
}

.product-display .selected-step1 {
    background: var(--theme-surface) !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    color: var(--theme-text-muted) !important;
    cursor: pointer !important;
    border: 1px solid var(--theme-border) !important;
}

.product-display .selected-step1:hover {
    background: var(--theme-surface) !important;
}

.product-display .double-variations.completed::after {
    content: '✓' !important;
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    width: 20px !important;
    height: 20px !important;
    background: var(--palette-10b981);
    color: var(--palette-white);
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: bold !important;
    z-index: 10 !important;
}

.product-display .variation-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-display .variation-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-text);
    min-width: 50px;
    flex-shrink: 0;
}

/* Opções de Cores */
.color-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.product-display .color-option {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.product-display .color-option:hover {
    transform: scale(1.1);
}

.product-display .color-option.active {
    border-color: var(--theme-accent);
    transform: scale(1.1);
}

.product-display .color-option.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--palette-white);
    font-size: 10px;
    font-weight: bold;
    text-shadow: 0 0 2px var(--palette-rgba-0-0-0-0-5);
}

/* Opções de Kit, Tamanho e Número */
.kit-options, .size-options, .number-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.product-display .kit-option, .product-display .size-option, .product-display .number-option {
    padding: 6px 12px;
    border: 2px solid var(--theme-border);
    border-radius: 6px;
    background: var(--theme-product-surface);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-text-muted);
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-display .kit-option:hover, .product-display .size-option:hover, .product-display .number-option:hover {
    border-color: var(--theme-border);
    color: var(--theme-text);
}

.product-display .kit-option.active, .product-display .size-option.active, .product-display .number-option.active {
    border-color: var(--theme-accent);
    background: var(--theme-accent);
    color: var(--theme-accent-text);
}

/* Variações Duplas */
.double-variations {
    position: relative;
}

/* Regras de animação para steps dinâmicos (removido hardcoded step-2) */
.product-display .variation-row[class*="variation-step-"] {
    margin-top: 8px;
    transition: all 0.3s ease;
}

/* Opções de texto genérico */
.text-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.product-display .text-option {
    padding: 6px 12px;
    border: 2px solid var(--theme-border);
    border-radius: 6px;
    background: var(--theme-surface);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-text-muted);
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-display .text-option:hover {
    border-color: var(--theme-border);
    color: var(--theme-text);
}

.product-display .text-option.active {
    border-color: var(--theme-accent);
    background: var(--theme-accent);
    color: var(--theme-accent-text);
}

/* Feedback visual de completude */
.double-variations.completed::after {
    content: '✓';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: var(--palette-10b981);
    color: var(--palette-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: checkmark 0.3s ease-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Alerta local de variação - duplicação removida */

/* variation-alert removido - agora usa quantity-alert warning */

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

/* Display da seleção da etapa 1 */
.step1-selected-display {
    margin-right: 4px;
}

.product-display .selected-step1 {
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    color: var(--theme-text-muted);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.product-display .selected-step1:hover {
    background: var(--theme-surface);
    border-color: var(--theme-border);
    color: var(--theme-text-muted);
    transform: scale(1.05);
}

/* Indicadores de Estoque */
.quantity-selector.low-stock {
    border: 2px solid var(--palette-f59e0b);
    background: var(--palette-fef3c7);
}

.product-display .quantity-selector.low-stock::after {
    content: "Estoque baixo";
    position: absolute;
    top: -25px;
    left: 0;
    background: var(--palette-f59e0b);
    color: var(--palette-white);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.product-display .quantity-selector.out-of-stock {
    border: 2px solid var(--palette-ef4444);
    background: var(--palette-fee2e2);
    pointer-events: none;
    opacity: 0.6;
}

.product-display .quantity-selector.out-of-stock::after {
    content: "Sem estoque";
    position: absolute;
    top: -25px;
    left: 0;
    background: var(--palette-ef4444);
    color: var(--palette-white);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

/* Preços */
.price-section {
    margin-bottom: 16px;
}

.product-display .current-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--theme-text);
    display: block;
}

.product-display .cash-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--theme-text-muted);
    margin-left: 6px;
}

.product-display .pix-discount {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    /* Verde puxado para a cor do texto: 4,5:1 no tema claro e no escuro */
    color: color-mix(in srgb, var(--palette-10b981) 55%, var(--theme-text));
    font-weight: 600;
    margin-top: 2px;
    margin-bottom: 4px;
}

.product-display .pix-discount i {
    color: color-mix(in srgb, var(--palette-10b981) 55%, var(--theme-text));
    font-size: 10px;
}

.product-display .old-price {
    font-size: 14px;
    color: var(--theme-text-muted);
    text-decoration: line-through;
}

.product-display .old-price-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    height: 18px;
    min-height: 18px;
}

/* Garantir que old-price-section sempre ocupe espaço mesmo quando oculto */
.product-display .old-price-section[style*="display:none"],
.product-display .old-price-section[style*="display: none"] {
    display: flex !important;
    visibility: hidden !important;
}

.product-display .price-spacer {
    display: block;
    height: 18px;
}

.product-display .discount-info {
    font-size: 11px;
    color: color-mix(in srgb, var(--palette-059669) 70%, var(--theme-text));
    font-weight: 500;
}

/* Card Footer - Rodapé fixo */
.card-footer {
    margin-top: auto;
    position: relative;
}

/* Wrapper para quantidade e botão carrinho */
.quantity-cart-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Seção da quantidade (input + texto) */
.quantity-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Texto de últimas unidades no footer (modo lista) */
.footer-low-stock-text {
    display: none;
    color: var(--palette-f59e0b);
    font-size: 9px;
    font-weight: 600;
    text-align: center;
}

.product-display .list-view .footer-low-stock-text {
    display: block;
}

/* Seletor de quantidade */
.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid var(--theme-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--theme-surface);
    transition: all 0.3s ease;
    height: 43px;
}

.product-display .quantity-selector:hover {
    border-color: var(--theme-border);
    box-shadow: 0 2px 4px var(--palette-rgba-0-0-0-0-05);
}

.product-display .quantity-btn {
    width: 32px;
    height: 43px;
    background: var(--theme-surface);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--theme-text-muted);
    font-size: 12px;
    outline: none;
}

.product-display .quantity-btn:hover {
    background: var(--theme-accent);
    color: var(--palette-white);
}

.product-display .quantity-btn:active {
    transform: scale(0.95);
}

.product-display .quantity-btn:focus {
    outline: none;
    box-shadow: none;
}

.product-display .quantity-btn.minus:hover {
    background: var(--palette-ef4444);
}

.product-display .quantity-btn.plus:hover {
    background: var(--palette-10b981);
}

.product-display .quantity-input {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 43px !important;
    border: none;
    text-align: center !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    color: var(--theme-text);
    background: var(--theme-product-surface);
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.product-display .quantity-input::-webkit-outer-spin-button, .product-display .quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-display .installment-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--theme-accent);
    font-weight: 600;
    margin-top: 4px;
}

.product-display .installment-info i {
    font-size: 9px;
}

/* Botão de Adicionar ao Carrinho */
.product-display .add-to-cart-btn {
    flex: 1 !important;
    background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-dark)) !important;
    color: var(--theme-accent-text) !important;
    border: none !important;
    padding: 12px 6px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    font-size: 11px !important;
    box-shadow: 0 2px 4px var(--palette-rgba-37-99-235-0-2) !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
}

.product-display .add-to-cart-btn i {
    flex: 0 0 auto;
    margin-right: 0 !important;
}

.product-display .add-to-cart-btn:hover {
    background: linear-gradient(135deg, var(--theme-accent-dark), var(--theme-accent-dark));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--palette-rgba-37-99-235-0-3);
}

.product-display .add-to-cart-btn.disabled {
    background: linear-gradient(135deg, var(--theme-surface) 0%, var(--theme-border) 100%);
    cursor: not-allowed;
    pointer-events: none;
}

.product-display .add-to-cart-btn.disabled:hover {
    transform: none;
    box-shadow: 0 4px 6px var(--palette-rgba-0-0-0-0-1);
}

.product-display .add-to-cart-btn:active {
    transform: translateY(0);
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.product-display .loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--theme-border);
    border-top: 2px solid var(--theme-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Animation */
.toast-show {
    transform: translateX(0) !important;
}

/* Modal Styles */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Responsividade */
@media (max-width: 1024px) {
    .electronics-card {
        border-radius: 12px;
    }
    
    .product-content {
        padding: 16px;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }
    
    .card-footer {
        padding-top: 10px;
    }
    
    .product-title {
        font-size: 15px;
        height: 42px;
    }
    
    .product-description {
        font-size: 12px;
        height: 31px;
    }
    
    /* Formatos responsivos tablet */
    .product-title.format-3-1 {
        height: 63px;
    }
    
    .product-description.format-3-1 {
        font-size: 11px;
        height: 15px;
    }
    
    .product-title.format-2-2 {
        height: 42px;
    }
    
    .product-description.format-2-2 {
        font-size: 12px;
        height: 31px;
    }
    
    .product-title.format-1-1 {
        height: 21px;
    }
    
    .product-description.format-1-1 {
        font-size: 11px;
        height: 15px;
    }
    
    .product-title.format-1-3 {
        height: 21px;
    }
    
    .product-description.format-1-3 {
        font-size: 12px;
        height: 47px;
    }
    
    .product-title.format-2-1 {
        height: 42px;
        margin-bottom: 21px;
    }
    
    .product-description.format-2-1 {
        font-size: 11px;
        height: 15px;
    }
    
    .product-title.format-2-0 {
        height: 42px;
    }
    
    .product-description.format-2-0 {
        display: none;
    }
    
    .product-title.format-4-0 {
        height: 84px;
    }
    
    .product-description.format-4-0 {
        display: none;
    }
    
    .product-title.format-3-0 {
        height: 63px;
    }
    
    .product-description.format-3-0 {
        display: none;
    }
    
    .current-price {
        font-size: 20px;
    }
    
    .cash-label {
        font-size: 11px;
    }
    
    .add-to-cart-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .quantity-cart-wrapper {
        gap: 10px;
    }
    
    .footer-low-stock-text {
        font-size: 8px;
    }
    
    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .quantity-input {
        width: 36px;
        height: 28px;
        font-size: 13px;
    }
    
    .pix-discount {
        font-size: 10px;
    }
    
    .installment-info {
        font-size: 9px;
    }
    
    .old-price {
        font-size: 12px;
    }
    
    .discount-info {
        font-size: 10px;
    }
    
    .old-price-section {
        height: 16px;
        min-height: 16px;
    }
    
    .price-spacer {
        height: 16px;
    }
    
    .product-image {
        height: 260px;
    }
    
    .product-icon {
        font-size: 70px;
    }
}

@media (max-width: 768px) {
    .product-image {
        height: 200px;
        position: relative;
    }
    
    /* Favorito no canto da foto - mobile */
    .favorite-btn-content {
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        width: 28px !important;
        height: 28px !important;
        font-size: 14px !important;
        background: var(--palette-rgba-255-255-255-0-9) !important;
        border-radius: 50% !important;
        z-index: 15 !important;
    }
    
    .quantity-cart-wrapper {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .add-to-cart-btn {
        flex: 1;
        height: 43px;
        padding: 12px 16px;
        font-size: 13px;
        border-radius: 10px;
    }
    
    /* No mobile, ignorar regras de formato - usar padrão */
    .product-title[class*="format-"] {
        -webkit-line-clamp: 2 !important;
        height: auto !important;
        margin-bottom: 8px !important;
    }
    
    .product-description[class*="format-"] {
        display: block !important;
        -webkit-line-clamp: 2 !important;
        height: auto !important;
    }
    
    .product-icon {
        font-size: 60px;
    }
    
    .product-content {
        padding: 14px;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }
    
    .card-footer {
        padding-top: 8px;
    }
    
    .product-title {
        font-size: 14px;
        height: 39px;
    }
    
    .product-description {
        font-size: 11px;
        height: 29px;
    }

    .current-price {
        font-size: 18px;
    }
    
    .cash-label {
        font-size: 10px;
    }

    .quantity-selector {
        height: 43px;
    }
    
    .quantity-btn {
        width: 32px;
        height: 43px;
        font-size: 12px;
    }
    
    .quantity-input {
        width: 40px;
        height: 43px;
        font-size: 13px;
    }
    
    .quantity-cart-wrapper {
        gap: 8px;
    }
    
    .footer-low-stock-text {
        font-size: 7px;
    }

    .pix-discount {
        font-size: 9px;
    }
    
    .installment-info {
        font-size: 8px;
    }
    
    .old-price {
        font-size: 11px;
    }
    
    .discount-info {
        font-size: 9px;
    }
    
    .old-price-section {
        height: 15px;
        min-height: 15px;
    }
    
    .price-spacer {
        height: 15px;
    }
}

@media (max-width: 480px) {
    .product-image {
        height: 220px;
        position: relative;
    }
    
    /* Favorito menor no mobile pequeno */
    .favorite-btn-content {
        top: 6px !important;
        right: 6px !important;
        width: 24px !important;
        height: 24px !important;
        font-size: 12px !important;
    }
    
    .product-icon {
        font-size: 50px;
    }
    
    .electronics-card {
        border-radius: 8px;
    }
    
    .product-content {
        padding: 12px;
    }
    
    .card-footer {
        padding-top: 6px;
    }

    /* Alinhar controles no modo grade mobile */
    .quantity-cart-wrapper {
        display: flex !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .quantity-selector {
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
    }

    .add-to-cart-btn {
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 12px !important;
    }

    .quantity-btn {
        height: 40px !important;
        width: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .quantity-input {
        height: 40px !important;
    }
    
    .product-title {
        font-size: 13px;
        height: 36px;
    }
    
    .product-description {
        font-size: 10px;
        height: 26px;
    }
    
    .installment-info {
        font-size: 7px;
        margin-top: 2px;
    }
    
    .old-price {
        font-size: 10px;
    }
    
    .discount-info {
        font-size: 8px;
    }
    
    .old-price-section {
        height: 14px;
        min-height: 14px;
    }
    
    .price-spacer {
        height: 14px;
    }
    
    .badges-container {
        top: 10px;
        left: 10px;
        gap: 4px;
    }
    
    .discount-badge, .new-badge {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .quantity-cart-wrapper {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }
    
    .add-to-cart-btn {
        flex: 1;
        height: 38px;
        padding: 10px 14px;
        font-size: 12px;
        border-radius: 10px;
    }
    
    .quantity-selector {
        height: 38px;
    }
    
    .quantity-btn {
        width: 28px;
        height: 38px;
        font-size: 11px;
    }
    
    .quantity-input {
        width: 36px;
        height: 38px;
        font-size: 12px;
    }
    
    .footer-low-stock-text {
        font-size: 6px;
    }
}

/* Animações de Entrada */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

.product-display .slide-up {
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Effects Adicionais */
.electronics-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-accent), var(--theme-accent-light), var(--theme-accent));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

.product-display .electronics-card:hover::before {
    transform: scaleX(1);
}

/* Efeito de brilho no hover */
.electronics-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        var(--palette-rgba-255-255-255-0-1) 50%,
        transparent 70%
    );
    transform: rotate(45deg) translate(-100%, -100%);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.product-display .electronics-card:hover::after {
    transform: rotate(45deg) translate(100%, 100%);
}

/* Animação de pulso para badges */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.product-display .discount-badge, .product-display .new-badge {
    animation: pulse 2s ease-in-out infinite;
}

/* Efeito de skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--theme-surface) 25%, var(--theme-border) 50%, var(--theme-surface) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {

}

/* Focus indicators for accessibility */
button:focus,
.favorite-btn:focus,
.add-to-cart-btn:focus {
    outline: 2px solid var(--theme-accent);
    outline-offset: 2px;
}

/* Botão de Favorito dentro do content */
.favorite-btn-content {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
    color: var(--theme-text-muted);
    outline: none;
    font-size: 16px;
}

.product-display .favorite-btn-content:hover {
    transform: scale(1.1);
    color: var(--theme-text);
}

.product-display .favorite-btn-content.active {
    color: var(--palette-ef4444);
}

.product-display .favorite-btn-content.active:hover {
    transform: scale(1.1);
    color: var(--palette-dc2626);
}

.product-display .favorite-btn-content:focus {
    outline: none;
}

/* Layout em Lista */
.list-view .electronics-card {
    flex-direction: row;
    height: auto;
    min-height: 200px;
}

.product-display .list-view .product-image {
    width: 280px;
    min-width: 280px;
    height: 280px;
    flex-shrink: 0;
}

.product-display .list-view .product-image-section {
    display: flex;
    flex-direction: column;
    width: 280px;
    min-width: 280px;
    flex-shrink: 0;
}

.product-display .list-view .product-content {
    padding: 10px 20px 20px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-display .list-view .card-footer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* No modo lista, os selos permanecem sobre a foto. Ocultamos somente o aviso
   de estoque, que disputa espaço com esse conjunto em imagens estreitas. */
.list-view .low-stock-badge {
    display: none;
}

/* Selo de desconto compacto, sobre a própria foto. */
.product-display .list-view .badges-container {
    display: flex;
    top: 10px;
    left: 10px;
}

.product-display .list-view .discount-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
}

/* Selos comerciais e frete grátis compactos no canto inferior da foto. */
.product-display .list-view .bottom-left-badges {
    display: flex;
    bottom: 10px;
    left: 10px;
    gap: 4px;
}

.product-display .list-view .selos,
.product-display .list-view .free-shipping-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
}

/* A avaliação divide a primeira linha do rodapé com o preço, usando o espaço
   livre à direita; a ação de compra continua ocupando a largura toda abaixo. */
.product-display .list-view .card-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 16px;
    align-items: start;
}

.list-view .product-content .product-rating {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin: 0;
    white-space: nowrap;
}

.product-display .list-view .price-section {
    grid-column: 1;
    grid-row: 1;
}

.product-display .list-view .quantity-cart-wrapper {
    grid-column: 1 / -1;
    grid-row: 2;
}

/* Left column info - abaixo da foto no modo lista */
.left-column-info {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
}

.product-display .list-view .left-column-info {
    display: none !important;
}

/* Badges para modo lista */
.list-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

/* Rating na coluna da esquerda */
.left-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.product-display .left-rating .stars {
    color: var(--palette-fbbf24);
    font-size: 12px;
}

.product-display .left-rating .rating-text {
    color: var(--theme-text-muted);
    font-size: 11px;
}

.product-display .list-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--palette-white);
}

.product-display .discount-list-badge {
    background: linear-gradient(135deg, var(--palette-ef4444), var(--palette-dc2626));
}

.product-display .new-list-badge {
    background: linear-gradient(135deg, var(--palette-10b981), var(--palette-059669));
}

.product-display .shipping-list-badge {
    background: linear-gradient(135deg, var(--theme-accent-light), var(--theme-accent));
}

.product-display .stock-list-badge {
    background: linear-gradient(135deg, var(--palette-f59e0b), var(--theme-accent-dark));
}

/* Grid para modo lista - 2 colunas em desktop */
#electronics-grid.list-view {
    grid-template-columns: repeat(1, 1fr) !important;
}

@media (min-width: 1024px) {
    #electronics-grid.list-view {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Ajustes responsivos para lista */
@media (max-width: 768px) {
    /* Modo lista mobile - 1 coluna para evitar corte */
    #electronics-grid.list-view {
        grid-template-columns: 1fr !important;
    }

    /* Manter layout lista no mobile */
    #electronics-grid.list-view .electronics-card {
        flex-direction: row !important;
        min-height: 160px;
        flex-wrap: wrap !important;
    }

    .list-view .product-image-section {
        width: 120px !important;
        min-width: 120px !important;
        flex-shrink: 0;
        display: flex !important;
        flex-direction: column !important;
    }

    .list-view .product-image {
        width: 120px !important;
        min-width: 120px !important;
        height: 120px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: var(--theme-surface) !important;
        overflow: hidden !important;
        padding: 8px !important;
    }

    /* Ajustar imagem real dentro do container */
    .list-view .product-image img {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }

    .list-view .product-icon {
        font-size: 48px !important;
    }

    .list-view .product-content {
        flex: 1 !important;
        width: calc(100% - 120px) !important;
        padding-bottom: 0 !important;
    }

    /* Remover margin do último elemento antes do footer */
    .list-view .product-content .installment-info {
        margin-bottom: 0 !important;
    }

    .list-view .product-content .price-section {
        margin-bottom: 8px !important;
    }

    .list-view .card-footer {
        width: 100% !important;
        margin-top: 0 !important;
        padding: 8px !important;
        border-top: 1px solid var(--theme-border) !important;
        background: var(--theme-surface) !important;
    }

    /* Alinhar controles no footer mobile */
    .list-view .quantity-cart-wrapper {
        display: flex !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .list-view .quantity-selector {
        height: 42px !important;
        display: flex !important;
        align-items: center !important;
    }

    .list-view .add-to-cart-btn {
        height: 42px !important;
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .list-view .quantity-btn {
        height: 42px !important;
        width: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .list-view .quantity-input {
        height: 42px !important;
    }

    .list-view .left-column-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 4px 0;
        gap: 4px;
        min-height: 60px;
    }

    /* Ocultar labels das variações no mobile modo lista */
    .list-view .variation-label {
        display: none !important;
    }
    
    /* Ajustar gaps das variações sem labels */
    .list-view .variation-row {
        gap: 4px !important;
    }
    
    .list-view .product-content {
        padding: 8px 12px 12px 12px !important;
        flex-grow: 1;
    }
    
    .list-view .quantity-cart-wrapper {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }
    
    .list-view .add-to-cart-btn {
        flex: 1;
        height: 36px;
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 8px;
        font-weight: 600;
    }
    
    .list-view .quantity-selector {
        height: 36px;
    }
    
    .list-view .quantity-btn {
        width: 28px;
        height: 36px;
        font-size: 11px;
    }
    
    .list-view .quantity-input {
        width: 34px;
        height: 36px;
        font-size: 12px;
    }
}

.product-display .left-rating .rating-text {
        font-size: 10px;
    }

.product-display .left-column-info {
        padding-top: 8px;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .list-view .product-image {
        width: 100px !important;
        min-width: 100px !important;
        height: 100px !important;
    }
    
    .list-view .product-image-section {
        width: 100px !important;
        min-width: 100px !important;
    }
    
    .list-view .electronics-card {
        min-height: 100px !important;
    }
    
    .list-view .product-content {
        padding: 6px 8px 8px 8px !important;
    }
    
    .list-view .left-column-info {
        padding: 3px 0 !important;
        gap: 3px !important;
    }
    
    .list-view .list-badge {
        font-size: 8px !important;
        padding: 1px 4px !important;
    }
    
    .list-view .left-rating .stars {
        font-size: 9px !important;
    }
    
    .list-view .left-rating .rating-text {
        font-size: 8px !important;
    }

    
    .list-view .add-to-cart-btn {
        height: 32px !important;
        font-size: 11px !important;
        padding: 6px 10px !important;
    }
    
    .list-view .quantity-selector {
        height: 32px !important;
    }
    
    .list-view .quantity-btn {
        width: 26px !important;
        height: 32px !important;
        font-size: 10px !important;
    }
    
    .list-view .quantity-input {
        width: 30px !important;
        height: 32px !important;
        font-size: 11px !important;
    }
}

/* Container do carrossel com dimensões corretas */
.products-carousel {
    width: 100%;
    height: auto;
    overflow: hidden;
}

/* Apenas ocultar paginação */
.swiper-pagination {
    display: none;
}

/* Alinhamento dos cards no carrossel */
.products-carousel .electronics-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.products-carousel .product-content {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    padding-bottom: 0 !important;
}

.products-carousel .card-footer {
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding-bottom: 8px !important;
}

/* Informações de Quantidade Especiais */
.quantity-info {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--palette-374151);
    color: var(--palette-white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 10;
    opacity: 0.9;
}

/* Seletores especiais de quantidade */
.quantity-selector.qty-multiple {
    border: 2px solid var(--palette-f59e0b);
    border-radius: 8px;
    position: relative;
}

.product-display .quantity-selector.qty-min-step {
    border: 2px solid var(--palette-8b5cf6);
    border-radius: 8px;
    position: relative;
}

.product-display .quantity-selector.qty-min-only {
    border: 2px solid var(--palette-10b981);
    border-radius: 8px;
    position: relative;
}

/* Hover para mostrar informações */
.quantity-selector:hover .quantity-info {
    opacity: 1;
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Estilos do Carrossel */
.carousel-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.product-display .carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.product-display .carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 24px;
    padding: 0;
}

.product-display .carousel-item {
    flex: 0 0 calc(25% - 18px);
    min-width: 250px;
    max-width: 300px;
}

/* Controles de navegação */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--palette-rgba-255-255-255-0-9);
    border: 2px solid var(--theme-border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--theme-text);
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px var(--palette-rgba-0-0-0-0-15);
}

.product-display .carousel-btn:hover {
    background: var(--theme-accent);
    color: var(--palette-white);
    border-color: var(--theme-accent);
    transform: translateY(-50%) scale(1.1);
}

.product-display .carousel-prev {
    left: -24px;
}

.product-display .carousel-next {
    right: -24px;
}

/* Indicadores (dots) */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.product-display .carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: var(--theme-surface);
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-display .carousel-dot:hover {
    background: var(--theme-text-muted);
    transform: scale(1.2);
}

.product-display .carousel-dot.active {
    background: var(--theme-accent);
    transform: scale(1.3);
}

/* Responsividade do carrossel */
@media (max-width: 1024px) {
    .carousel-item {
        flex: 0 0 calc(50% - 12px);
        min-width: 300px;
    }

    .carousel-track {
        gap: 16px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .carousel-prev {
        left: -20px;
    }

    .carousel-next {
        right: -20px;
    }
}

@media (max-width: 768px) {
    .carousel-item {
        flex: 0 0 calc(100% - 16px);
        min-width: 280px;
    }

    .carousel-track {
        gap: 16px;
        padding: 0 8px;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .carousel-prev {
        left: -18px;
    }

    .carousel-next {
        right: -18px;
    }

    .carousel-dots {
        margin-top: 16px;
        gap: 6px;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }
}

/* Animações suaves para mudança de slides */
.carousel-track.transitioning {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Efeito de hover no carrossel */
.carousel-container:hover .carousel-btn {
    opacity: 1;
}

.product-display .carousel-btn {
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

/* Indicador de carregamento do carrossel */
.carousel-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    color: var(--theme-text-muted);
    font-size: 16px;
}

.product-display .carousel-loading::after {
    content: '';
    margin-left: 8px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--theme-border);
    border-top: 2px solid var(--theme-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Configurações do Swiper */
.swiper {
    width: 100%;
    padding: 20px 0 60px 0;
}

.product-display .swiper-slide {
    height: auto;
}

/* CORREÇÃO: Forçar altura correta do swiper wrapper */
.product-display .products-carousel,
.product-display .swiper-wrapper {
    height: auto !important;
}

.product-display .swiper-slide {
    height: auto !important;
}

/* Navegação MODERNA do Swiper - Estilo 2025 E-commerce */
.product-display .swiper-button-next,
.product-display .swiper-button-prev {
    /* Formato retangular vertical (como Amazon/Netflix) */
    width: 40px !important;
    height: 84px !important;

    /* Posicionamento centralizado na metade da altura do card */
    position: absolute !important;
    top: 270px !important;
    transform: translateY(-50%) !important;

    /* Background com gradiente moderno */
    background: linear-gradient(135deg, var(--palette-rgba-255-255-255-0-95) 0%, var(--palette-rgba-255-255-255-0-98) 100%) !important;
    backdrop-filter: blur(8px);

    /* Borda sutil */
    border: 1px solid var(--palette-rgba-37-99-235-0-15);
    border-radius: 12px;

    /* Sombra elegante */
    box-shadow:
        0 4px 16px var(--palette-rgba-0-0-0-0-08),
        0 2px 8px var(--palette-rgba-37-99-235-0-04);

    /* Transição suave */
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);

    /* Cor do ícone */
    color: var(--theme-accent) !important;

    display: none !important;
    align-items: center;
    justify-content: center;

    /* Z-index para ficar sobre os cards */
    z-index: 10;

    /* Esconder até Swiper inicializar - evita "salto" */
    opacity: 0;
    visibility: hidden;
}

/* Mostrar setas apenas quando Swiper está ativo */
.product-display .products-carousel[style*="display: block"] ~ .swiper-button-next,
.product-display .products-carousel[style*="display: block"] ~ .swiper-button-prev {
    display: flex !important;
}

/* Mostrar botões suavemente após Swiper inicializar */
.product-display .swiper-button-next.swiper-initialized,
.product-display .swiper-button-prev.swiper-initialized {
    opacity: 1 !important;
    visibility: visible !important;
}

.product-display .swiper-button-next,
.product-display .swiper-rtl .swiper-button-prev {
    right: -30px !important;
}

.product-display .swiper-button-prev,
.product-display .swiper-rtl .swiper-button-next {
    left: -30px !important;
    right: auto !important;
}

/* Responsivo para mobile */
@media (max-width: 768px) {
    .product-display .swiper-button-next,
    .product-display .swiper-button-prev {
        width: 28px !important;
        height: 60px !important;
        /* Mantém centralização vertical relativa */
    }

    .product-display .swiper-button-next,
    .product-display .swiper-rtl .swiper-button-prev {
        right: -15px !important;
    }

    .product-display .swiper-button-prev,
    .product-display .swiper-rtl .swiper-button-next {
        left: -15px !important;
    }

    .product-display .swiper-button-next::after,
    .product-display .swiper-button-prev::after {
        font-size: 14px;
    }
}

.product-display .swiper-button-next:hover,
.product-display .swiper-button-prev:hover {
    background: linear-gradient(135deg, var(--theme-accent) 0%, var(--theme-accent-dark) 100%);
    color: var(--palette-white);
    transform: translateY(-50%) scale(1.05) !important;
    box-shadow:
        0 8px 24px var(--palette-rgba-37-99-235-0-25),
        0 4px 12px var(--palette-rgba-37-99-235-0-15);
}

.product-display .swiper-button-next::after,
.product-display .swiper-button-prev::after {
    font-size: 20px;
    font-weight: 700;
}

/* Loading Indicator Moderno - Barras Animadas */
.loading-indicator-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.loading-bars-animated {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
}

.loading-bars-animated .loading-bar {
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--theme-accent) 0%, var(--theme-accent-dark) 100%);
    border-radius: 3px;
    animation: loading-wave 1.2s ease-in-out infinite;
}

.loading-bars-animated .loading-bar:nth-child(1) {
    animation-delay: 0s;
}

.loading-bars-animated .loading-bar:nth-child(2) {
    animation-delay: 0.15s;
}

.loading-bars-animated .loading-bar:nth-child(3) {
    animation-delay: 0.3s;
}

.loading-bars-animated .loading-bar:nth-child(4) {
    animation-delay: 0.45s;
}

.loading-bars-animated .loading-bar:nth-child(5) {
    animation-delay: 0.6s;
}

@keyframes loading-wave {
    0%, 100% {
        transform: scaleY(0.3);
        opacity: 0.6;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* Paginação customizada do Swiper */
.swiper-pagination {
    bottom: 20px;
}

.product-display .swiper-pagination-bullet {
    background: var(--theme-surface);
    opacity: 1;
    width: 12px;
    height: 12px;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.product-display .swiper-pagination-bullet-active {
    background: var(--theme-accent);
    transform: scale(1.2);
}

/* Responsividade do Swiper */
@media (max-width: 768px) {
    .swiper-button-next,
    .swiper-button-prev {
        width: 36px;
        height: 36px;
        margin-top: -18px;
    }

    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 14px;
    }
}

/* ============================================
   ANIMAÇÃO INFINITE SCROLL - FADE + SCALE
   ============================================ */

.electronics-card.fade-in {
    animation: fadeInScale 0.5s ease-out forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Página de categorias: mesmo botão azul-marinho e quadrado da página inicial. */
body.category-page .product-display .add-to-cart-btn:not(.disabled) {
    background: var(--theme-accent) !important;
    color: var(--theme-accent-text) !important;
    border-radius: 0 !important;
    box-shadow: 0 3px 8px var(--palette-rgba-41-68-95-25) !important;
}

body.category-page .product-display .add-to-cart-btn:not(.disabled):hover {
    background: var(--theme-accent-dark);
    color: var(--theme-accent-text);
    box-shadow: 0 5px 12px var(--palette-rgba-32-56-79-30);
}

/* Botao de compra em site externo (produto com URL externa cadastrada) */
.product-display .external-buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 12px 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-dark));
    color: var(--theme-accent-text);
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 4px var(--palette-rgba-37-99-235-0-2);
    transition: all 0.3s ease;
}
.product-display .external-buy-btn:hover {
    background: linear-gradient(135deg, var(--theme-accent-dark), var(--theme-accent-dark));
    color: var(--theme-accent-text);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--palette-rgba-37-99-235-0-3);
}
.product-display .whatsapp-buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 8px;
    padding: 10px 8px;
    border-radius: 10px;
    background: var(--palette-25d366);
    color: var(--palette-fff);
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 4px var(--palette-rgba-37-211-102-0-25);
    transition: all 0.3s ease;
}
.product-display .whatsapp-buy-btn:hover {
    background: var(--palette-1eb355);
    color: var(--palette-fff);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--palette-rgba-37-211-102-0-3);
}
.product-display .whatsapp-buy-btn i,
.product-display .external-buy-btn i {
    font-size: 14px;
}

/* CTA de acesso para preços restritos: discreta e no tamanho do conteúdo. */
.product-display .login-price-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100% !important;
    margin-top: 12px;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    color: var(--theme-accent) !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: none !important;
    transition: color .2s ease;
}
.product-display .login-price-btn:hover {
    background: transparent;
    color: var(--palette-fff);
    text-decoration: underline;
}
.product-display .login-price-btn i {
    font-size: 12px;
}
