
:root {
    --primary-color: #f26d21; /* Laranja LogyPhone */
    --accent-color: #d15a15; /* Laranja Escuro LogyPhone (para botões/hover) */
    --bg-color: #f7f7f7;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #727272;
    --border-color: #eaeaea;
    --input-bg: #f7f7f7;
    --dropdown-bg: #ffffff;
    --dropdown-hover: #f5f5f5;
}

[data-theme="dark"] {
    --bg-color: #121218;
    --card-bg: #1c1c24;
    --header-bg: #1a1a22;
    --text-main: #f0eff5;
    --text-muted: #9a97b3;
    --border-color: #2a2a35;
    --input-bg: #24242e;
    --dropdown-bg: #1c1c24;
    --dropdown-hover: #26262f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    /* Otimizações de composição/paint p/ scroll fluido em mobile */
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Mantém a camada de composição no GPU para evitar jank ao arrastar */
.product-card,
.product-image,
.sidebar,
.header {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Scroll horizontal (thumbs do produto) também com inércia */
.pd-thumbs,
[class*="scroll-x"] {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* Transição suave de hover/estado */
body, body * {
    transition: background-color 0.35s ease, color 0.35s ease,
                border-color 0.35s ease, box-shadow 0.35s ease,
                fill 0.35s ease, stroke 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
    body, body * { transition: none !important; }
}

.top-bar {
    display: none;
}

.header {
    background-color: var(--header-bg);
    color: var(--text-main);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--border-color);
}

/* ─── Stats breadcrumb — acima dos cards, baixa atenção visual ─── */
.catalog-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.stats-bc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0;
}
.stats-bc-count {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
}
/* Desktop: achata .header-top para brand e actions virarem filhos diretos */
.header-top { display: contents; }
.header-brand { order: 1; }
.main-nav { order: 2; }
.header-actions { order: 3; }
.logo-divider {
    color: #d0d0d0;
    font-size: 1.6rem;
    font-weight: 300;
    user-select: none;
    line-height: 1;
}
.logo-nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    margin-right: auto;
}
.logo-nav-link:hover { color: var(--primary-color); }

.header-logo {
    height: 45px;
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
    flex: 1;
}
.icon-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { color: var(--primary-color); background: var(--input-bg); }


.nav-item { position: relative; }

/* Catálogo como rótulo simples ao lado do logo (sem cara de botão) */
.header-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}
.brand-sep {
    color: var(--border-color);
    font-size: 1.5rem;
    font-weight: 300;
    user-select: none;
    line-height: 1;
}
.brand-label.nav-link {
    color: var(--text-main);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    background: none;
    border-radius: 0;
}
.brand-label:hover {
    color: var(--primary-color);
    background: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 400;
    font-size: 0.95rem;
    padding: 0.55rem 1rem;
    border-radius: 24px;
    display: inline-block;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.nav-item:hover > .nav-link,
.nav-item.active > .nav-link {
    background: var(--text-main);
    color: var(--bg-color);
}

.nav-sep {
    color: var(--border-color);
    font-weight: 300;
    user-select: none;
    margin: 0 0.15rem;
}

/* Dropdown mega-menu */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--dropdown-bg);
    box-shadow: 0 12px 32px rgba(0,0,0,0.14);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    min-width: 360px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 200;
}
.nav-item:hover .nav-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.nav-dropdown-title {
    font-weight: 700;
    font-size: 0.75rem;
    color: #999;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.7rem;
}
.nav-dropdown-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
}
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.15s;
}
.nav-dropdown-item:hover {
    background: var(--dropdown-hover);
    color: var(--primary-color);
}
.nav-dropdown-item img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    background: var(--input-bg);
    border-radius: 6px;
}
.nav-dropdown-item .ndi-name {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
}
.nav-dropdown-footer {
    margin-top: 0.9rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}
.nav-dropdown-footer a {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
/* Desktop: botão de busca e home não aparecem */
#searchToggle { display: none; }
#homeBtn { display: none; }

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    width: 260px;
}
.search-close { display: none; }

.search-bar input {
    padding: 0.7rem 1rem 0.7rem 1rem;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    outline: none;
    width: 100%;
    font-size: 0.9rem;
    background-color: var(--input-bg);
    color: var(--text-main);
    transition: border-color 0.2s;
}

.search-bar input:focus {
    border-color: var(--primary-color);
}

.icon-buttons {
    display: flex;
    gap: 1rem;
    color: var(--text-main);
}

.icon-buttons svg {
    cursor: pointer;
    transition: color 0.2s;
}

.icon-buttons svg:hover {
    color: var(--primary-color);
}

.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    display: flex;
    align-items: flex-start; /* sidebar e grid não esticam um no outro */
    gap: 2rem;
    padding: 0 1rem;
}

