
/* ==================================================
   JK PERU MARKET — PRODUCT PREMIUM 4.1
   WoodMart Child + WooCommerce + Dokan + QIB
   VERSION CONSOLIDADA
   ================================================== */

/* 01. COLORES */

body.single-product {
    --jk-gold: #d4af37;
    --jk-light: #f4d889;
    --jk-dark: #101012;
    --jk-panel: #1c1c20;
    --jk-muted: #c9c9cf;
    --jk-border: rgba(212,175,55,.32);
}

/* 02. ESTRUCTURA Y GALERIA */

body.single-product .single-product-page {
    color: #f5f5f5;
}

body.single-product .product-image-summary {
    align-items: flex-start;
}

body.single-product .woocommerce-product-gallery,
body.single-product .product-images {
    max-width: 100%;
    border-radius: 16px;
    overflow: hidden;
}

body.single-product .product-images img,
body.single-product .woocommerce-product-gallery img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* 03. TITULO */

body.single-product .summary .product_title {
    color: #fff !important;
    font-size: clamp(24px,2.4vw,34px) !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: -.02em;
    margin-bottom: 14px !important;
    overflow-wrap: anywhere;
}

/* 04. PRECIO */

body.single-product .summary .price,
body.single-product .summary .price .amount,
body.single-product .summary .price bdi {
    color: var(--jk-light) !important;
    font-size: clamp(25px,2.6vw,34px) !important;
    font-weight: 800 !important;
}

body.single-product .summary .price del .amount {
    color: #999 !important;
    font-size: 18px !important;
}

/* 05. DESCRIPCION */

body.single-product
.woocommerce-product-details__short-description {
    color: var(--jk-muted) !important;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
    margin: 16px 0 22px;
}

/* 06. FORMULARIO DE COMPRA
   Solo productos simples */

body.single-product .summary
form.cart:not(.variations_form):not(.grouped_form) {
    display: grid !important;
    grid-template-columns: 116px minmax(0,1fr) !important;
    column-gap: 10px !important;
    row-gap: 12px !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 18px 0 !important;
}

/* 07. SELECTOR QIB
   Estructura real:
   qib-container
   - minus
   - quantity
   - plus
*/

