/* =====================================================================
   Panamar — Página de detalhe de produto (Foco)
   Segue o layout do protótipo: split galeria (esq.) + buy-box (dir.),
   header dark a flutuar sobre a galeria, secção de relacionados.
   Fonts: Spectral (títulos/preço) + Jost (texto/UI). Dark #161616.
   ===================================================================== */

.panamar-foco { background: #eeeeee; }

/* Header dark a flutuar sobre a galeria */
.panamar-foco .panamar-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: transparent;
}

/* ─── Split principal ─────────────────────────────────────────────── */
.foco__detail {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
@media (min-width: 1024px) {
    .foco__detail { flex-direction: row; }
}

/* ─── Galeria (esquerda) ──────────────────────────────────────────── */
/* Fundo TRANSPARENTE (não o cinzento #d8d5cf): quando a coluna da info é mais
   alta que a galeria, a área por baixo da imagem passa a mostrar o #eee da
   página (.panamar-foco), que condiz com a coluna da info — em vez do cinzento
   feio. Layout mantém-se como antes (imagem 100vh, sem sticky). */
.foco__gallery { position: relative; width: 100%; background: transparent; }
@media (min-width: 1024px) { .foco__gallery { width: 50%; } }

.foco__stage { position: relative; width: 100%; height: 70vw; }
@media (min-width: 1024px) { .foco__stage { height: 100vh; } }

.foco__slide {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0; transition: opacity .5s ease;
    pointer-events: none;
}
.foco__slide.is-active { opacity: 1; }

.foco__arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 10;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border: none; border-radius: 50%;
    background: rgba(0,0,0,.2); color: #fff;
    cursor: pointer; transition: background .2s;
}
.foco__arrow:hover { background: rgba(0,0,0,.38); }
.foco__arrow--prev { left: 12px; }
.foco__arrow--next { right: 12px; }

.foco__dots {
    position: absolute; bottom: 18px; left: 0; right: 0;
    display: flex; justify-content: center; gap: 8px; z-index: 10;
}
.foco__dot {
    width: 7px; height: 7px; padding: 0;
    border: none; border-radius: 50%;
    background: #fff; opacity: .55; cursor: pointer;
    transition: all .25s;
}
.foco__dot.is-active { opacity: 1; width: 18px; border-radius: 4px; }

