/* =============================================================
   HKBallet — Single Product  (hkb-single-product.css)
   Enqueue in child theme functions.php
   ============================================================= */

/* ── Variables ──────────────────────────────────────────────── */
:root {
    --hkb-navy: #1a1f5e;
    --hkb-white: #ffffff;
    --hkb-gray-50: #f8f8f8;
    --hkb-gray-200: #e5e5e5;
    --hkb-gray-400: #999999;
    --hkb-gray-700: #444444;
    --hkb-text: #1a1a1a;
    --hkb-radius: 4px;
    --hkb-transition: 0.25s ease;
    --hkb-font: inherit;
    --hkb-sp-gap: 48px;
    --hkb-thumb-size: 90px;
}

/* ── Neutralize Hello Elementor site-main wrapper ───────────── */
/* Hello Elementor wraps content in .site-main which may add
   unwanted padding/max-width — reset it on product pages only  */
.single-product .site-main {
    padding: 0 !important;
    max-width: none !important;
}

/* ── Layout wrapper ─────────────────────────────────────────── */
#hkb-single-product {
    max-width: 100%;
    padding: 20px 40px 80px;
}

.hkb-sp__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--hkb-sp-gap);
    align-items: start;
}

/* ── GALLERY ────────────────────────────────────────────────── */
.hkb-sp__gallery {
    overflow: hidden;
}

/* Main swiper */
.hkb-sp__gallery-main {
    width: 100%;
    border-radius: var(--hkb-radius);
    overflow: hidden;
    background: var(--hkb-gray-50);
    aspect-ratio: 3 / 4;
}

.hkb-sp__gallery-main .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    overflow: hidden;
}

.hkb-sp__gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Thumb swiper */
.hkb-sp__gallery-thumbs {
    margin-top: 12px;
    overflow: visible !important;
    padding-bottom: 1px;
}

.hkb-sp__gallery-thumbs .swiper-slide {
    width: var(--hkb-thumb-size) !important;
    height: calc(var(--hkb-thumb-size) * 1.33);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.hkb-sp__gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--clr-blue-100);
    padding: 6px;
}

.hkb-sp__gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 2px;
}

/* ── INFO COLUMN ────────────────────────────────────────────── */
.hkb-sp__info {
    padding-right: 160px;
}

/* Breadcrumb */
.hkb-sp__breadcrumb {
    margin-bottom: 20px;
}

.hkb-sp__back-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--fs-12);
    font-weight: 300;
    color: var(--clr-blue-100);
    text-decoration: none;
    transition: var(--transition);
    border-radius: 2px;
    width: fit-content;
}

.hkb-sp__back-link:hover {
    color: var(--clr-blue-80);
}

.hkb-sp__back-link svg {
    flex-shrink: 0;
}

.hkb-sp__back-link svg path {
    transition: var(--transition);
}

.hkb-sp__back-link:hover svg path {
    fill: var(--clr-blue-80) !important;
}

/*.hkb-sp__back-link:focus-within {
    box-shadow: 0px 0px 0px 3px var(--clr-purple-50);
}
*/
/* Title */
.hkb-sp__title {
    font-size: var(--fs-heading-large);
    font-weight: 400;
    line-height: var(--lh-435);
    color: var(--clr-blue-100);
    margin: 0 0 10px;
}

/* Price */
.hkb-sp__price {
    font-size: var(--fs-26);
    line-height: var(--lh-35);
    color: var(--clr-blue-100);
    font-weight: 400 !important;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--clr-neutral-15);
}

/* ── Description ────────────────────────────────────────────── */
.hkb-sp__desc-wrap {
    padding: 20px 0;
    border-bottom: 1px solid var(--clr-neutral-15);
}

.hkb-sp__desc-label {
    font-size: var(--fs-20);
    line-height: var(--lh-26);
    color: var(--clr-blue-100);
    margin: 0 0 16px;
}

.hkb-sp__desc-text {
    font-size: var(--fs-16);
    line-height: var(--lh-26);
    color: var(--clr-blue-100);
    overflow: hidden;
    max-height: 50px;
    transition: max-height 0.3s ease;
}