.sidebar {
    width: 260px;
    background: var(--card-bg);
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    height: fit-content;
}
.sidebar-title {
    color: var(--primary-color);
    font-size: 1.15rem;
    font-weight: 700;
    padding: 0 0 0.9rem 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.3rem;
    background: none;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default;
    font-family: inherit;
}

/* Accordion filter groups (mibrasil-style) */
.filter-group {
    border-bottom: 1px solid var(--border-color);
}
.filter-group:last-child { border-bottom: none; }

.facet-title {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    font: 600 0.98rem 'Roboto', sans-serif;
    color: var(--text-main);
    padding: 1rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.facet-title::after {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1;
    color: #555;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.filter-group.open .facet-title::after {
    content: "−";
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.facet-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition:
        max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.3s ease,
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        padding-bottom 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.filter-group.open .facet-body {
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
    padding-bottom: 0.75rem;
}

.facet-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.facet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.45rem 0;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    transition: color 0.15s ease;
}
.facet-item:hover { color: var(--primary-color); }
.facet-item.active {
    color: var(--primary-color);
    font-weight: 600;
}
.facet-item-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 1;
    min-width: 0;
}
.facet-item .facet-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #ccc;
    flex-shrink: 0;
}
.facet-count {
    color: #999;
    font-size: 0.82rem;
    flex-shrink: 0;
}
.facet-item.active .facet-count { color: var(--primary-color); }
.facet-item.disabled {
    opacity: 0.4;
    pointer-events: none;
}
.facet-clear {
    display: block;
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.5rem;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.facet-clear:hover {
    background: var(--primary-color);
    color: #fff;
}
.facet-clear:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: transparent;
    color: var(--primary-color);
}

.product-grid {
    flex: 1;
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 0.85rem;
    align-items: stretch;
}

.product-card {
    display: flex;
    flex-direction: column;
    min-width: 0; /* prevents grid blowout when child content overflows */
}
/* Cola o bloco inferior (dots + CTA) ao fim do card p/ alinhar cards de alturas diferentes */
.product-card .color-dots { margin-top: 0.15rem; }

.product-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 0.65rem 0.9rem 0.7rem;
    text-align: left;
    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.35s ease,
        background-color 0.35s ease;
    border: 1px solid color-mix(in srgb, var(--border-color) 60%, transparent);
    position: relative;
}

.product-card:hover {
    z-index: 2;
}

.card-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.heart-icon {
    color: #727272;
    cursor: pointer;
}

.heart-icon:hover {
    color: var(--primary-color);
}

.badges-container {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-end;
}

.badge-green {
    background-color: #00e676;
    color: #1a1a1a;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-outline {
    background-color: var(--card-bg);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Wrapper branco fixo — não escala. Mantém o "card" visualmente estável. */
/* Negative top margin matches card padding-top (0.65rem) exactly — no gap at top. */
.product-image-wrap {
    width: auto;
    height: 162px;
    flex-shrink: 0;
    margin: -0.65rem -0.9rem 0.45rem -0.9rem;
    padding: 0.9rem;
    border-radius: 10px 10px 0 0;
    background-color: #ffffff;
    overflow: hidden;
    display: block;
    position: relative;
    flex-shrink: 0;
}
/* Só a imagem escala dentro do wrapper */
.product-image {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    aspect-ratio: 4 / 5;
    object-fit: contain;
    object-position: center;
}

/* Logo alternativa no modo escuro */
[data-theme="dark"] .header-logo {
    content: url('logo-dark.png');
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
    color: var(--text-main);
    line-height: 1.50rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-subtitle {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    line-height: 1.35;
    /* min-height removed: titles are nowrap+ellipsis so rows align via grid, not per-card flex */
}

.color-dots {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
    outline: 1px solid #ccc;
    padding: 0;
    background-clip: padding-box;
    display: inline-block;
    pointer-events: none;
}

.product-price-block {
    margin-bottom: 0.5rem;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.2rem;
}

.new-price {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.2rem;
}

.discount-text {
    color: #1a1a1a;
    font-size: 0.75rem;
    display: block;
}

.card-hidden-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    margin-top: 0;
    transition:
        max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.35s ease 0.05s,
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        margin-top 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    /* will-change removed: this element is not the primary animation layer;
       card-footer .color-dots and .card-hover-cta carry will-change instead */
}

.product-card:hover .card-hidden-content {
    max-height: 200px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 1rem;
}

.installments-text {
    color: #1a1a1a;
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.whatsapp-btn {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.7rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
    width: 100%;
    text-align: center;
    transition: background-color 0.2s;
}

.whatsapp-btn:hover {
    background-color: var(--accent-color);
}

/* ─── Rodapé rico (3 colunas) ─── */
.footer {
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-muted);
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 3rem;
}
.footer-col-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
}
.footer-brand-logo {
    height: 32px;
    width: auto;
    display: block;
    margin-bottom: 0.85rem;
}
[data-theme="dark"] .footer-brand-logo {
    content: url('logo-dark.png');
}
.footer-tagline {
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 320px;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--primary-color); }
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}
@media (max-width: 720px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem 0;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 1.5rem;
        padding: 1.2rem 1rem 1.8rem;
    }
}

