/* ═══════════════════════════════════════════════════════════════
   catalog.css — Visual Doxa Mobile
   Estilos exclusivos da página Produtos (busca, filtros, grade).
   Carregado apenas em produtos.html. Usa somente as variáveis
   de tema já definidas em base.css (claro/escuro).
   ═══════════════════════════════════════════════════════════════ */

.catalog-section {
    padding-top: 48px;
    padding-bottom: 72px;
}

@media (min-width: 768px) {
    .catalog-section { padding-top: 72px; padding-bottom: 96px; }
}

.catalog-head h1 {
    margin-bottom: 1.25rem;
}

/* Utilitário acessível (texto só para leitores de tela) */
.vd-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ─── Barra de controles ─── */
.catalog-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    margin-bottom: 24px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.catalog-toolbar__row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

@media (min-width: 768px) {
    .catalog-toolbar { padding: 16px; }
    .catalog-toolbar__row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* ─── Busca ─── */
.catalog-search {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.catalog-search__icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.catalog-search__input {
    width: 100%;
    min-height: 48px;
    padding: 12px 48px 12px 44px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem; /* 16px: evita zoom automático no iOS */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.catalog-search__input::placeholder { color: var(--text-muted); }

.catalog-search__input::-webkit-search-cancel-button,
.catalog-search__input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.catalog-search__input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.catalog-search__clear {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: none;
    color: var(--text-secondary);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.catalog-search__clear[hidden] { display: none; }

.catalog-search__clear:hover { color: var(--text-primary); }

.catalog-search__clear:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -4px;
}

/* ─── Ordenação (select estilizado) ─── */
.catalog-sort {
    position: relative;
    flex: 0 0 auto;
}

.catalog-sort__select {
    width: 100%;
    min-height: 48px;
    padding: 12px 44px 12px 18px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.catalog-sort__select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.catalog-sort__select.is-active {
    border-color: var(--accent);
    color: var(--accent);
}

/* Seta desenhada em CSS, herda a cor do tema */
.catalog-sort::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

@media (min-width: 768px) {
    .catalog-sort { min-width: 260px; }
}

/* ─── Chips de marca ─── */
.catalog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.catalog-chip {
    min-height: 44px;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background-color: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.catalog-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.catalog-chip[aria-pressed="true"] {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
}

.catalog-chip:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ─── Contagem + limpar ─── */
.catalog-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
}

@media (min-width: 768px) {
    .catalog-meta { justify-content: flex-end; }
}

.catalog-count {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.catalog-count strong { color: var(--text-primary); }

.catalog-reset {
    min-height: 44px;
    padding: 0 4px;
    border: none;
    background: none;
    color: var(--accent);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.catalog-reset[hidden] { display: none; }

.catalog-reset:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ─── Grade de produtos ─── */
.catalog-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

/* Impede que conteúdo dos cards force rolagem horizontal */
.catalog-grid > * { min-width: 0; }

.catalog-grid .produto-action .btn {
    white-space: normal;
    text-align: center;
}

@media (min-width: 560px) {
    .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
    .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
}

/* ─── Estado vazio ─── */
.catalog-empty {
    grid-column: 1 / -1;
    padding: 48px 24px;
    text-align: center;
    background-color: var(--bg-surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
}

.catalog-empty__title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.catalog-empty__text {
    margin: 0 0 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.catalog-empty .btn { min-height: 44px; padding: 10px 24px; }

@media (prefers-reduced-motion: reduce) {
    .catalog-chip,
    .catalog-search__input,
    .catalog-sort__select { transition: none; }
}

/* PRODUCT DETAIL PAGE */
.section.p-detail-page-section {
    padding: 1.25rem 0 2.5rem;
}
@media (min-width: 768px) {
    .section.p-detail-page-section {
        padding: 3rem 0 4.5rem;
    }
}

.p-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}
.p-detail-layout > * {
    min-width: 0;
}
@media (min-width: 768px) {
    .p-detail-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 4rem;
        align-items: start;
    }
}

.p-detail-gallery {
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    min-height: 280px;
    max-width: 100%;
    overflow: hidden;
}
@media (min-width: 768px) {
    .p-detail-gallery {
        padding: 2rem;
        gap: 1rem;
        min-height: 300px;
    }
}
.p-detail-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    overflow: hidden;
}
.p-detail-stage:has(.p-detail-img) {
    background-color: #FFFFFF;
}
.p-detail-stage-btn {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 1rem;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    border-radius: 0.75rem;
}
.p-detail-stage-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
.p-detail-zoom-hint {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.p-detail-stage-btn:hover .p-detail-zoom-hint,
.p-detail-stage-btn:focus-visible .p-detail-zoom-hint {
    background: var(--accent);
    color: #FFFFFF;
    transform: scale(1.06);
}
.p-detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
}
.p-detail-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
}
.p-detail-gallery-dots {
    margin-top: 0.125rem;
    width: 100%;
    flex-wrap: wrap;
}
.p-detail-gallery-dots .carousel-dot {
    flex: 0 1 26px;
    min-width: 14px;
}
.p-detail-gallery-dots .carousel-dot.is-active {
    flex: 0 1 38px;
    min-width: 24px;
}
.p-detail-gallery-dots[hidden] {
    display: none;
}

.p-detail-shipping {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.875rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm, 8px);
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.28);
    color: #15803d;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
}
[data-theme="dark"] .p-detail-shipping {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.35);
    color: #4ade80;
}
.p-detail-shipping-icon {
    flex-shrink: 0;
}

.p-detail-brand {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.p-detail-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.2;
}
.p-detail-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(34, 197, 94, 0.1);
    color: var(--success, #22c55e);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}
.p-detail-status.consultar {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.p-detail-pricing {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.p-detail-price-pix {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.p-detail-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.p-detail-type {
    font-size: 1rem;
    color: var(--text-secondary);
}
.p-detail-price-card {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}
.p-detail-price--consult {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.p-detail-section {
    margin-bottom: 2rem;
}
.p-detail-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.p-detail-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.p-detail-color-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    border: 2px solid var(--border);
    background: transparent;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    font-weight: 500;
}
.p-detail-color-btn.is-selected {
    border-color: var(--accent);
    background: rgba(23, 118, 255, 0.05);
}
.p-detail-color-btn.is-unavailable,
.p-detail-color-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-style: dashed;
}
.p-detail-color-btn.is-unavailable .color-name,
.p-detail-color-btn:disabled .color-name {
    text-decoration: line-through;
}
.p-detail-color-btn.is-unavailable .color-dot {
    position: relative;
}
.p-detail-color-btn.is-unavailable .color-dot::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -1px;
    width: 24px;
    height: 1.5px;
    background-color: var(--text-primary);
    transform: translateY(-50%) rotate(-45deg);
    pointer-events: none;
}
.p-detail-color-btn .color-dot {
    border: 1.5px solid rgba(15, 23, 42, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 1px 2px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .p-detail-color-btn .color-dot {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.3);
}

.p-detail-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.p-detail-spec-item {
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 0.75rem;
}
.spec-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}
.spec-value {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.p-detail-footer-action {
    margin-top: 2rem;
    position: sticky;
    bottom: 2rem;
    z-index: 10;
}
@media (max-width: 767px) {
    .p-detail-footer-action {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
        background: var(--bg-surface);
        border-top: 1px solid var(--border);
        margin-top: 0;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
    }
    .p-detail-layout {
        padding-bottom: 1.5rem;
    }
    body.has-detail-bar .site-footer,
    body:has(.p-detail-footer-action) .site-footer {
        padding-bottom: calc(96px + env(safe-area-inset-bottom));
    }
    body.has-detail-bar .floating-whatsapp,
    body:has(.p-detail-footer-action) .floating-whatsapp {
        display: none;
    }
}
.p-detail-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    padding: 1rem;
    border-radius: 0.75rem;
}

/* NEW SELECTOR STYLES */
.p-detail-options-group {
    margin-bottom: 2rem;
}
.p-detail-options-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.p-detail-options-title span {
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: 0.5rem;
    text-transform: none;
    letter-spacing: normal;
    font-size: 1rem;
}
.p-detail-capacity-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.p-capacity-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.p-capacity-btn:not([style*="cursor:default"]):hover {
    border-color: var(--text-secondary);
}
.p-capacity-btn.is-selected {
    border-color: var(--accent);
    background: rgba(23, 118, 255, 0.05);
    color: var(--accent);
}

/* ==========================================================
   PAYMENT MODAL — Opções de pagamento
   ========================================================== */
.payment-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: env(safe-area-inset-top) 0 0;
}
.payment-modal[hidden] {
    display: none;
}
.payment-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: vdFadeIn 0.2s ease;
}
.payment-modal-content {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem - env(safe-area-inset-top));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-md, 16px) var(--radius-md, 16px) 0 0;
    box-shadow: var(--shadow-lg);
    animation: vdSheetUp 0.25s cubic-bezier(0.25, 0, 0, 1);
}
.payment-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.payment-modal-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0;
}
.payment-modal-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
}
.payment-modal-variant {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0;
}
.payment-modal-variant:empty {
    display: none;
}
.payment-modal-close {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: -0.5rem -0.5rem 0 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.payment-modal-close:hover {
    background: var(--bg-surface-2);
    color: var(--text-primary);
}
.payment-modal-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.payment-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    padding: 0 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
}
.payment-modal-body:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
.payment-modal-body::-webkit-scrollbar {
    width: 6px;
}
.payment-modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.payment-modal-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.payment-modal-empty {
    padding: 1.5rem 0;
    margin: 0;
    color: var(--text-secondary);
    text-align: center;
}