.hkb-sp__desc-text.is-expanded {
    max-height: 1000px;
}

.hkb-sp__read-more {
    background-color: transparent !important;
    border: none;
    padding: 0;
    margin-top: 16px;
    font-size: var(--fs-12);
    line-height: var(--lh-168);
    color: var(--clr-blue-100) !important;
    cursor: pointer;
    text-decoration: underline !important;
    text-underline-offset: 2px;
    transition: var(--transition);
}

.hkb-sp__read-more:hover {
    color: var(--clr-blue-60) !important;
}

/* ── FORM FIELDS ────────────────────────────────────────────── */
.hkb-sp__form {
    padding-top: 40px;
}

.hkb-sp__field {
    margin-bottom: 20px;
}

.hkb-sp__field-label {
    display: block;
    font-size: var(--fs-16);
    line-height: var(--lh-26);
    color: var(--clr-blue-100);
    margin: 0 0 8px;
}

/* Size select */
.hkb-sp__select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.hkb-sp__select {
    width: 100%;
    /* appearance: none;
    -webkit-appearance: none;*/
    background: white;
    border: 1px solid var(--clr-neutral-15);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--clr-blue-100);
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}

/*.hkb-sp__select:focus-within {
    border-color: var(--clr-blue-100);
}*/

.hkb-sp__select-arrow {
    position: absolute;
    right: 14px;
    pointer-events: none;
    color: var(--clr-blue-80);
}

.hkb-sp__custom-select {
    position: relative;
    cursor: pointer;
}

.hkb-sp__custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/*.hkb-sp__custom-select-trigger:focus-within {
    box-shadow: 0px 0px 0px 3px var(--clr-purple-50) !important;
}*/

.hkb-sort__chevron {
    display: inline-block;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    background: var(--clr-blue-100);
    mask-image: url(../img/arrow-down.svg);
    -webkit-mask-image: url(../img/arrow-down.svg);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    transition: transform .2s;
}

.hkb-sp__custom-select.is-open .hkb-sort__chevron {
    transform: rotateX(180deg);
}

.hkb-sp__custom-select-options {
    display: none;
    position: absolute;
    top: calc(100% + 13.5px);
    background: white;
    border: 1px solid var(--clr-neutral-15);
    border-radius: 6px;
    padding: 8px !important;
    width: 100%;
}

.hkb-sp__custom-select.is-open .hkb-sp__custom-select-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 6;
}

.hkb-sp__custom-select-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7.5px 8px;
    font-size: var(--fs-14);
    line-height: var(--lh-168);
    cursor: pointer;
    color: var(--clr-blue-100);
    transition: background .15s;
    border-radius: 8px;
}

.hkb-sp__custom-select-option:hover,
.hkb-sp__custom-select-option.is-selected {
    background: var(--clr-neutral-05);
}

/*.hkb-sp__custom-select-option:focus-within {
    box-shadow: 0px 0px 0px 3px var(--clr-purple-50);
}*/

/* Color swatches */
.hkb-sp__swatches {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    padding-left: 4px;
}

.hkb-sp__swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--swatch-color, #ccc) !important;
    border: 4px solid transparent !important;
    outline: 1.5px solid transparent !important;
    outline-offset: 4px;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
    position: relative;
}

.hkb-sp__swatch:hover {
    outline-color: var(--clr-neutral-15) !important;
}

.hkb-sp__swatch[aria-checked="true"],
.hkb-sp__swatch.is-active {
    outline-color: var(--clr-neutral-15) !important;
    border-color: transparent !important;
}

/* ── QUANTITY ────────────────────────────────────────────────── */
.hkb-sp__wc-atc:has(.woocommerce-variation.single_variation:empty) {
    margin-top: 40px;
}

.hkb-sp__wc-atc:not(:has(.variations_form)) .stock {
    margin-top: 20px;
    display: none;
}

.hkb-sp__wc-atc:has(.single_add_to_cart_button) {
    margin-top: 40px;
}

.hkb-sp__wc-atc:has(.woocommerce-variation.single_variation:not(:empty)) {
    margin-top: 20px;
}