body.single-product .summary form.cart
.qib-container {
    grid-column: 1 !important;
    grid-row: 1 !important;

    display: grid !important;
    grid-template-columns: 32px 50px 32px !important;
    grid-template-rows: 44px !important;

    width: 116px !important;
    min-width: 0 !important;
    max-width: 116px !important;
    height: 46px !important;

    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;

    float: none !important;
    clear: none !important;
    position: relative !important;

    background: #222226 !important;
    border: 1px solid #756038 !important;
    border-radius: 9px !important;

    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Botones externos QIB */

body.single-product .summary form.cart
.qib-container > .qib-button {
    position: static !important;
    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    width: 32px !important;
    min-width: 0 !important;
    max-width: 32px !important;
    height: 44px !important;

    margin: 0 !important;
    padding: 0 !important;

    float: none !important;
    clear: none !important;

    background: #29292d !important;
    color: #f4d889 !important;

    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    transform: none !important;
    font-size: 17px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
}

/* Menos */

body.single-product .summary form.cart
.qib-container > .minus {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

/* Contenedor central */

body.single-product .summary form.cart
.qib-container > .quantity {
    grid-column: 2 !important;
    grid-row: 1 !important;

    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;

    width: 50px !important;
    min-width: 0 !important;
    max-width: 50px !important;
    height: 44px !important;

    margin: 0 !important;
    padding: 0 !important;

    float: none !important;
    clear: none !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

/* Numero */

body.single-product .summary form.cart
.qib-container .quantity input.qty {
    position: static !important;
    display: block !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 44px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    color: #fff !important;

    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    text-align: center !important;
    font-size: 15px !important;
    font-weight: 700 !important;

    appearance: textfield;
    -moz-appearance: textfield;
}

/* Mas */

body.single-product .summary form.cart
.qib-container > .plus {
    grid-column: 3 !important;
    grid-row: 1 !important;
}

/* Ocultar controles nativos del numero */

body.single-product .qib-container
input.qty::-webkit-inner-spin-button,
body.single-product .qib-container
input.qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 08. AÑADIR AL CARRITO */

body.single-product .summary
form.cart:not(.variations_form):not(.grouped_form)
button.single_add_to_cart_button {
    grid-column: 2 !important;
    grid-row: 1 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 46px !important;

    margin: 0 !important;
    padding: 10px 12px !important;
    float: none !important;

    background: linear-gradient(
        110deg,#c79a30,#f4d77e,#d4af37
    ) !important;

    color: #171717 !important;
    border: 1px solid #e1c36c !important;
    border-radius: 10px !important;

    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    text-align: center !important;
    white-space: normal !important;
    text-transform: none !important;
}

/* 09. SOPORTE DOKAN */

body.single-product .summary
form.cart:not(.variations_form):not(.grouped_form)
button.dokan-store-support-btn-product,
body.single-product .summary
form.cart:not(.variations_form):not(.grouped_form)
button.dokan-store-support-btn {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 46px !important;

    margin: 0 !important;
    padding: 11px 15px !important;
    float: none !important;

    background: #24201a !important;
    color: var(--jk-light) !important;

    border: 1px solid var(--jk-gold) !important;
    border-radius: 10px !important;

    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    text-align: center !important;
    white-space: normal !important;
}

/* 10. TARJETA DEL VENDEDOR */

body.single-product .dokan-vendor-info-wrap {
    background: #1c1c20 !important;
    border: 1px solid rgba(212,175,55,.4) !important;
    border-radius: 12px !important;
    padding: 12px !important;
}

body.single-product
.dokan-vendor-info-wrap
.dokan-vendor-name h5,
body.single-product
.dokan-vendor-info-wrap
.dokan-vendor-name a {
    color: #fff !important;
    opacity: 1 !important;
}

body.single-product
.dokan-vendor-info-wrap
.dokan-vendor-name a:hover h5 {
    color: var(--jk-light) !important;
}

/* 11. PESTAÑAS ESCRITORIO */

body.single-product .woocommerce-tabs {
    margin-top: 38px;
    padding-top: 22px;
    border-top: 1px solid var(--jk-border);
}

body.single-product
.woocommerce-tabs .wd-nav-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

body.single-product
.woocommerce-tabs .wd-nav-tabs li a {
    display: block;
    padding: 12px 16px !important;

    background: #1c1c20 !important;
    color: #f5f5f5 !important;

    border: 1px solid #393436 !important;
    border-radius: 9px !important;

    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1.4 !important;
}

body.single-product
.woocommerce-tabs .wd-nav-tabs li.wd-active a,
body.single-product
.woocommerce-tabs .wd-nav-tabs li a:hover {
    background: #302719 !important;
    color: var(--jk-light) !important;
    border-color: var(--jk-gold) !important;
}

/* 12. ACORDEONES */

body.single-product
.woocommerce-tabs .wd-accordion-title {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 56px;
    margin: 0 0 10px !important;
    padding: 15px 20px !important;

    background: #1c1c20 !important;
    border: 1px solid #393436 !important;
    border-radius: 11px !important;
    box-shadow: none !important;
}

body.single-product
.woocommerce-tabs .wd-accordion-title
.wd-accordion-title-text,
body.single-product
.woocommerce-tabs .wd-accordion-title
.wd-accordion-title-text span {
    color: #f5f5f5 !important;
    opacity: 1 !important;
    font-size: 14px !important;
    font-weight: 650 !important;
    line-height: 1.5 !important;
}

body.single-product
.woocommerce-tabs .wd-accordion-title.wd-active {
    background: #29241c !important;
    border-color: var(--jk-gold) !important;
}

body.single-product
.woocommerce-tabs .wd-accordion-title.wd-active
.wd-accordion-title-text,
body.single-product
.woocommerce-tabs .wd-accordion-title.wd-active
.wd-accordion-title-text span {
    color: var(--jk-light) !important;
}

/* 13. CONTENIDO DE PESTAÑAS */

body.single-product .woocommerce-Tabs-panel,
body.single-product .woocommerce-Tabs-panel p,
body.single-product .woocommerce-Tabs-panel li {
    color: #e5e5e5 !important;
    font-size: 15px;
    line-height: 1.75;
}

body.single-product .woocommerce-Tabs-panel h2,
body.single-product .woocommerce-Tabs-panel h3 {
    color: #fff !important;
}

/* 14. ATRIBUTOS */

body.single-product .woocommerce-product-attributes {
    width: 100%;
    border-collapse: collapse;
}

body.single-product .woocommerce-product-attributes th,
body.single-product .woocommerce-product-attributes td {
    padding: 14px 16px;
    color: #eee;
    background: #1c1c20;
    border-bottom: 1px solid var(--jk-border);
}

/* 15. FORMULARIOS */

body.single-product .woocommerce-Tabs-panel
input:not([type="submit"]),
body.single-product .woocommerce-Tabs-panel textarea,
body.single-product .woocommerce-Tabs-panel select {
    background: #242428 !important;
    color: #fff !important;
    border: 1px solid #70603b !important;
    border-radius: 9px;
}

/* 16. PRODUCTOS RELACIONADOS */

body.single-product .related-products,
body.single-product .related {
    margin-top: 45px;
    padding: 25px;
    background: #101012;
    border: 1px solid var(--jk-border);
    border-radius: 16px;
}

body.single-product .related .wd-product-wrapper,
body.single-product .related-products .wd-product-wrapper {
    background: #1c1c20;
    border: 1px solid #37312a;
    border-radius: 12px;
    overflow: hidden;
}

body.single-product .related .wd-entities-title a,
body.single-product .related-products .wd-entities-title a {
    color: #fff !important;
}

/* 17. ESCRITORIO */

@media (min-width: 768px) {
    body.single-product
    .woocommerce-tabs .wd-accordion-title {
        display: none !important;
    }

    body.single-product
    .woocommerce-tabs .wd-nav-wrapper {
        display: block !important;
    }

    body.single-product
    .woocommerce-tabs .wd-nav-tabs {
        display: flex !important;
    }

    body.single-product
    .woocommerce-tabs .wd-nav-wrapper::before,
    body.single-product
    .woocommerce-tabs .wd-nav-wrapper::after {
        content: none !important;
        display: none !important;
    }

    body.single-product
    .woocommerce-tabs .wd-nav-wrapper,
    body.single-product
    .woocommerce-tabs .wd-nav-tabs {
        border: 0 !important;
        box-shadow: none !important;
        background-image: none !important;
    }
}

/* 18. MOVIL */

@media (max-width: 767px) {
    body.single-product .summary .product_title {
        font-size: 24px !important;
    }

    body.single-product .summary .price,
    body.single-product .summary .price .amount,
    body.single-product .summary .price bdi {
        font-size: 27px !important;
    }

    body.single-product
    .summary form.cart:not(.variations_form):not(.grouped_form) {
        grid-template-columns: 116px minmax(0,1fr) !important;
        gap: 10px !important;
    }

    body.single-product
    .woocommerce-tabs .wd-nav-wrapper,
    body.single-product
    .woocommerce-tabs .wd-nav-tabs {
        display: none !important;
    }

    body.single-product
    .woocommerce-tabs .wd-accordion-title {
        display: flex !important;
        padding: 15px 20px !important;
    }

    body.single-product .related,
    body.single-product .related-products {
        padding: 15px;
    }
}

/* 19. ACCESIBILIDAD */

body.single-product a:focus-visible,
body.single-product button:focus-visible {
    outline: 2px solid var(--jk-light);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    body.single-product .single_add_to_cart_button {
        transition: none !important;
    }
}

/* ==========================================
   JK PERU MARKET - AJUSTE FINAL 4.1
   Iconos duplicados y pestañas de escritorio
   ========================================== */

/* Ocultar iconos superiores de ShopEngine */
body.single-product .summary form.cart
button.shopengine_add_to_wishlist_action,

body.single-product .summary form.cart
a.shopengine_comparison_add_to_list_action {
    display: none !important;
}

/* Conservar los controles inferiores de WoodMart */

/* Quitar la línea decorativa en PC */
@media (min-width: 768px) {

    body.single-product
    .woocommerce-tabs .wd-nav-wrapper,
    body.single-product
    .woocommerce-tabs .wd-nav-tabs {
        border-top: none !important;
        border-bottom: none !important;
        box-shadow: none !important;
        background-image: none !important;
    }

    body.single-product
    .woocommerce-tabs .wd-nav-wrapper::before,
    body.single-product
    .woocommerce-tabs .wd-nav-wrapper::after,
    body.single-product
    .woocommerce-tabs .wd-nav-tabs::before,
    body.single-product
    .woocommerce-tabs .wd-nav-tabs::after {
        content: none !important;
        display: none !important;
    }
}

/* =========================================
   JK PERU MARKET - CORRECCION 4.2
   ELIMINAR ICONOS DUPLICADOS SHOPENGINE
   ========================================= */

/* Eliminar corazon superior de ShopEngine */
body.single-product .summary form.cart
button.shopengine_add_to_list_action.shopengine-wishlist {
    display: none !important;
}

/* Eliminar comparador superior de ShopEngine */
body.single-product .summary form.cart
a.shopengine-comparison {
    display: none !important;
}

/* No modificar los controles inferiores de WoodMart */

/* JK PREMIUM 4.3 - LINEA DORADA */

@media (min-width: 768px) {

  body.single-product .woocommerce-tabs {
    border-top: 0 !important;
  }

  body.single-product
  .woocommerce-tabs .wd-nav-wrapper {
    border: 0 !important;
    box-shadow: none !important;
    background-image: none !important;
  }

  body.single-product
  .woocommerce-tabs .wd-nav-tabs {
    border: 0 !important;
    box-shadow: none !important;
    background-image: none !important;
  }

  body.single-product
  .woocommerce-tabs .wd-nav-tabs::before,
  body.single-product
  .woocommerce-tabs .wd-nav-tabs::after,
  body.single-product
  .woocommerce-tabs .wd-nav-wrapper::before,
  body.single-product
  .woocommerce-tabs .wd-nav-wrapper::after {
    content: none !important;
    display: none !important;
  }
}