.payment-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.9375rem;
    font-variant-numeric: tabular-nums;
}
.payment-table .col-parcelas { width: 24%; }
.payment-table .col-valor    { width: 36%; }
.payment-table .col-total    { width: 40%; }
.payment-table .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.payment-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg-surface);
    padding: 0.875rem 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.payment-table th.num,
.payment-table td.num {
    text-align: right;
}
.payment-table tbody th,
.payment-table tbody td {
    padding: 0.8125rem 0.25rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text-primary);
    white-space: nowrap;
}
.payment-table tbody th {
    text-align: left;
    font-weight: 700;
}
.payment-table tbody td:nth-child(2) {
    color: var(--text-secondary);
}
.payment-table tbody tr:last-child th,
.payment-table tbody tr:last-child td {
    border-bottom: none;
}
.payment-table tbody td:last-child {
    font-weight: 600;
}
.payment-row--pix th,
.payment-row--pix td {
    background: var(--accent-subtle);
}
.payment-row--pix th {
    border-radius: var(--radius-sm, 8px) 0 0 var(--radius-sm, 8px);
    padding-left: 0.625rem !important;
}
.payment-row--pix td:last-child {
    border-radius: 0 var(--radius-sm, 8px) var(--radius-sm, 8px) 0;
    padding-right: 0.625rem !important;
    color: var(--accent);
}
.payment-row--pix td:nth-child(2) {
    text-align: right;
}
.payment-tag {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: normal;
}