.hkb-sp__wc-atc:has(.woocommerce-variation.single_variation:not(:empty)) {
    margin-top: 20px;
}

.hkb-sp__wc-atc .woocommerce-variation.single_variation:not(:empty) {
    margin-bottom: 40px;
}

.woocommerce-variation.single_variation {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.woocommerce-variation.single_variation .woocommerce-variation-price,
.woocommerce-variation.single_variation .woocommerce-variation-availability {
    font-size: var(--fs-16) !important;
    line-height: var(--lh-26) !important;
    color: var(--clr-blue-100) !important;
}

/*.woocommerce-variation.single_variation .woocommerce-variation-price {
    font-weight: 500;
}*/

.hkb-sp__qty-ctrl {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.hkb-sp__qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    background-color: transparent !important;
    color: var(--clr-blue-100) !important;
    transition: var(--transition);
    border-radius: 100%;
    border: 1px solid var(--clr-blue-60);
    padding: 0;
}

.hkb-sp__qty-btn.is-disabled {
    border: 1px solid var(--clr-neutral-60);
    pointer-events: none;
}

.hkb-sp__qty-btn.is-disabled svg path {
    fill: var(--clr-neutral-60);
}

/*.hkb-sp__qty-btn:focus-within {
    box-shadow: 0px 0px 0px 3px var(--clr-purple-50);
}*/

.hkb-sp__qty-btn:hover {
    background-color: var(--clr-neutral-05) !important;
}

.hkb-sp__qty-input {
    width: 42px !important;
    text-align: center;
    border: none !important;
    font-size: var(--fs-16);
    line-height: var(--lh-26);
    color: var(--clr-blue-100);
    background: transparent;
    -moz-appearance: textfield;
    outline: none !important;
    border: none !important;
    padding: 0 !important;
}

.hkb-sp__qty-input::-webkit-outer-spin-button,
.hkb-sp__qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

/* ── ADD TO CART ─────────────────────────────────────────────── */
.single_add_to_cart_button {
    display: flex;
    align-items: center;
    width: fit-content !important;
    min-width: 200px !important;
    padding: 10px 16px !important;
    background-color: var(--clr-blue-100) !important;
    color: white !important;
    border-radius: 100px !important;
    border: none !important;
    font-size: var(--fs-18) !important;
    font-weight: 400 !important;
    line-height: var(--lh-252) !important;
    letter-spacing: 0.15px !important;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

/*.single_add_to_cart_button:focus-within {
    box-shadow: 0px 0px 0px 3px var(--clr-purple-50) !important;
}*/

.single_add_to_cart_button.disabled {
    background-color: var(--clr-blue-80) !important;
    opacity: 0.7 !important;
}

.hkb-sp__field {
    margin-top: 40px;
}

.hkb-sp__field.hkb-sp__field--color {
    margin-top: 0;
}

/* ── RELATED PRODUCTS ────────────────────────────────────────── */
.hkb-sp__related {
    margin-top: 80px;
    padding-top: 80px;
    border-top: 1px solid var(--clr-neutral-15);
}

.hkb-sp__related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.hkb-sp__related-title {
    font-size: var(--fs-heading-large);
    line-height: var(--lh-435);
    color: var(--clr-blue-100);
    margin: 0;
}

.hkb-sp__related-nav {
    display: flex;
    gap: 28px;
}

.hkb-sp__related-prev,
.hkb-sp__related-next {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    cursor: pointer;
    color: var(--clr-blue-100);
    transition: var(--transition);
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    background-color: transparent !important;
    border-radius: 2px !important;
}

.hkb-sp__related-prev svg path,
.hkb-sp__related-next svg path {
    transition: var(--transition);
}

.hkb-sp__related-prev:hover svg path,
.hkb-sp__related-next:hover svg path {
    fill: var(--clr-blue-60);
}

.hkb-sp__related-prev.swiper-button-disabled,
.hkb-sp__related-next.swiper-button-disabled {
    opacity: 0.35;
    pointer-events: none;
}

.hkb-sp__related-prev.swiper-button-disabled svg path,
.hkb-sp__related-next.swiper-button-disabled svg path {
    fill: var(--clr-neutral-60);
}

/*.hkb-sp__related-prev:focus-within,
.hkb-sp__related-next:focus-within {
    box-shadow: 0px 0px 0px 3px var(--clr-purple-50) !important;
}*/

/* Related card */
.hkb-sp__related-card {
    display: block;
    text-decoration: none;
    color: var(--clr-blue-100);
}

.hkb-sp__related-img {
    border-radius: 2px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    margin-bottom: 10px;
}

.hkb-sp__related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 2px;
    border: 1px solid var(--clr-neutral-05);
    transition: all 0.5s;
}

.hkb-sp__related-card:hover .hkb-sp__related-img img {
    transform: scale(1.2);
}

.hkb-sp__related-name {
    font-size: var(--fs-16);
    line-height: var(--lh-26);
    font-weight: 400 !important;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition);
}

