/* ==========================================================================
   PRODUCT-SINGLE.CSS — Página individual do produto
   ========================================================================== */

/* Correção de margem WooCommerce e compensação da Barra Fixa no Mobile */
.woocommerce div.product {
    margin-top: 0 !important;
    margin-bottom: 180px !important; /* Espaço aumentado para a sticky bar de dois botões */
}
@media (min-width: 1024px) {
    .woocommerce div.product { margin-bottom: 40px !important; }
}

/* Oculta o FAB global do WhatsApp na página do produto (Mobile) para não sobrepor a Sticky Bar */
@media (max-width: 1023px) {
    .whatsapp-fab { display: none !important; }
}

/* Master card (Ajuste de Padding Mobile First para ecrãs como S8) */
.premium-master-card {
    background-color: var(--portal-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 16px; /* Reduzido para dar respiro em ecrãs de 360px */
    box-shadow: var(--shadow-card);
}
@media (min-width: 768px) {
    .premium-master-card { padding: 24px; }
}
@media (min-width: 1024px) {
    .premium-master-card { padding: 40px 43px !important; }
}

/* Header do produto (breadcrumb + título) */
.product-entry-header  { margin-bottom: 3rem; }
.product-badge-row     { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.product-location      { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; font-weight: 500; }
.location-icon         { color: var(--portal-gold); }
.product-title-premium { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin-bottom: 1.5rem; }
.product-mini-specs    { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; font-size: 1rem; color: var(--text-muted); }
.product-mini-spec-item { display: flex; align-items: center; gap: 0.5rem; }
.product-mini-spec-dot  { width: 6px; height: 6px; border-radius: 50%; background: var(--portal-gold); flex-shrink: 0; }

/* Layout de duas colunas */
.product-layout-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    position: relative;
}
.product-col-gallery { flex: 1 1 55%; min-width: 320px; }
.product-col-sidebar { flex: 1 1 35%; min-width: 320px; }

@media (min-width: 1024px) {
    .premium-sticky-wrapper {
        position: sticky !important;
        top: 120px !important;
        z-index: 10;
    }
}

/* ─── GALERIA COM SCROLL SNAP NATIVO (SWIPE MOBILE) ──────────────────────── */
.gallery-wrapper {
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-card);
}

.premium-gallery-container {
    width: 100%;
    height: 350px;
    background-color: #0A0F14;
    position: relative;
    border-radius: 0;
}
@media (min-width: 1024px) { .premium-gallery-container { height: 500px; } }

/* Trilho com rolagem nativa */
.gallery-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Oculta scroll no Firefox */
    -webkit-overflow-scrolling: touch;
}
.gallery-slider-track::-webkit-scrollbar { display: none; } /* Oculta scroll no Chrome/Safari */

.gallery-slide-item {
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-slide__blur     { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(30px); opacity: 0.4; transform: scale(1.1); pointer-events: none; }
.gallery-slide__img      { position: relative; z-index: 10; width: 100%; height: 100%; object-fit: contain; padding: 10px; }

.gallery-nav-btn {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    z-index: 20;
    width: 44px; height: 44px;
    border-radius: 50%;
    background-color: rgba(13, 20, 28, 0.7);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}
.gallery-nav-btn:hover { background-color: var(--portal-gold); color: var(--portal-dark); }
.gallery-nav-prev      { left: 12px; }
.gallery-nav-next      { right: 12px; }

/* Ocultar setas em ecrãs muito pequenos onde o swipe é a ação primária */
@media (max-width: 640px) {
    .gallery-nav-btn { display: none; }
}

.gallery-thumbs {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 16px;
    background: #0A0F14;
    border-top: 1px solid rgba(255,255,255,0.05);
    scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumb-btn {
    flex-shrink: 0;
    width: 80px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    border: 2px solid transparent;
    overflow: hidden;
    transition: all 0.3s;
    background: none;
    padding: 0;
    cursor: pointer;
}
.premium-thumb-img { width: 100%; height: 100%; object-fit: cover !important; }

/* Seções internas (Ficha Técnica, Descrição) */
.product-section          { margin-bottom: 3rem; }
.product-section-title    {
    font-family: var(--font-main);
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}
.product-description-text { font-size: 1.125rem; line-height: 1.8; color: #E5E7EB; }

/* Card de preço / sidebar */
.product-price-card {
    background: var(--portal-dark);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-card);
    margin-bottom: 2rem;
}

.product-price-block  { margin-bottom: 2rem; }
.product-price-label  {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 0.75rem;
    font-weight: 700;
}
.product-price-value {
    font-family: var(--font-main);
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--portal-gold);
    line-height: 1;
}

.product-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Ocultar os botões principais da sidebar no Mobile (já que temos a Sticky Bar) */
@media (max-width: 1023px) {
    .product-price-block, .product-cta-buttons { display: none; }
    .product-price-card { padding: 1.5rem; }
}

/* Especialista */
.specialist-block {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
@media (max-width: 1023px) {
    .specialist-block { padding-top: 0; border-top: none; }
}
.specialist-row   { display: flex; align-items: center; gap: 1rem; }
.specialist-avatar {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--portal-surface);
    border: 1px solid rgba(212, 175, 55, 0.4);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: var(--portal-gold);
}
.specialist-name { color: #fff; font-weight: 700; font-size: 1.125rem; line-height: 1; margin-bottom: 6px; font-family: var(--font-main); }
.specialist-role { font-size: 0.75rem; color: var(--portal-gold); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }

/* Card Padrão Bom Negócio */
.trust-badge-gold {
    background-color: var(--portal-dark);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-card);
}
.trust-heading {
    display: block;
    font-size: 0.75rem;
    color: var(--portal-gold);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    font-weight: 700;
}
.trust-list         { display: flex; flex-direction: column; gap: 1.25rem; list-style: none; }
.trust-icon-wrapper {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--portal-gold);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: var(--portal-gold);
}
.trust-icon-gold { color: var(--portal-gold); }
.info-text-main  { font-size: 0.9375rem; color: #E5E7EB; font-weight: 500; }

/* ─── STICKY BOTTOM BAR (MOBILE ONLY - DUAL ACTION) ──────────────────────── */
.mobile-sticky-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--portal-dark);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 9999;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.8);
}
@media (min-width: 1024px) {
    .mobile-sticky-bottom-bar { display: none; }
}