html.vd-modal-open,
html.vd-modal-open body {
    overflow: hidden;
}

.btn-payment-options {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    margin-top: 0.25rem;
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.btn-payment-options:hover {
    color: var(--accent-hover);
}
.btn-payment-options:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}
.p-detail-price-note {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

@media (min-width: 600px) {
    .payment-modal {
        align-items: center;
        padding: 1.5rem;
    }
    .payment-modal-content {
        border-bottom: 1px solid var(--border);
        border-radius: var(--radius-md, 16px);
        max-height: calc(100vh - 3rem);
        max-height: calc(100dvh - 3rem);
    }
    .payment-modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    .payment-modal-body {
        padding: 0 1.5rem 1.5rem;
    }
}

@media (max-width: 360px) {
    .payment-modal-header {
        padding: 1rem 1rem 0.875rem;
    }
    .payment-modal-body {
        padding: 0 1rem calc(1rem + env(safe-area-inset-bottom));
    }
    .payment-table {
        font-size: 0.875rem;
    }
    .payment-table .col-parcelas { width: 25%; }
    .payment-table .col-valor    { width: 37%; }
    .payment-table .col-total    { width: 38%; }
}

@keyframes vdFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes vdSheetUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .payment-modal-overlay,
    .payment-modal-content {
        animation: none;
    }
}