.foco__thumbs {
    position: absolute; bottom: 56px; left: 16px;
    /* Não passar dos limites da galeria: com muitas fotos (ex.: 26), limita a
       altura e faz scroll interno em vez de estourar para cima. Mantém a âncora
       em baixo, por isso com poucas fotos fica como antes. */
    max-height: calc(100% - 92px);
    display: none; flex-direction: column; gap: 8px; z-index: 10;
    overflow-y: auto; overflow-x: hidden;
    padding-right: 3px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.5) transparent;
}
.foco__thumbs::-webkit-scrollbar { width: 4px; }
.foco__thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,.5); border-radius: 4px; }
@media (min-width: 1024px) { .foco__thumbs { display: flex; } }
.foco__thumb {
    width: 52px; height: 68px; padding: 0; flex: 0 0 auto;
    border: none; border-radius: 4px; overflow: hidden;
    cursor: pointer; opacity: .5;
    /* anel de seleção via box-shadow (ver .foco__variant — outline conflitua com o foco) */
    box-shadow: 0 0 0 2px transparent;
    transition: opacity .2s, box-shadow .2s;
    background: none;
}
.foco__thumb.is-active { opacity: 1; box-shadow: 0 0 0 2px #fff; }
.foco__thumb:focus-visible { box-shadow: 0 0 0 2px #fff; }
.foco__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Buy-box (direita) ───────────────────────────────────────────── */
.foco__info {
    width: 100%;
    background: #eeeeee;
    /* No mobile o bloco de info fica *abaixo* da galeria empilhada, por isso não
       precisa de folga no topo para o header transparente (esse cobre a galeria,
       não este bloco). O padding grande só faz sentido no layout ≥1024px. */
    padding: 40px 24px 64px;
}
@media (min-width: 1024px) {
    /* Centra o conteúdo verticalmente quando é mais curto que a coluna; com muito
       conteúdo (muitas variações + descrição longa), 'safe center' volta ao topo
       e deixa fazer scroll (não corta). */
    .foco__info { width: 50%; padding: 120px 56px 64px; overflow-y: auto; display: flex; flex-direction: column; justify-content: safe center; }
}

.foco__title {
    font-family: 'Spectral', Georgia, serif;
    font-size: 28px; font-weight: 400; line-height: 1.2;
    color: #161616; margin: 0 0 24px;
}
.foco__desc {
    font-family: 'Jost', system-ui, sans-serif;
    font-size: 14px; font-weight: 400; line-height: 1.7;
    color: #161616; margin-bottom: 28px;
}
.foco__desc p { margin: 0 0 12px; }

.foco__details { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.foco__detail-row { display: flex; align-items: flex-start; gap: 16px; }
.foco__detail-label {
    font-family: 'Jost', sans-serif; font-size: 14px; font-weight: 500;
    color: #161616; min-width: 100px;
}
.foco__detail-value { font-family: 'Jost', sans-serif; font-size: 14px; color: #161616; }

.foco__divider { border-top: 1px solid rgba(0,0,0,.1); margin-bottom: 24px; }

.foco__eyebrow {
    font-family: 'Jost', sans-serif; font-size: 11px; font-weight: 500;
    text-transform: uppercase; letter-spacing: .16em;
    color: #161616; margin: 0 0 12px;
}

/* Variantes (thumbnails) */
.foco__variants { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.foco__variant {
    position: relative; flex-shrink: 0;
    width: 75px; height: 95px;
    padding: 0; border: none; border-radius: 4px; overflow: hidden;
    cursor: pointer; background: #d8d5cf;
    /* Anel de seleção via box-shadow (não outline!) — o outline do browser (foco)
       sobrepunha-se e o destaque só aparecia depois de tirar o foco. */
    box-shadow: 0 0 0 2px transparent;
    transition: box-shadow .2s;
}
.foco__variant.is-active,
.foco__variant:focus-visible { box-shadow: 0 0 0 2px #161616; }
/* Cor esgotada: imagem levemente esbatida (opacity, mantém a cor) + risco diagonal.
   Continua clicável (mostra galeria + mensagem). */
.foco__variant.is-esgotado img,
.foco__variant.is-esgotado .foco__variant-swatch { opacity: .55; }
.foco__variant.is-esgotado::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
    background: linear-gradient(to top left, transparent calc(50% - 1px), rgba(22,22,22,.55) 50%, transparent calc(50% + 1px));
}
.foco__variant img { width: 100%; height: 100%; object-fit: cover; }
.foco__variant-swatch { position: absolute; inset: 0; display: block; }
.foco__variant-label {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,.4); color: #fff;
    font-family: 'Jost', sans-serif; font-size: 10px;
    text-align: center; padding: 3px 2px;
}

.foco__choose {
    font-family: 'Spectral', Georgia, serif; font-size: 17px;
    color: #161616; margin: 0 0 16px;
}

/* Selectores (variante + tamanho) */
.foco__selectors { display: flex; gap: 12px; margin-bottom: 12px; }
.foco__select { position: relative; flex: 1; display: block; }
.foco__select-text { display: none; }
.foco__select select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    width: 100%; height: 41px;
    padding: 0 32px 0 16px;
    background: #8a8a8a; color: #fff;
    border: 1px solid rgba(255,255,255,.4); border-radius: 5px;
    font-family: 'Jost', sans-serif; font-size: 14px; font-weight: 300;
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'><path d='M1 1L4 4L7 1' stroke='white' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat; background-position: right 14px center;
}
.foco__select select option:disabled { color: #c8c8c8; }

.foco__guia {
    display: inline-block;
    font-family: 'Jost', sans-serif; font-size: 12px;
    color: #808080; text-decoration: underline;
    margin-bottom: 20px; background: none; border: none; cursor: pointer;
}

/* Preço */
.foco__price { margin: 0 0 14px; }
.foco__price-current {
    font-family: 'Spectral', Georgia, serif; font-size: 22px; color: #161616;
}
.foco__price-old {
    font-family: 'Jost', sans-serif; font-size: 15px; color: #8a8a8a;
    text-decoration: line-through; margin-left: 10px;
}

/* Adicionar ao carrinho */
.foco__add {
    width: 100%; height: 50px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px;
    background: #8a8a8a; color: #fff;
    border: 1px solid rgba(255,255,255,.4); border-radius: 5px;
    font-family: 'Jost', sans-serif; font-size: 14px; font-weight: 500;
    cursor: pointer; transition: opacity .2s, background .2s;
}
.foco__add:hover { opacity: .85; }
.foco__add:disabled { opacity: .5; cursor: not-allowed; }
/* Estado "Adicionado!" — verde sólido como no protótipo, mesmo enquanto o
   botão fica brevemente disabled durante o flash (vence o opacity:.5 do disabled). */
.foco__add.is-added,
.foco__add.is-added:disabled { background: #2d6a3f; opacity: 1; }

/* ─── Preço sob consulta (sem compra online) ─────────────────────────── */
.foco__consulta-price {
    font-family: 'Jost', sans-serif; font-size: 20px; font-weight: 500;
    color: #161616; margin: 0 0 2px;
}
/* "A partir de X€" — subtil, sem ruído. */
.foco__consulta-from {
    font-family: 'Jost', sans-serif; font-size: 13px; color: #8a8a8a;
    margin: 0 0 16px;
}
/* Botão principal (dark) — reutiliza .foco__add mas centra o label e destaca. */
.foco__consulta-btn { justify-content: center; background: #161616; }

/* ─── Modal "Pedir informação" ──────────────────────────────────────── */
body.foco-modal-lock { overflow: hidden; }
.foco__modal {
    position: fixed; inset: 0; z-index: 2147483400;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.foco__modal[hidden] { display: none; }
.foco__modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 15, 15, .55);
    backdrop-filter: blur(2px);
}
.foco__modal-panel {
    position: relative; z-index: 1;
    width: 100%; max-width: 620px;
    max-height: calc(100vh - 40px); overflow-y: auto;
    background: #fff; border-radius: 10px;
    padding: 44px 48px 40px;
    box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.foco__modal-close {
    position: absolute; top: 14px; right: 14px;
    width: 34px; height: 34px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 0; cursor: pointer; color: #161616;
    border-radius: 50%; transition: background .15s;
}
.foco__modal-close:hover { background: rgba(0,0,0,.06); }
.foco__modal-eyebrow {
    font-family: 'Jost', sans-serif; font-size: 11px; font-weight: 500;
    letter-spacing: .16em; text-transform: uppercase; color: #8a8a8a;
    margin: 0 0 8px;
}
.foco__modal-title {
    font-family: 'Spectral', Georgia, serif; font-size: 24px; font-weight: 400;
    line-height: 1.2; color: #161616; margin: 0 0 10px;
}
.foco__modal-sub {
    font-family: 'Jost', sans-serif; font-size: 13.5px; line-height: 1.6;
    color: #6a6a6a; margin: 0 0 20px;
}
@media (max-width: 560px) {
    .foco__modal-panel { padding: 30px 20px 24px; }
    .foco__modal-title { font-size: 21px; }
}

/* Form (id 4) dentro do modal — alinhado ao Panamar. Sobrepõe o CSS do módulo
   Form (#form_view) por especificidade (.foco__modal-form + #form_view). */
.foco__modal-form #form_view {
    --fv-primary: #161616;
    --fv-primary-hover: #333333;
    --fv-primary-active: #000000;
    --fv-border-focus: #161616;
    --fv-focus-ring: rgba(22, 22, 22, .12);
    --fv-radius: 6px;
    --fv-radius-sm: 5px;
    --fv-font: 'Jost', system-ui, sans-serif;
    max-width: none; margin: 0; padding: 0; font-size: 14px;
}
/* O modal já tem título/subtítulo — esconde o cabeçalho próprio do form. */
.foco__modal-form #form_view .form-header { display: none; }
/* Espaçamento entre campos mais compacto. */
.foco__modal-form #form_view .form-field { margin-bottom: 14px; }
/* Botão de envio: dark, largura total (CTA limpo), não "esticado". */
.foco__modal-form #form_view .submit-container { text-align: stretch; margin-top: 6px; }
.foco__modal-form #form_view .submit-container button {
    width: 100%; border-radius: 6px; height: 48px;
    font-family: 'Jost', sans-serif; font-size: 14px; letter-spacing: .02em;
}
/* Promoção dentro do botão: preço antigo riscado, mais ténue. */
.foco__add-price-old { margin-left: 8px; color: rgba(255,255,255,.6); font-weight: 400; text-decoration: line-through; }

.foco__stock-msg {
    font-family: 'Jost', sans-serif; font-size: 12px; color: #9a2b2b;
    margin: 8px 0 0; min-height: 14px;
}

/* Favoritos */
.foco__wish {
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 12px; padding: 12px 0;
    background: none; border: none; cursor: pointer;
    font-family: 'Jost', sans-serif; font-size: 13px; color: #161616;
    transition: opacity .2s;
}
.foco__wish:hover { opacity: .6; }
.foco__wish.is-active svg path { fill: #161616; }

/* ─── Produtos relacionados ───────────────────────────────────────── */
.foco__related { padding: 56px 24px; }
@media (min-width: 1024px) { .foco__related { padding: 56px 40px; } }
.foco__related-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.foco__related-title { font-family: 'Spectral', Georgia, serif; font-size: 28px; font-weight: 400; color: #161616; margin: 0; }
.foco__related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 768px) { .foco__related-grid { grid-template-columns: repeat(4, 1fr); gap: 38px; } }
.foco__related-card { text-decoration: none; color: inherit; display: block; }
.foco__related-img { position: relative; overflow: hidden; background: #d9d9d9; aspect-ratio: 428 / 533; }
.foco__related-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.foco__related-card:hover .foco__related-img img { transform: scale(1.03); }
.foco__related-name { font-family: 'Jost', sans-serif; font-size: 14px; color: #161616; margin: 12px 0 0; }
.foco__related-price { font-family: 'Jost', sans-serif; font-size: 14px; font-weight: 300; color: #464646; margin: 4px 0 0; }
.foco__related-price--consulta { color: #6a6a6a; font-style: italic; } /* igual à listagem */