/* ─── Compare bar (bottom-anchored, blurred) ─── */
.compare-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 250;
    padding: 0.75rem 1rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,0.85);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--border-color);
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s ease;
}
[data-theme="dark"] .compare-bar {
    background: rgba(20,20,20,0.85);
}
.compare-bar.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.compare-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.compare-bar-slots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.cmp-bar-slot {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--input-bg);
    border-radius: 8px;
    padding: 0.3rem 0.5rem 0.3rem 0.35rem;
    max-width: 190px;
    min-width: 0;
}
.cmp-bar-slot-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
}
.cmp-bar-slot-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.cmp-bar-slot-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0.1rem 0.15rem;
    flex-shrink: 0;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}
.cmp-bar-slot-remove:hover { color: var(--text-main); background: var(--border-color); }
.cmp-bar-vs {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.cmp-bar-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.compare-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.compare-bar-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}
.compare-bar-clear:hover { color: var(--text-main); background: var(--input-bg); }
.compare-bar-cta {
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}
.compare-bar-cta:hover { background: var(--accent-color); transform: translateY(-1px); }
/* Bar with thumbnails is ~64px + 0.75rem top + 0.75rem bottom padding ≈ 88px; use 72px safe floor */
body.has-compare-bar { padding-bottom: 88px; }
@media (max-width: 520px) {
    .compare-bar-label { font-size: 0.82rem; }
    .compare-bar-cta { padding: 0.55rem 0.9rem; font-size: 0.85rem; }
}

/* ─── Card compare toggle (small +) ─── */
/* ── Opção 1 — pill no canto (ícone + texto) ── */
.card-compare-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    height: 24px;
    padding: 0 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font: 600 0.7rem 'Roboto', sans-serif;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.card-compare-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.card-compare-toggle.is-active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.card-compare-toggle svg { width: 15px; height: 15px; flex-shrink: 0; }
.card-compare-toggle .cmp-pill-check { display: none; }
.card-compare-toggle.is-active .cmp-pill-add { display: none; }
.card-compare-toggle.is-active .cmp-pill-check { display: block; }

.card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.3rem 0 0.25rem;
}
.card-brand {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    font: 700 0.65rem 'Roboto', sans-serif;
    letter-spacing: 0.09em;
    color: var(--primary-color);
    text-transform: uppercase;
    min-width: 0; /* prevents overflow when brand name + compare button are both wide */
}
.card-brand-dot {
    font-size: 0.5rem;
    line-height: 1;
}

/* ── Opção 2 — substitui "Ver detalhes" no MESMO slot (sem aumentar o card) ── */
.card-cmp-add {
    display: none;
    box-sizing: border-box;
    width: 100%;
    height: 34px;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0 0.75rem;
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-main);
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease, opacity 0.18s ease;
}
.card-cmp-add svg { width: 15px; height: 15px; flex-shrink: 0; }
.card-cmp-add:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 6%, transparent);
}
.card-cmp-add.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}
/* Modo de comparação ativo:
   - card selecionado  : oculta todo o CTA (nada no footer), mantém dots visíveis
   - card não-selecionado: esconde pill do canto, troca "Ver detalhes" → "Adicionar à comparação"
   - o botão aparece SEM precisar de hover (CTA fixo, dots escondidos) */

/* Card selecionado → sem footer (só o pill "✓ Comparando" no canto já basta) */
/* 1) esconde btn-details imediatamente (display não faz transição — sem flash) */
.product-grid.cmp-active .product-card.is-cmp-selected .btn-details { display: none; }
/* 2) colapsa o CTA sem animação — elimina a janela de fade em que btn-details seria visível */
.product-grid.cmp-active .product-card.is-cmp-selected .card-footer .card-hover-cta {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    transition: none;
}

/* Cards não-selecionados → dim + mostrar "Adicionar à comparação" fixo */
.product-grid.cmp-active .product-card:not(.is-cmp-selected) {
    opacity: 0.68;
    transition: opacity 0.2s ease;
}
.product-grid.cmp-active .product-card:not(.is-cmp-selected):hover { opacity: 1; }
.product-grid.cmp-active .product-card:not(.is-cmp-selected) .card-compare-toggle { display: none; }
.product-grid.cmp-active .product-card:not(.is-cmp-selected) .card-hover-cta .btn-details { display: none; }
.product-grid.cmp-active .product-card:not(.is-cmp-selected) .card-hover-cta .card-cmp-add { display: inline-flex; }
.product-grid.cmp-active .product-card:not(.is-cmp-selected) .card-footer .card-hover-cta {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
}
.product-grid.cmp-active .product-card:not(.is-cmp-selected) .card-footer .color-dots {
    opacity: 0;
    pointer-events: none;
}

