/* ── Cobra CNC — Product Page CSS v2 Clean ── MoDigital ── */

/* Fonte Just Sans — herdada do Elementor */
.single-product { font-family: "Just Sans", sans-serif; }

/* ── EYEBROW ── */
.cobra-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.cobra-eyebrow-line { width: 28px; height: 2px; background: #1D71B8; flex-shrink: 0; }
.cobra-eyebrow-text {
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #1D71B8 !important;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: opacity .2s;
}
.cobra-eyebrow-text:hover { opacity: .7; }

/* ── TÍTULO ── */
.single-product .product_title {
    font-size: clamp(26px, 3.5vw, 44px) !important;
    font-weight: 800 !important;
    color: #111 !important;
    letter-spacing: -1.4px !important;
    line-height: 1.05 !important;
    margin-bottom: 10px !important;
}

/* ── DESCRIÇÃO CURTA ── */
.single-product .woocommerce-product-details__short-description {
    font-size: 15px;
    color: #5A5A67;
    line-height: 1.75;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1.5px solid #D3DCE0;
}

/* ── SPECS BAR ── */
.cobra-specs-bar {
    display: flex !important;
    border: 1.5px solid #D3DCE0;
    margin: 16px 0 20px;
    background: #fff;
    overflow-x: auto;
}
.cobra-spec-item {
    flex: 1;
    min-width: 100px;
    padding: 14px 16px;
    border-right: 1px solid #D3DCE0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cobra-spec-item:last-child { border-right: none; }
.cobra-spec-label {
    font-size: 9px;
    font-weight: 700;
    color: #898A8E;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.cobra-spec-value {
    font-size: 14px;
    font-weight: 800;
    color: #111;
    letter-spacing: -.2px;
}

/* ── BOTÕES ── */
.cobra-cta { margin: 4px 0 20px; }
.cobra-btn-primary {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px 24px;
    background: #1D71B8 !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    margin-bottom: 8px;
    transition: background .2s;
    border-radius: 0 !important;
    border: none !important;
}
.cobra-btn-primary:hover { background: #0f3f6a !important; color: #fff !important; }
.cobra-btn-secondary {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px 24px;
    border: 2px solid #D3DCE0 !important;
    color: #5A5A67 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: all .2s;
    border-radius: 0 !important;
    background: transparent !important;
    margin-bottom: 16px;
}
.cobra-btn-secondary:hover { border-color: #1D71B8 !important; color: #1D71B8 !important; }

/* ── INCLUSO ── */
.cobra-included {
    border: 1.5px solid #D3DCE0;
    padding: 16px;
    background: #F6F6F6;
}
.cobra-included-title {
    font-size: 10px;
    font-weight: 800;
    color: #898A8E;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #D3DCE0;
}
.cobra-included-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: #5A5A67;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8ecef;
    line-height: 1.4;
}
.cobra-included-item:last-child { border-bottom: none; margin-bottom: 0; }
.cobra-check { color: #1D71B8; font-weight: 800; flex-shrink: 0; }

/* ── EXTRA INFO (specs + materiais) ── */
.cobra-extra {
    padding: 0 0 40px;
    clear: both;
}
.cobra-block { margin-bottom: 36px; }
.cobra-block-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.cobra-label-line { width: 28px; height: 2px; background: #1D71B8; flex-shrink: 0; }
.cobra-label-text {
    font-size: 11px;
    font-weight: 800;
    color: #1D71B8;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Tabela */
.cobra-specs-table { border: 1.5px solid #D3DCE0; }
.cobra-specs-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    border-bottom: 1px solid #D3DCE0;
}
.cobra-specs-row:last-child { border-bottom: none; }
.cobra-specs-key {
    padding: 11px 16px;
    background: #F6F6F6;
    font-size: 13px;
    font-weight: 800;
    color: #111;
    border-right: 1px solid #D3DCE0;
}
.cobra-specs-val {
    padding: 11px 16px;
    font-size: 13px;
    color: #5A5A67;
}

/* Materiais */
.cobra-materials { display: flex; flex-wrap: wrap; gap: 8px; }
.cobra-mat-tag {
    display: inline-block;
    background: #fff;
    border: 1.5px solid #D3DCE0;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #111 !important;
    text-decoration: none !important;
    transition: all .2s;
}
.cobra-mat-tag:hover {
    border-color: #1D71B8;
    color: #1D71B8 !important;
    background: #eef4fb;
}

/* ── AJUSTES GERAIS ── */
.single-product .price { display: none !important; }
.single-product form.cart { display: none !important; }

/* Galeria */
.single-product .woocommerce-product-gallery__image img { border: 1.5px solid #D3DCE0; }
.single-product .flex-control-thumbs li img {
    border: 1.5px solid #D3DCE0;
    opacity: .65;
    transition: opacity .2s;
}
.single-product .flex-control-thumbs li img:hover,
.single-product .flex-control-thumbs li img.flex-active { opacity: 1; }

/* Relacionados */
.single-product .related h2 {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #111 !important;
    letter-spacing: -.5px !important;
    margin-bottom: 24px !important;
}
.single-product .related .woocommerce-loop-product__title {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #111 !important;
}
.single-product .related .price { display: none !important; }
.single-product .related .button {
    background: #1D71B8 !important;
    color: #fff !important;
    border-radius: 0 !important;
    font-weight: 700 !important;
}
.single-product .related .button:hover { background: #0f3f6a !important; }

@media (max-width: 640px) {
    .cobra-specs-row { grid-template-columns: 1fr; }
    .cobra-specs-key { border-right: none; border-bottom: 1px solid #D3DCE0; }
}

/* ── GALERIA — thumbs abaixo da foto principal ── */
.single-product .woocommerce-product-gallery {
    display: flex !important;
    flex-direction: column-reverse !important;
}
.single-product .woocommerce-product-gallery__wrapper {
    width: 100% !important;
}
.single-product .flex-control-nav.flex-control-thumbs {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    width: 100% !important;
    position: static !important;
}
.single-product .flex-control-thumbs li {
    width: auto !important;
    float: none !important;
    flex: 0 0 calc(25% - 6px);
    max-width: 80px;
    margin: 0 !important;
}
.single-product .flex-control-thumbs li img {
    width: 100% !important;
    height: 68px !important;
    object-fit: contain !important;
    background: #F6F6F6 !important;
    border: 1.5px solid #D3DCE0 !important;
    padding: 4px !important;
    border-radius: 0 !important;
    cursor: pointer;
    transition: border-color .2s;
}
.single-product .flex-control-thumbs li img.flex-active,
.single-product .flex-control-thumbs li img:hover {
    border-color: #1D71B8 !important;
    opacity: 1 !important;
}


/* ── Thumbs abaixo da imagem principal ── */
.single-product .woocommerce-product-gallery {
    display: flex !important;
    flex-direction: column !important;
}
.single-product .woocommerce-product-gallery .flex-viewport {
    order: 1;
    width: 100% !important;
}
.single-product .woocommerce-product-gallery .flex-control-nav.flex-control-thumbs {
    order: 2;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px !important;
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs li {
    width: 70px !important;
    float: none !important;
    margin: 0 !important;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs img {
    width: 70px !important;
    height: 70px !important;
    object-fit: cover;
}

/* ── Vídeo abaixo dos thumbs ── */
.cobra-product-video--below {
    order: 3;
    margin-top: 20px;
    border-top: 1.5px solid #D3DCE0;
    padding-top: 16px;
    width: 100%;
}
.cobra-video-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.cobra-video-label-line {
    width: 20px;
    height: 2px;
    background: #1D71B8;
    flex-shrink: 0;
}
.cobra-video-label-text {
    font-size: 11px;
    font-weight: 800;
    color: #1D71B8;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.cobra-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}
.cobra-video-wrapper iframe,
.cobra-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Vídeo posicionado após a galeria inteira */
#cobra-video-block {
    margin-top: 16px;
    border-top: 1.5px solid #D3DCE0;
    padding-top: 16px;
}

/* ── Seção de vídeo entre produto e relacionados ── */
.cobra-video-section {
    width: 100%;
    padding: 40px 0;
    border-top: 1.5px solid #D3DCE0;
    border-bottom: 1.5px solid #D3DCE0;
    margin-bottom: 40px;
    clear: both;
}
.cobra-video-section-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}
.cobra-video-section-inner .cobra-video-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.cobra-video-section-inner .cobra-video-label-line {
    display: inline-block !important;
    width: 20px;
    height: 2px;
    background: #1D71B8;
    flex-shrink: 0;
}
.cobra-video-section-inner .cobra-video-label-text {
    display: inline-block !important;
    font-size: 11px;
    font-weight: 800;
    color: #1D71B8;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ── Título do vídeo ── */
.cobra-video-title {
    font-size: 18px;
    font-weight: 800;
    color: #111;
    margin: 0 0 20px 0;
    letter-spacing: -0.3px;
}

/* ══════════════════════════════════════════════
   GALERIA NATIVA COBRA — substitui flexslider
   ══════════════════════════════════════════════ */
.cobra-gallery { width: 100%; }

.cobra-gallery-main {
    position: relative;
    background: #F6F6F6;
    border: 1.5px solid #D3DCE0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    overflow: hidden;
}
.cobra-gallery-stage {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cobra-gallery-img {
    display: none;
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    padding: 24px;
}
.cobra-gallery-img.is-active { display: block; }
.cobra-gallery-placeholder {
    padding: 80px 20px;
    color: #b0bcc8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Setas */
.cobra-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 1.5px solid #D3DCE0;
    background: #fff;
    color: #1D71B8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}
.cobra-gallery-nav:hover { border-color: #1D71B8; background: #1D71B8; color: #fff; }
.cobra-gallery-prev { left: 12px; }
.cobra-gallery-next { right: 12px; }

/* Thumbs */
.cobra-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.cobra-gallery-thumb {
    width: 72px;
    height: 72px;
    padding: 4px;
    background: #F6F6F6;
    border: 1.5px solid #D3DCE0;
    cursor: pointer;
    transition: border-color .2s;
}
.cobra-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.cobra-gallery-thumb.is-active,
.cobra-gallery-thumb:hover { border-color: #1D71B8; }

/* ── Fecha o "buraco" entre a galeria e a descrição ── */
.single-product div.product .woocommerce-product-gallery,
.single-product div.product .cobra-gallery { margin-bottom: 0 !important; }
.single-product div.product .summary,
.single-product div.product .entry-summary { margin-top: 0 !important; }

@media (max-width: 640px) {
    .cobra-gallery-main { min-height: 260px; }
    .cobra-gallery-img { max-height: 320px; padding: 16px; }
}

/* ── Vídeo do produto: blindar dimensão (corrige "quadrado branco fora da dimensão") ── */
.cobra-video-section-inner .cobra-video-wrapper,
.cobra-video-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    padding-bottom: 0;
    background: #000;
    overflow: hidden;
}
@supports not (aspect-ratio: 16 / 9) {
    .cobra-video-wrapper { padding-bottom: 56.25%; height: 0; }
}
.cobra-video-wrapper iframe,
.cobra-video-wrapper video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ── Layout de duas colunas do produto ──
   Esquerda = .cobra-col-left (galeria + especificações)
   Direita  = .summary (título, botões, incluso, materiais, PDF) */
.single-product div.product .cobra-col-left {
    float: left;
    width: 48%;
    margin: 0 4% 30px 0;
}
.single-product div.product .cobra-col-left .cobra-gallery { width: 100%; }
.single-product div.product .cobra-col-left .cobra-specs-block { margin-top: 24px; margin-bottom: 0; }
.single-product div.product .summary,
.single-product div.product .entry-summary {
    float: right;
    width: 48%;
}
/* Materiais e botão PDF na coluna direita */
.single-product .summary .cobra-materials-block { margin-top: 24px; margin-bottom: 20px; }
.single-product .summary .cobra-btn-pdf { margin-bottom: 0; }

/* Blocos full-width depois das colunas precisam limpar o float */
.single-product div.product .woocommerce-tabs,
.single-product div.product .related,
.single-product div.product .up-sells,
.single-product .cobra-video-section { clear: both; }

/* Botões full-width sem estourar (corrige overflow no mobile) */
.cobra-btn-primary,
.cobra-btn-secondary { box-sizing: border-box; }

@media (max-width: 768px) {
    /* No mobile empilha em coluna e reordena:
       galeria → resumo (botões, incluso, materiais, PDF) → especificações */
    .single-product div.product { display: flex; flex-direction: column; }
    .single-product div.product .cobra-col-left { display: contents; } /* desfaz o wrapper p/ ordenar galeria e specs separadamente */
    .single-product div.product .cobra-gallery { order: 1; width: 100%; float: none; margin: 0; }
    .single-product div.product .summary,
    .single-product div.product .entry-summary { order: 2; width: 100%; float: none; }
    .single-product div.product .cobra-specs-block { order: 3; margin-top: 24px; }
    .single-product .cobra-video-section { order: 4; }
    .single-product div.product .woocommerce-tabs { order: 5; }
    .single-product div.product .up-sells,
    .single-product div.product .related { order: 6; }
}
