/**
* Theme Name: Karpart Child
* Description: This is a child theme of Karpart, generated by Merlin WP.
* Author: <a href="https://wpopal.com/">Opalthemes</a>
* Template: karpart
* Version: 1.1.4
*/

/* ==========================================================================
   Karpart Child - Custom WooCommerce Features Styling
   ========================================================================== */

/* Quantity Picker Layout on Shop Grid (Inline Layout) */
.kp-loop-qty-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    width: 100%;
}

.kp-qty-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #f8fafc;
    height: 42px;
    width: 30% !important;
    flex: 0 0 30% !important;
    overflow: hidden;
    box-sizing: border-box;
}

.kp-qty-btn {
    background: none !important;
    border: none !important;
    width: 25px !important;
    flex: 0 0 25px !important;
    height: 100% !important;
    cursor: pointer;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: background-color 0.2s ease, color 0.2s ease;
    outline: none !important;
    box-shadow: none !important;
}

.kp-qty-btn:hover {
    background-color: #cbd5e1 !important;
    color: #0f172a !important;
}

.kp-qty-input {
    border: none !important;
    background: transparent !important;
    text-align: center !important;
    flex-grow: 1 !important;
    width: 0 !important;
    height: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    box-shadow: none !important;
    outline: none !important;
    -moz-appearance: textfield !important;
    line-height: 42px !important;
}

.kp-qty-input::-webkit-outer-spin-button,
.kp-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Make shop grid add-to-cart button align inline with the quantity selector */
.kp-loop-qty-wrapper .button.add_to_cart_button {
    width: calc(70% - 8px) !important;
    flex: 0 0 calc(70% - 8px) !important;
    margin: 0 !important;
    height: 42px !important;
    line-height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
}

/* Adjust button cart icon spacing to fit inline */
.kp-loop-qty-wrapper .button.add_to_cart_button::after {
    margin-left: 8px !important;
}

/* Maximum Stock Reached styling */
.kp-loop-qty-wrapper.max-in-cart {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
}

.kp-max-reached-msg {
    color: #d9534f;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    padding: 4px 0;
}

.kp-loop-qty-wrapper.max-in-cart .button.view-cart-btn {
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    color: #fff;
    border-radius: 4px;
    transition: background 0.2s;
}

.kp-loop-qty-wrapper.max-in-cart .button.view-cart-btn:hover {
    background-color: #333;
}

/* View Product Button - Hide Cart Icon & Center Text */
.product-caption a.kp-view-product-btn::after,
.product-block a.kp-view-product-btn::after {
    display: none !important;
}

.product-caption a.kp-view-product-btn,
.product-block a.kp-view-product-btn {
    justify-content: center !important;
    text-align: center;
}

/* In Store Only Pill */
.in-store-pill {
    background-color: #e6f2ff;
    color: #007bff;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    margin-right: 5px;
    line-height: 1.4;
    white-space: nowrap;
}

/* Hide "no-class" shipping class pill in mini-cart (shown by plugin for products with no shipping class) */
.gcw-ff-shipping-class-pill {
    display: none !important;
}