/* ==========================================================
   HOME — Ajuste de 3 colunas para #ofertas-grid em desktop
   (com 4 cards em Ofertas, iguala aos demais carrosséis)
   ========================================================== */
@media (min-width: 960px) {
    .offers-carousel-track#ofertas-grid > * {
        flex: 0 0 calc((100% - 48px) / 3);
    }
}

/* ==========================================================
   PÁGINA DE DETALHE — Sobre o produto e Ficha técnica
   ========================================================== */
.p-detail-extra {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.p-detail-block-title {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 2.2vw, 1.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.875rem;
    line-height: 1.25;
}

.p-detail-overview-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 16px);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.p-detail-overview-text {
    margin: 0;
    font-size: 0.96875rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.p-detail-specs-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.p-detail-specs-header .p-detail-block-title {
    margin: 0;
}

.p-detail-specs-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.5rem 1.125rem;
    border-radius: var(--radius-pill, 999px);
    border: 1.5px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.p-detail-specs-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}

.p-detail-specs-toggle[aria-expanded="true"] {
    border-color: var(--accent);
    background: var(--accent-subtle);
    color: var(--accent);
}

.p-detail-specs-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.p-detail-specs-toggle-icon {
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

.p-detail-specs-toggle[aria-expanded="true"] .p-detail-specs-toggle-icon {
    transform: rotate(180deg);
}

.p-detail-specs-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.p-detail-specs-wrap[hidden] {
    display: none;
}

.p-detail-specs-group {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 16px);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.p-detail-specs-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.p-detail-specs-table thead th {
    background: var(--bg-surface-2);
    padding: 0.75rem 1.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.p-detail-specs-table tbody th,
.p-detail-specs-table tbody td {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.p-detail-specs-table tbody tr:last-child th,
.p-detail-specs-table tbody tr:last-child td {
    border-bottom: none;
}

.p-detail-specs-table tbody th {
    width: 38%;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: left;
}

.p-detail-specs-table tbody td {
    width: 62%;
    font-weight: 500;
    color: var(--text-primary);
    text-align: left;
}

.p-detail-specs-notes {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 16px);
    box-shadow: var(--shadow-sm);
}

.p-detail-notes-title {
    margin: 0 0 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.p-detail-notes-list {
    margin: 0;
    padding-left: 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    font-size: 0.84375rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.p-detail-sources {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 16px);
    box-shadow: var(--shadow-sm);
}

.p-detail-sources-header {
    margin-bottom: 0.875rem;
}

.p-detail-sources-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 0.96875rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.p-detail-sources-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.p-detail-sources-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.75rem;
}

.p-detail-source-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 10px);
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
    min-width: 0;
}

.p-detail-source-link:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.p-detail-source-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.p-detail-source-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1 1 auto;
}