/* ─── Mobile filter trigger + bottom sheet ─── */
.filters-trigger {
    display: none;
    align-items: center;
    gap: 0.45rem;
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-start;
}
.filters-trigger:hover { border-color: var(--primary-color); color: var(--primary-color); }
.filters-trigger svg { width: 16px; height: 16px; }

/* ============================================================
   FILTER SHEET — dois painéis (mobile)
   ============================================================ */
.filters-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.48);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.filters-sheet-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* Contêiner principal — modal centralizado, altura automática */
.filters-sheet {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1000;
    background: var(--card-bg);
    border-radius: 20px;
    width: calc(100% - 32px);
    max-width: 480px;
    height: auto;
    max-height: min(88vh, 680px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translate(-50%, -50%) scale(0.94);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.22s ease,
                height 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    pointer-events: none;
    box-shadow: 0 8px 48px rgba(0,0,0,0.28);
}
.filters-sheet.is-open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Handle oculto no modal (era do bottom sheet) */
.filters-sheet-handle { display: none; }

/* ── Dois painéis em linha (flow normal — altura automática) ── */
.filters-sheet .fsheet-panels-wrap {
    /* 200% de largura: cada painel ocupa 50% = 100% do modal visível */
    width: 200%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;   /* painéis NÃO se esticam para igualar alturas */
    transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
}
.filters-sheet.in-opts .fsheet-panels-wrap {
    transform: translateX(-50%); /* desliza 50% de 200% = 1 painel */
}

.fsheet-panel {
    width: 50%;   /* 50% de 200% = 100% do modal */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
}

/* ── Cabeçalho comum dos painéis ── */
.fsheet-header {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem 0.6rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0.5rem;
    flex-shrink: 0;
    min-height: 52px;
}
.fsheet-header-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}
.fsheet-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.fsheet-btn-close,
.fsheet-btn-back {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: background 0.15s;
}
.fsheet-btn-close:hover,
.fsheet-btn-back:hover { background: rgba(0,0,0,0.06); }
[data-theme="dark"] .fsheet-btn-close:hover,
[data-theme="dark"] .fsheet-btn-back:hover { background: rgba(255,255,255,0.08); }

.fsheet-btn-clear {
    background: none;
    border: none;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
    white-space: nowrap;
}
.fsheet-btn-clear:hover { background: rgba(255,105,0,0.08); }
.fsheet-btn-clear--cat { visibility: hidden; }

/* ── Lista de categorias (Painel 1) ── */
.fsheet-cat-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.fsheet-cat-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.1rem;
    min-height: 56px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    gap: 0.75rem;
    transition: background 0.13s;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}
.fsheet-cat-row:last-child { border-bottom: none; }
.fsheet-cat-row:active,
.fsheet-cat-row:hover { background: rgba(0,0,0,0.035); }
[data-theme="dark"] .fsheet-cat-row:active,
[data-theme="dark"] .fsheet-cat-row:hover { background: rgba(255,255,255,0.04); }

.fsheet-cat-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    flex-shrink: 0;
}
.fsheet-cat-row.has-active .fsheet-cat-label {
    color: var(--primary-color);
    font-weight: 600;
}
.fsheet-cat-right {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
    overflow: hidden;
}
.fsheet-cat-summary {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}
.fsheet-cat-badge {
    background: var(--primary-color);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    flex-shrink: 0;
}
.fsheet-cat-chevron {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ── Corpo de opções (Painel 2) ── */
.fsheet-opts-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 1rem 0.75rem;
    max-height: calc(min(88vh, 680px) - 130px); /* evita overflow quando modal no limite */
}

/* ── Pills de cor — 2 colunas ────────────────────────────── */
.fsheet-color-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 2px 1px 8px; /* 1px lateral evita clip das bordas das pills */
}