.hkb-sp__related-card:hover .hkb-sp__related-name {
   color: var(--clr-blue-60);
}

.hkb-sp__related-price {
    font-size: var(--fs-16);
    line-height: var(--lh-26);
    font-weight: 500;
    color: var(--clr-blue-100);
    margin: 0;
}

.hkb-sp__wc-atc table.variations,
.hkb-sp__wc-atc .quantity,
.hkb-sp__wc-atc .woocommerce-variation-description {
    display: none !important;
}

/*.hkb-sp__custom-select-trigger:focus-within-visible,
.hkb-sp__custom-select-wrap:focus-within-within .hkb-sp__custom-select-trigger {
    box-shadow: 0 0 0 3px var(--clr-purple-50);
}*/

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .hkb-sp__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hkb-sp__info {
        padding-right: 0;
    }

    .hkb-sp__gallery {
        position: static;
    }

    /* Mobile: gallery goes full width on top */
    .hkb-sp__gallery-main {
        max-height: 460px;
    }

    .hkb-sp__info {
        padding-right: 0;
    }
}

@media (max-width: 767px) {
    .hkb-sp__inner {
        gap: 20px;
    }

    .single_add_to_cart_button {
        width: 100% !important;
    }

    #hkb-single-product {
        padding: 20px 40px 60px;
    }

    .hkb-sp__title {
        --fs-heading-large: 20px;
        --lh-435: 26px;
        margin: 0 0 8px;
    }

    .hkb-sp__price {
        --fs-26: 18px;
        --lh-35: 23.5px;
        padding-bottom: 20px;
    }

    .hkb-sp__info {
        padding-right: 0;
    }

    .hkb-sp__breadcrumb {
        margin-bottom: 16px;
    }

    .hkb-sp__desc-wrap {
        padding: 16px 0;
    }

    .hkb-sp__desc-label {
        --fs-20: 16px;
        --lh-26: 23px;
        margin: 0 0 20px;
    }

    .hkb-sp__desc-text {
        --fs-16: 14px;
        --lh-26: 21px;
        max-height: 40px;
    }

    .hkb-sp__read-more {
        margin-top: 20px;
    }

    .hkb-sp__field-label {
        --fs-16: 14px;
        --lh-26: 21px;
    }

    .hkb-sp__atc {
        width: 100% !important;
    }

    .hkb-sp__related {
        margin-top: 40px;
        padding-top: 40px;
    }

    .hkb-sp__related-header {
        margin-bottom: 20px;
    }

    .hkb-sp__related-title {
        --fs-heading-large: 20px;
        --lh-435: 26px;
    }

    .hkb-sp__related-name,
    .hkb-sp__related-price {
        --fs-16: 14px;
        --lh-26: 21px;
    }

    .hkb-sp__gallery-thumbs {
        display: none !important;
    }

    .hkb-sp__related-nav {
        gap: 16px;
    }

    .hkb-sp__related-nav img {
        width: 20px;
        height: 20px;
    }

    .hkb-sp__swatches {
        gap: 16px;
    }
}

@media (max-width: 393px){
    #hkb-single-product {
        padding: 20px 20px 60px;
    }
}