.p-detail-source-meta {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.p-detail-source-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.p-detail-source-section {
    font-size: 0.78125rem;
    color: var(--text-secondary);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.p-detail-source-action {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}

@media (max-width: 480px) {
    .p-detail-overview-card {
        padding: 1rem 1.125rem;
    }
    .p-detail-specs-table thead th,
    .p-detail-specs-table tbody th,
    .p-detail-specs-table tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    .p-detail-specs-table tbody th {
        width: 42%;
    }
    .p-detail-specs-table tbody td {
        width: 58%;
    }
    .p-detail-specs-notes,
    .p-detail-sources {
        padding: 1rem 1.125rem;
    }
    .p-detail-sources-list {
        grid-template-columns: 1fr;
    }
    .p-detail-source-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .p-detail-specs-header {
        flex-direction: column;
        align-items: stretch;
    }
    .p-detail-specs-toggle {
        width: 100%;
    }
}

/* ==========================================================
   LIGHTBOX MODAL — Visualização ampliada da galeria do produto
   ========================================================== */
.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.lightbox-modal[hidden] {
    display: none;
}
.lightbox-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 29, 0.86);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: vdFadeIn 0.2s ease;
}
.lightbox-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 920px;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 16px);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: vdSheetUp 0.22s cubic-bezier(0.25, 0, 0, 1);
}
.lightbox-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
    flex-shrink: 0;
}
.lightbox-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}
.lightbox-modal-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lightbox-modal-counter {
    font-size: 0.78125rem;
    font-weight: 500;
    color: var(--text-muted);
}
.lightbox-modal-close {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-surface-2);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.lightbox-modal-close:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.lightbox-modal-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.lightbox-modal-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 280px;
    max-height: calc(100vh - 10.5rem);
    max-height: calc(100dvh - 10.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 3.5rem;
    background: #FFFFFF;
    user-select: none;
}
.lightbox-figure {
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-modal-img {
    max-width: 100%;
    max-height: calc(100vh - 13.5rem);
    max-height: calc(100dvh - 13.5rem);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.16);
    background: rgba(255, 255, 255, 0.92);
    color: #0F172A;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.lightbox-nav-btn[hidden] {
    display: none;
}
.lightbox-nav-btn--prev {
    left: 0.75rem;
}
.lightbox-nav-btn--next {
    right: 0.75rem;
}
.lightbox-nav-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: #FFFFFF;
}
.lightbox-nav-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.lightbox-modal-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.lightbox-modal-footer:has(.lightbox-dots[hidden]) {
    display: none;
}
.lightbox-dots {
    margin-top: 0;
    flex-wrap: wrap;
}
.lightbox-dots .carousel-dot {
    flex: 0 1 26px;
    min-width: 14px;
}
.lightbox-dots .carousel-dot.is-active {
    flex: 0 1 38px;
    min-width: 24px;
}
.lightbox-dots[hidden] {
    display: none;
}
@media (max-width: 599px) {
    .lightbox-modal {
        padding: 0.5rem;
    }
    .lightbox-modal-header {
        padding: 0.75rem 1rem;
    }
    .lightbox-modal-stage {
        padding: 1rem 2.75rem;
    }
    .lightbox-nav-btn {
        width: 40px;
        height: 40px;
    }
    .lightbox-nav-btn--prev {
        left: 0.375rem;
    }
    .lightbox-nav-btn--next {
        right: 0.375rem;
    }
}
@media (prefers-reduced-motion: reduce) {
    .lightbox-modal-overlay,
    .lightbox-modal-dialog,
    .p-detail-specs-toggle-icon {
        animation: none;
        transition: none;
    }
}

/* ==========================================================
   PÁGINA DE PRODUTO — selos e avisos
   ========================================================== */
.p-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.875rem;
}
.p-detail-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm, 8px);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    border: 1px solid var(--border);
    background: var(--bg-surface-2);
    color: var(--text-secondary);
}
.p-detail-badge--order {
    background: var(--accent-subtle);
    border-color: var(--accent);
    color: var(--accent);
}
.p-detail-shipping {
    display: flex;
    width: fit-content;
    max-width: 100%;
}
.p-detail-warranty {
    margin: 0.75rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-muted);
}
.p-detail-availability-note {
    margin: 0 0 1.5rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--accent);
    background: var(--bg-surface-2);
    border-radius: 0 var(--radius-sm, 8px) var(--radius-sm, 8px) 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