.fsheet-swatch {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    border: 1.5px solid var(--border-color);
    background: var(--card-bg);
    transition: border-color 0.14s, background 0.14s, box-shadow 0.14s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-height: 48px;
}
.fsheet-swatch:active {
    background: rgba(0,0,0,0.04);
}
[data-theme="dark"] .fsheet-swatch:active {
    background: rgba(255,255,255,0.06);
}
.fsheet-swatch.active {
    border-color: var(--primary-color);
    background: rgba(255, 105, 0, 0.06);
    box-shadow: 0 0 0 1px var(--primary-color);
}
[data-theme="dark"] .fsheet-swatch.active {
    background: rgba(255, 105, 0, 0.12);
}
.fsheet-swatch.disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* Dot circular dentro da pill */
.fsheet-swatch-dot {
    position: relative;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
    transition: transform 0.14s;
}
.fsheet-swatch-dot.light {
    border-color: rgba(0, 0, 0, 0.25);
}
.fsheet-swatch.active .fsheet-swatch-dot {
    transform: scale(1.05);
}
/* Checkmark sobre o dot quando selecionado */
.fsheet-swatch.active .fsheet-swatch-dot::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.55);
    line-height: 1;
}
.fsheet-swatch.active .fsheet-swatch-dot.light::after {
    color: #333;
    text-shadow: none;
}

/* Nome da cor — ocupa espaço restante */
.fsheet-swatch-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fsheet-swatch.active .fsheet-swatch-name {
    color: var(--primary-color);
    font-weight: 600;
}

/* Count alinhado à direita */
.fsheet-swatch-count {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    flex-shrink: 0;
}
.fsheet-swatch.active .fsheet-swatch-count {
    color: var(--primary-color);
}

/* Lista de checkboxes (câmera, bateria, etc.) */
.fsheet-check-list { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 6px; }
.fsheet-check-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.13s, border-color 0.13s;
    -webkit-tap-highlight-color: transparent;
}
.fsheet-check-row:last-child { border-bottom: none; }
.fsheet-check-row:active { background: rgba(0,0,0,0.04); }
.fsheet-check-row.active {
    border-color: var(--primary-color);
    background: rgba(255,105,0,0.05);
}
.fsheet-check-row.disabled { opacity: 0.38; pointer-events: none; }
.fsheet-check-box {
    width: 22px; height: 22px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.14s, background 0.14s;
}
.fsheet-check-row.active .fsheet-check-box {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.fsheet-check-label {
    flex: 1;
    font-size: 0.92rem; font-weight: 400;
    color: var(--text-main);
}
.fsheet-check-row.active .fsheet-check-label { font-weight: 600; color: var(--primary-color); }
.fsheet-check-count {
    font-size: 0.8rem; color: var(--text-muted); font-weight: 400;
}

/* ── Rodapé comum dos painéis ── */
.fsheet-footer {
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--card-bg);
}
.fsheet-apply {
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0.9rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.01em;
}
.fsheet-apply:hover { background: var(--accent-color); }
.fsheet-apply:active { transform: scale(0.98); }
/* estilos legados para não quebrar referências antigas */
.filters-sheet-apply:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
        row-gap: 0.6rem;
        padding: 0 0.75rem;
    }
    .header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }
    .main-nav { width: 100%; justify-content: center; overflow-x: auto; flex: initial; }
    .search-bar input { width: 100%; }
    .main-content {
        flex-direction: column;
        /* Em coluna, o cross-axis é horizontal — sem stretch o wrapper do grid
           encolhe para a largura do conteúdo e o grid cai para 1 coluna. */
        align-items: stretch;
        gap: 1rem;
        margin: 1rem auto;
        padding: 0 0.75rem;
    }
    .sidebar {
        width: 100%;
        padding: 1rem 1.2rem;
    }
    /* No mobile, a sidebar inline desaparece — os filtros viram bottom-sheet */
    .main-content > .sidebar { display: none; }
    .filters-trigger { display: inline-flex; align-self: flex-start; }
    /* Filtros colapsáveis por padrão no mobile — transição suave herdada do bloco base .facet-body */
    .product-grid {
        /* main-content é flex-column no mobile; sem stretch o grid encolhe para a
           largura do conteúdo e vira 1 coluna ao filtrar para poucos produtos. */
        width: 100%;
        align-self: stretch;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.7rem;
    }
    .product-card { padding: 1rem; }
    /* Mobile: wrapper branco alinha ao padding do card (1rem) em ambos os temas */
    .product-image-wrap {
        height: 175px;
        margin: -1rem -1rem 1rem -1rem;
        padding: 1rem;
    }
    .product-title { font-size: 1rem; }
    .product-subtitle { font-size: 0.8rem; min-height: auto; margin-bottom: 0.9rem; }
    /* No mobile, esqueça o efeito "hover" (não existe touch-hover); manter dots visíveis */
    .product-card:hover { transform: none; box-shadow: none; }

    /* Dropdowns do nav ficam estranhos no mobile: esconder */
    .nav-dropdown { display: none !important; }

    /* Mobile: barra de busca escondida, botão aparece */
    #searchToggle { display: inline-flex; }
    #homeBtn { display: inline-flex; align-items: center; justify-content: center; color: var(--text-main); }
    body.search-open #homeBtn { display: none; }
    .search-bar { display: none; }
    .brand-label.nav-link { font-weight: 500; }

    /* Quando aberta, barra ocupa a linha inteira do header-top,
       escondendo Catálogo */
    body.search-open .header-brand .brand-sep,
    body.search-open .header-brand .brand-label { display: none; }
    body.search-open .search-bar { display: flex; flex: 1; width: auto; }
    body.search-open .search-close { display: inline-flex; }
    body.search-open #searchToggle { display: none; }

    /* Filtros: colapsável no mobile */
    .sidebar .sidebar-title {
        cursor: pointer;
    }
    /* Botão + / − no título de Filtros (mesma estética do facet-title) */
    .sidebar .sidebar-title::after {
        content: "−";
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        border: 1px solid var(--primary-color);
        border-radius: 4px;
        font-size: 14px;
        line-height: 1;
        color: var(--primary-color);
        transition: color 0.2s ease, border-color 0.2s ease;
    }
    .sidebar.collapsed .sidebar-title::after {
        content: "+";
        border-color: #bbb;
        color: #555;
    }
    .sidebar-body {
        overflow: hidden;
        max-height: 2000px;
        opacity: 1;
        transform: translateY(0);
        transition:
            max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.35s ease 0.08s,
            transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .sidebar.collapsed .sidebar-body {
        max-height: 0;
        opacity: 0;
        transform: translateY(-8px);
        transition:
            max-height 0.4s cubic-bezier(0.55, 0, 0.68, 0.22),
            opacity 0.2s ease,
            transform 0.4s cubic-bezier(0.55, 0, 0.68, 0.22);
    }
    .sidebar.collapsed .sidebar-title { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
}

@media (max-width: 520px) {
    .header { padding: 0.8rem 0; }
    .header-container { padding: 0 0.55rem; gap: 0.3rem; }
    .header-top { gap: 0.5rem; }
    .header-brand { gap: 0.5rem; }
    .header-logo { height: 37px; }
    .brand-sep { font-size: 1.1rem; }
    .brand-label.nav-link { font-size: 0.82rem; }
    .header-actions { gap: 0.05rem; }
    .icon-btn { padding: 0.25rem; }
    .icon-btn svg { width: 19px; height: 19px; }
    /* No mobile, a logo já leva para a home — esconde o botão redundante */
    #homeBtn { display: none !important; }
    .search-bar input { width: 100%; }
    .main-nav { gap: 0.1rem; font-size: 0.88rem; }
    .nav-link { padding: 0.45rem 0.7rem; font-size: 0.88rem; }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.6rem;
    }
    .product-card { padding: 0.7rem; border-radius: 10px; }
    /* Negative margins must match 0.7rem padding used at this breakpoint */
    .product-image-wrap { height: 155px; margin: -0.7rem -0.7rem 0.45rem -0.7rem; padding: 0.7rem; }
    .product-title { font-size: 0.92rem; }
    .product-subtitle { font-size: 0.78rem; min-height: auto; margin-bottom: 0.7rem; }
    .btn-details { padding: 0.55rem; font-size: 0.82rem; }
    .color-dots .dot { width: 12px; height: 12px; }
    .footer { padding: 1.2rem 0.8rem; font-size: 0.75rem; margin-top: 2rem; }
}

