
/* =========================================================
   PRODUCT PRICE AND PACKAGE
========================================================= */

.kgcode-product-page-price {
    width: 100%;
    box-sizing: border-box;
    padding: 18px 24px;
    background: #f7f7f7;
    border-radius: 28px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
}

.kgcode-product-page-price-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.kgcode-product-page-price-left,
.kgcode-product-page-price-right {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.kgcode-product-page-price-current,
.kgcode-product-page-current-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.kgcode-product-page-current-price .amount {
    font-size: 29px;
    font-weight: 700;
    color: #222;
    line-height: 1.2;
}

.kgcode-product-page-price-per-wash {
    font-size: 23px;
    font-weight: 700;
    color: #707070;
    line-height: 1.2;
    white-space: nowrap;
}

.kgcode-product-page-price-per-wash .amount {
    font-size: inherit;
}

.kgcode-product-page-price-per-wash > span:last-child {
    font-size: inherit;
}

.kgcode-product-page-package-details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #707070;
    font-size: 14px;
}

.kgcode-product-page-price-per-liter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    color: #707070;
    font-size: 14px;
}

.kgcode-product-page-regular-price {
    color: #d52b2b !important;
    text-decoration: line-through;
    text-decoration-color: #d52b2b;
    font-size: 16px;
    font-weight: 400;
}

.kgcode-product-page-regular-price .amount {
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
}

.kgcode-product-page-sale-price {
    color: #222;
}

.kgcode-product-page-price-per-liter .kgcode-product-page-sale-price {
    color: #222;
    font-weight: 600;
}


/* =========================================================
   PRODUCT ADD TO CART
========================================================= */

.kgcode-product-page-cart {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    box-sizing: border-box;
}

.kgcode-product-page-quantity-wrapper {
    width: 152px;
    min-width: 152px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid #cccccc;
    border-radius: 40px;
    background: #fff;
}

.kgcode-product-page-quantity-btn {
    width: 30px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.kgcode-product-page-quantity-btn img {
    width: 16px;
    height: 16px;
    display: block;
}

.kgcode-product-page-quantity {
    width: 42px !important;
    height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    appearance: textfield;
    -moz-appearance: textfield;
}

.kgcode-product-page-quantity::-webkit-inner-spin-button,
.kgcode-product-page-quantity::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.kgcode-product-page-add-to-cart {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 20px;
    border: none;
    border-radius: 40px;
    background: #30846f;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.kgcode-product-page-add-to-cart:hover {
    background: #246b59;
    color: #fff;
}

.kgcode-product-page-add-to-cart img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.kgcode-product-page-add-to-cart:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Loading spinner */

.kgcode-product-page-cart-spinner {
    display: none;
    width: 20px;
    height: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: kgcode-product-cart-spin 0.7s linear infinite;
}

.kgcode-product-page-cart.is-loading .kgcode-product-page-add-to-cart {
    opacity: 0.75;
    pointer-events: none;
}

.kgcode-product-page-cart.is-loading .kgcode-product-page-cart-text,
.kgcode-product-page-cart.is-loading .kgcode-product-page-add-to-cart img {
    visibility: hidden;
}

.kgcode-product-page-cart.is-loading .kgcode-product-page-cart-spinner {
    display: block;
}

@keyframes kgcode-product-cart-spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 480px) {

    .kgcode-product-page-price {
        padding: 16px;
    }

    .kgcode-product-page-price-main {
        gap: 10px;
    }

    .kgcode-product-page-current-price .amount {
        font-size: 23px;
    }

    .kgcode-product-page-price-per-wash {
        font-size: 17px;
    }

    .kgcode-product-page-package-details,
    .kgcode-product-page-price-per-liter {
        font-size: 12px;
    }

    .kgcode-product-page-cart {
        gap: 8px;
    }

    .kgcode-product-page-quantity-wrapper {
        width: 125px;
        min-width: 125px;
        padding: 0 7px;
    }

    .kgcode-product-page-add-to-cart {
        padding: 0 12px;
        font-size: 14px;
    }
}
