
/**
 * BuyTuga Product Tabs Organizer v1.0.1
 * Refinamento visual: menos espaço vertical, caixa mais larga e melhor equilíbrio.
 */

body.single-product .woocommerce-tabs,
body.single-product .wc-tabs-wrapper,
body.single-product div.product .woocommerce-tabs {
    clear: both;
    width: 100%;
    max-width: 1280px;
    margin: 22px auto 48px;
    padding: 0 18px;
    box-sizing: border-box;
}

/* Reduz o espaço antes dos tabs quando o tema deixa muita margem após a galeria */
body.single-product .product .woocommerce-tabs,
body.single-product div.product .woocommerce-tabs {
    padding-top: 0 !important;
}

/* Barra dos separadores */
body.single-product .woocommerce-tabs ul.tabs,
body.single-product div.product .woocommerce-tabs ul.tabs,
body.single-product .wc-tabs {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 9px;
    list-style: none !important;
    margin: 0 auto 16px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    text-align: center;
}

body.single-product .woocommerce-tabs ul.tabs::before,
body.single-product .woocommerce-tabs ul.tabs::after,
body.single-product div.product .woocommerce-tabs ul.tabs::before,
body.single-product div.product .woocommerce-tabs ul.tabs::after {
    display: none !important;
}

/* Item do separador */
body.single-product .woocommerce-tabs ul.tabs li,
body.single-product div.product .woocommerce-tabs ul.tabs li,
body.single-product .wc-tabs li {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    float: none !important;
    position: relative !important;
}

/* Link do separador */
body.single-product .woocommerce-tabs ul.tabs li a,
body.single-product div.product .woocommerce-tabs ul.tabs li a,
body.single-product .wc-tabs li a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 20px !important;
    border-radius: 999px;
    border: 1px solid #e3e8ef;
    background: #ffffff;
    color: #0f2742 !important;
    font-size: 14px;
    font-weight: 800 !important;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(15, 39, 66, 0.055);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

body.single-product .woocommerce-tabs ul.tabs li a:hover,
body.single-product div.product .woocommerce-tabs ul.tabs li a:hover,
body.single-product .wc-tabs li a:hover {
    transform: translateY(-1px);
    border-color: #ffc400;
    box-shadow: 0 7px 18px rgba(15, 39, 66, 0.09);
}

/* Separador ativo */
body.single-product .woocommerce-tabs ul.tabs li.active a,
body.single-product div.product .woocommerce-tabs ul.tabs li.active a,
body.single-product .wc-tabs li.active a {
    background: #ffc400 !important;
    border-color: #ffc400 !important;
    color: #10243d !important;
}

/* Painel de conteúdo mais largo e mais compacto */
body.single-product .woocommerce-tabs .panel,
body.single-product div.product .woocommerce-tabs .panel,
body.single-product .woocommerce-Tabs-panel {
    width: 100% !important;
    max-width: 1180px;
    margin: 0 auto !important;
    padding: 28px 34px !important;
    border: 1px solid #eef2f6;
    border-radius: 17px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 39, 66, 0.055);
    color: #1b2b3d;
    box-sizing: border-box;
    text-align: left;
}

/* Evita que temas criem títulos repetidos ou demasiado grandes */
body.single-product .woocommerce-tabs .panel > h2:first-child,
body.single-product .woocommerce-Tabs-panel > h2:first-child {
    margin-top: 0;
    margin-bottom: 16px;
    color: #0f2742;
    font-size: 20px;
    line-height: 1.25;
}

/* Texto da descrição */
body.single-product .woocommerce-tabs .panel p,
body.single-product .woocommerce-Tabs-panel p {
    font-size: 15px;
    line-height: 1.72;
    color: #24364a;
    margin: 0 0 12px;
}

body.single-product .woocommerce-tabs .panel strong,
body.single-product .woocommerce-Tabs-panel strong,
body.single-product .woocommerce-tabs .panel b,
body.single-product .woocommerce-Tabs-panel b {
    color: #0f2742;
    font-weight: 800;
}

/* Listas e características */
body.single-product .woocommerce-tabs .panel ul,
body.single-product .woocommerce-Tabs-panel ul {
    margin: 10px 0 16px 22px;
    padding: 0;
}

body.single-product .woocommerce-tabs .panel li,
body.single-product .woocommerce-Tabs-panel li {
    margin-bottom: 7px;
    line-height: 1.6;
}

/* Tabela de especificações WooCommerce */
body.single-product .woocommerce-product-attributes {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #eef2f6;
    border-radius: 14px;
}

body.single-product .woocommerce-product-attributes th,
body.single-product .woocommerce-product-attributes td {
    padding: 12px 16px !important;
    border: 0 !important;
    border-bottom: 1px solid #eef2f6 !important;
    background: #fff !important;
    font-size: 14px;
    line-height: 1.55;
}

body.single-product .woocommerce-product-attributes tr:last-child th,
body.single-product .woocommerce-product-attributes tr:last-child td {
    border-bottom: 0 !important;
}

body.single-product .woocommerce-product-attributes th {
    width: 30%;
    color: #0f2742;
    font-weight: 800;
    background: #f7f9fc !important;
}

/* Avaliações */
body.single-product #reviews {
    max-width: 100%;
}

body.single-product #reviews #comments,
body.single-product #reviews #review_form_wrapper {
    margin-top: 16px;
}

body.single-product #review_form input,
body.single-product #review_form textarea {
    border-radius: 10px;
    border: 1px solid #dbe3ec;
    padding: 10px 12px;
}

/* Remove estilos antigos que deixam tabs em coluna/sem organização */
body.single-product .woocommerce-tabs ul.tabs li::before,
body.single-product .woocommerce-tabs ul.tabs li::after {
    display: none !important;
}

/* Se a secção de relacionados vier logo depois, mantém espaçamento bonito */
body.single-product .related.products,
body.single-product section.related {
    margin-top: 42px;
}

/* Mobile */
@media (max-width: 768px) {
    body.single-product .woocommerce-tabs,
    body.single-product .wc-tabs-wrapper,
    body.single-product div.product .woocommerce-tabs {
        margin: 24px auto 38px;
        padding: 0 12px;
    }

    body.single-product .woocommerce-tabs ul.tabs,
    body.single-product div.product .woocommerce-tabs ul.tabs,
    body.single-product .wc-tabs {
        gap: 8px;
        justify-content: stretch;
        margin-bottom: 12px !important;
    }

    body.single-product .woocommerce-tabs ul.tabs li,
    body.single-product div.product .woocommerce-tabs ul.tabs li,
    body.single-product .wc-tabs li {
        flex: 1 1 100%;
    }

    body.single-product .woocommerce-tabs ul.tabs li a,
    body.single-product div.product .woocommerce-tabs ul.tabs li a,
    body.single-product .wc-tabs li a {
        width: 100%;
        min-height: 40px;
        padding: 11px 14px !important;
        box-sizing: border-box;
    }

    body.single-product .woocommerce-tabs .panel,
    body.single-product div.product .woocommerce-tabs .panel,
    body.single-product .woocommerce-Tabs-panel {
        padding: 21px 17px !important;
        border-radius: 14px;
    }

    body.single-product .woocommerce-product-attributes th,
    body.single-product .woocommerce-product-attributes td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
}