/* On pure-touch devices (no hover) dots must always be visible; CTA only on tap */
@media (hover: none) {
    .product-card .card-footer .color-dots {
        transform: none !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    .product-card .card-footer .card-hover-cta {
        transform: translateY(8px) !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    /* Exception: when card is tapped, flip to show CTA */
    .product-card.is-tapped .card-footer .color-dots {
        transform: translateY(-8px) !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    .product-card.is-tapped .card-footer .card-hover-cta {
        transform: translateY(0) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

/* Card hover: sem expansão do card (estilo cbeneficio) — apenas zoom leve da imagem.
   O botão "Ver detalhes" substitui os color-dots no mesmo espaço, sem alterar a altura. */
.product-card {
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow 0.28s ease;
}
.product-card:hover {
    z-index: 2;
}
.product-card .product-image {
    transform: scale(0.95);
    transform-origin: center;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.product-card:hover .product-image,
.product-card:focus-within .product-image,
.product-card.is-tapped .product-image { transform: scale(1); }

/* Rodapé do card: dots e CTA ocupam o mesmo espaço, alternando com slide vertical.
   Sem overflow:hidden no rodapé para não clipar o outline dos dots — usamos clip-path
   só na "gaveta" do CTA para esconder/revelar o botão durante o slide. */
.product-card .card-footer {
    position: relative;
    margin-top: auto;
    height: 40px;
}
.product-card .card-footer .color-dots {
    position: absolute;
    left: 0; right: 0; top: 0; bottom: 0;
    margin: 0;
    display: flex;
    align-items: center;
    transition:
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform, opacity;
}
.product-card .card-footer .card-hover-cta {
    position: absolute;
    left: 0; right: 0; top: 0; bottom: 0;
    margin: 0;
    display: flex;
    align-items: center;
    transform: translateY(8px);
    opacity: 0;
    pointer-events: none;
    max-height: none;
    transition:
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: transform, opacity;
}
.product-card:hover .card-footer .color-dots,
.product-card:focus-within .card-footer .color-dots,
.product-card.is-tapped .card-footer .color-dots {
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
}
.product-card:hover .card-footer .card-hover-cta,
.product-card:focus-within .card-footer .card-hover-cta,
.product-card.is-tapped .card-footer .card-hover-cta {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0.05s;
}
.btn-details {
    background-color: var(--primary-color);
    color: #fff; padding: 0.55rem; border-radius: 7px;
    font-size: 0.85rem; font-weight: 600; width: 100%;
    text-align: center; border: none; cursor: pointer; display: block;
}
.btn-details:hover { background-color: var(--accent-color); }

/* Modal color swatches (kept circular/clickable inside product modal) */
.color-swatch {
    width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid #fff; outline: 1px solid #ccc;
    cursor: pointer; transition: transform 0.15s;
}
.color-swatch.active {
    outline: 2px solid var(--primary-color);
    transform: scale(1.15);
}

/* Modal */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--card-bg); color: var(--text-main); border-radius: 14px;
    max-width: 900px; width: 100%; max-height: 90vh;
    overflow-y: auto; padding: 2rem; position: relative;
    display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
}
.modal-close {
    position: absolute; top: 10px; right: 16px;
    background: none; border: none; font-size: 1.8rem;
    cursor: pointer; color: #727272;
}
/* Galeria estilo mibrasil: thumbs vertical à esquerda + imagem grande */
.modal-gallery {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.modal-gallery .main-img {
    flex: 1;
    width: 100%; aspect-ratio: 4/5; object-fit: contain;
    background: #f7f7f7; border-radius: 10px;
}
.modal-thumbs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}
.modal-thumbs img {
    width: 64px; height: 64px; object-fit: cover;
    border: 2px solid transparent; border-radius: 6px;
    cursor: pointer; background: #f7f7f7;
}
.modal-thumbs img.active { border-color: var(--primary-color); }
.modal-info h2 { margin-bottom: 0.3rem; }
.modal-info .modal-sub { color: var(--text-muted); margin-bottom: 1rem; }
.modal-info h4 { margin: 1rem 0 0.5rem; font-size: 0.95rem; }
.specs-list { list-style: none; padding: 0; font-size: 0.88rem; color: #333; }
.specs-list li {
    padding: 0.4rem 0; border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between;
}
.modal-colors { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.modal-colors .color-swatch { width: 28px; height: 28px; }
.modal .whatsapp-btn { margin-top: 1.5rem; }
.color-select-label {
    margin: 1rem 0 0.5rem;
    font-size: 0.92rem;
    color: var(--text-main);
}
.color-select-label strong { font-weight: 600; }
.whatsapp-btn-large {
    padding: 0.95rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 720px) {
    .modal { grid-template-columns: 1fr; padding: 1.2rem; }
}


/* ============================================================
   Smooth effects globais (mobile + desktop)
   ============================================================ */

/* Cards: fade-in + sutil slide-up ao renderizar */
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.product-card {
    animation: cardFadeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* Stagger pequeno nos primeiros cards */
.product-card:nth-child(1) { animation-delay: 0.00s; }
.product-card:nth-child(2) { animation-delay: 0.05s; }
.product-card:nth-child(3) { animation-delay: 0.10s; }
.product-card:nth-child(4) { animation-delay: 0.15s; }
.product-card:nth-child(5) { animation-delay: 0.20s; }
.product-card:nth-child(6) { animation-delay: 0.25s; }
.product-card:nth-child(n+7) { animation-delay: 0.30s; }

/* Card title/subtitle ganham transição suave de cor (tema claro/escuro) */
.product-title, .product-subtitle {
    transition: color 0.3s ease;
}

/* Botão "Ver detalhes" — leve push e bg suave */
.btn-details {
    transition:
        background-color 0.25s ease,
        transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.25s ease;
}
.btn-details:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(242,109,33,0.25);
}
.btn-details:active { transform: translateY(0); }

/* ===== Filtros: mais smoothness ===== */

/* Indicador +/− gira suavemente */
.facet-title::after {
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.25s ease,
        color 0.25s ease;
}
.filter-group.open .facet-title::after {
    transform: rotate(180deg);
}

/* facet-title hover */
.facet-title {
    transition: color 0.2s ease;
}
.facet-title:hover { color: var(--primary-color); }

/* facet-item: fundo sutil no hover + transição mais completa */
.facet-list .facet-item {
    border-radius: 6px;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    margin: 0 -0.4rem;
    transition:
        color 0.2s ease,
        background-color 0.25s ease,
        transform 0.2s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.facet-list .facet-item:hover {
    background-color: rgba(242,109,33,0.06);
    transform: translateX(2px);
}
.facet-list .facet-item.active {
    background-color: rgba(242,109,33,0.10);
}

/* facet-clear (botão "Limpar filtros") suaviza */
.facet-clear {
    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        opacity 0.25s ease;
}

/* Sidebar (desktop também ganha transição quando colapsada) */
.sidebar-body {
    transition:
        max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.35s ease,
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.sidebar-title { transition: color 0.2s ease, border-color 0.25s ease; }
.sidebar-title:hover { color: var(--primary-color); }

/* Nav links da topbar: apenas transição suave de cor */
.main-nav .nav-link {
    transition: color 0.25s ease;
}

/* Dropdowns do nav: já têm display:none/block — adicionar fade */
.nav-dropdown {
    opacity: 0;
    transform: translateY(-6px);
    transition:
        opacity 0.25s ease,
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.25s;
    visibility: hidden;
    pointer-events: none;
}
.nav-item:hover .nav-dropdown {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}
.nav-dropdown-item {
    transition:
        background-color 0.2s ease,
        transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-dropdown-item:hover { transform: translateX(3px); }

/* Reduce motion: respeita preferência do usuário */
@media (prefers-reduced-motion: reduce) {
    .product-card { animation: none; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ============================================================
   BANNER DE CONSENTIMENTO DE COOKIES (LGPD)
   ============================================================ */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 2000;
    max-width: 720px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transform: translateY(140%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease;
}
[data-theme="dark"] .cookie-banner {
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.35);
}
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; }
.cookie-banner-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem 1.2rem;
    justify-content: space-between;
}
.cookie-banner-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
    flex: 1;
    min-width: 240px;
    margin: 0;
}
.cookie-banner-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
.cookie-banner-text a:hover { text-decoration: underline; }
.cookie-banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}
.cookie-btn {
    font: 600 0.85rem 'Roboto', sans-serif;
    padding: 0.6rem 1.15rem;
    border-radius: 999px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}
.cookie-btn-reject {
    background: transparent;
    color: var(--text-main);
}
.cookie-btn-reject:hover { border-color: var(--text-main); }
.cookie-btn-accept {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.cookie-btn-accept:hover { background: var(--accent-color); border-color: var(--accent-color); }
@media (max-width: 520px) {
    .cookie-banner-actions { width: 100%; }
    .cookie-btn { flex: 1; }
}

/* Links legais no rodapé */
.footer-legal-links { display: inline-flex; gap: 0.5rem; flex-wrap: wrap; }
.footer-legal-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-legal-links a:hover { color: var(--primary-color); }
.footer-legal-sep { opacity: 0.5; }

/* ============================================================
   PÁGINAS LEGAIS (privacidade / cookies)
   ============================================================ */
.legal-wrap {
    max-width: 820px;
    margin: 2.5rem auto 4rem;
    padding: 0 1.25rem;
}
.legal-wrap h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
    line-height: 1.15;
}
.legal-updated {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}
.legal-wrap h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 2.2rem 0 0.6rem;
    letter-spacing: -0.01em;
}
.legal-wrap h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 1.4rem 0 0.4rem;
}
.legal-wrap p,
.legal-wrap li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-main);
}
.legal-wrap p { margin-bottom: 0.9rem; }
.legal-wrap ul { margin: 0 0 1rem 1.2rem; }
.legal-wrap li { margin-bottom: 0.45rem; }
.legal-wrap a { color: var(--primary-color); text-decoration: none; font-weight: 500; }
.legal-wrap a:hover { text-decoration: underline; }
.legal-wrap strong { font-weight: 600; }
.legal-intro {
    font-size: 1.02rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.5rem;
}
.legal-note {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 1.5rem 0;
}
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.88rem;
}
.legal-table th,
.legal-table td {
    text-align: left;
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}
.legal-table th {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    font-weight: 700;
}
.legal-table td { color: var(--text-main); line-height: 1.5; }
.legal-table td code {
    background: var(--input-bg);
    border-radius: 4px;
    padding: 0.05rem 0.35rem;
    font-size: 0.85em;
}
@media (max-width: 600px) {
    .legal-table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; width: 100%; }
    .legal-table thead { display: none; }
    .legal-table tr { border-bottom: 1px solid var(--border-color); padding: 0.6rem 0; }
    .legal-table td { border: none; padding: 0.15rem 0; }
    .legal-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--text-muted);
        font-weight: 700;
        margin-top: 0.4rem;
    }
}