.sticky-price-info { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 0.5rem;
}
.sticky-label { 
    font-size: 0.75rem; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    font-weight: 700; 
}
.sticky-value { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--portal-gold); 
    font-family: var(--font-main); /* CORREÇÃO AQUI: de font-display para font-main */
    line-height: 1; 
}

.sticky-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}
.sticky-btn-main { 
    width: 100%; 
    justify-content: center;
    padding: 0.8rem 1rem; 
    font-size: 0.8rem; 
}

/* ==========================================================================
   FICHA TÉCNICA — specs grid, cards e tooltips
   ========================================================================== */

/* Grid 2 col mobile / 4 col desktop */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 768px) {
    .specs-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Card */
.spec-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: var(--portal-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s ease;
}
.spec-card:hover {
    border-color: rgba(212, 175, 55, 0.5);
}

/* Círculo do ícone */
.spec-card__icon-wrap {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background-color: var(--portal-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.spec-card:hover .spec-card__icon-wrap {
    background-color: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.5);
}

/* SVG do ícone */
.spec-card__icon-svg {
    width: 1.5rem;
    height: 1.5rem;
    display: block;
    color: #9CA3AF;
    transition: color 0.2s ease;
    flex-shrink: 0;
}
.spec-card:hover .spec-card__icon-svg {
    color: var(--portal-gold);
}

/* Label */
.spec-card__label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6B7280;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Valor */
.spec-card__value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    word-break: break-word;
    width: 100%;
}
@media (min-width: 768px) {
    .spec-card__value { font-size: 1rem; }
}

/* ─── TOOLTIP ─────────────────────────────────────────────────────────────── */

/* Mobile first: toast fixo na base */
.spec-card__tooltip {
    position: fixed;
    bottom: 13rem; /* DISTÂNCIA AUMENTADA PARA PULAR A BARRA DUPLA */
    left: 1rem;
    right: 1rem;
    background-color: var(--portal-dark);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #E5E7EB;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
    z-index: 10000; /* MAIOR QUE A STICKY BAR (9999) */
    pointer-events: none;
    text-align: left;
}

/* Desktop: reposiciona acima do card */
@media (min-width: 768px) {
    .spec-card__tooltip {
        position: absolute;
        bottom: calc(100% + 1rem);
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 16rem;
        border-color: rgba(255, 255, 255, 0.1);
        color: #D1D5DB;
        font-size: 0.75rem;
        border-radius: 0.5rem;
        padding: 1rem;
        text-align: center;
    }
}

.spec-tooltip__mobile-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
@media (min-width: 768px) {
    .spec-tooltip__mobile-header { display: none; }
}

.spec-tooltip__mobile-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    color: var(--portal-gold);
}

.spec-tooltip__mobile-label {
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.625rem;
}

.spec-tooltip__text {
    line-height: 1.625;
}

.spec-tooltip__arrow {
    display: none;
}
@media (min-width: 768px) {
    .spec-tooltip__arrow {
        display: block;
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border: 8px solid transparent;
        border-top-color: var(--portal-dark);
        margin-top: -1px;
    }
}

.spec-tooltip-enter { transition: opacity 0.25s ease, transform 0.25s ease; }
.spec-tooltip-hidden  { opacity: 0; transform: translateY(1rem); }
.spec-tooltip-visible { opacity: 1; transform: translateY(0); }

@media (min-width: 768px) {
    .spec-tooltip-hidden  { opacity: 0; transform: translateX(-50%) translateY(0.5rem); }
    .spec-tooltip-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
}