/* ═══════════════════════════════════════════════════════════════
   KIMTECH — Global WooCommerce Styles
   Child theme: emarket-child-kimtech
   Brand color: #01728E
   Version: 1.0.3
   ═══════════════════════════════════════════════════════════════ */

/* ─── 1. Add to Cart button — single product page ────────────── */
.woocommerce div.product form.cart button.single_add_to_cart_button {
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 45px !important;
    line-height: 1.3 !important;
    padding: 10px 15px !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* ─── 2. Buy Now button — single product page ────────────────── */
.woocommerce div.product a[data-kimtech-processed="1"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 48px !important;
    padding: 12px 20px !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.4 !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    background-color: #01728E !important;
    color: #ffffff !important;
    text-decoration: none !important;
    margin-top: 8px !important;
    cursor: pointer !important;
    border: 2px solid #01728E !important;
}
.woocommerce div.product a[data-kimtech-processed="1"]:hover {
    background-color: #015a70 !important;
    border-color: #015a70 !important;
    color: #ffffff !important;
}

/* ─── 3. Mini cart sidebar — View Cart button ────────────────── */
.woocommerce-mini-cart__buttons a:not(.checkout),
.widget_shopping_cart .buttons a:not(.checkout),
.widget_shopping_cart_content .buttons a:not(.checkout) {
    background-color: #01728E !important;
    border-color: #01728E !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
}
.woocommerce-mini-cart__buttons a:not(.checkout):hover,
.widget_shopping_cart .buttons a:not(.checkout):hover,
.widget_shopping_cart_content .buttons a:not(.checkout):hover {
    background-color: #015a70 !important;
    border-color: #015a70 !important;
    color: #ffffff !important;
}

/* ─── 4. Mini cart sidebar — Send Order button ───────────────── */
.woocommerce-mini-cart__buttons a.checkout,
.widget_shopping_cart .buttons a.checkout,
.widget_shopping_cart_content .buttons a.checkout {
    background-color: #25D366 !important;
    border-color: #25D366 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
}
.woocommerce-mini-cart__buttons a.checkout:hover,
.widget_shopping_cart .buttons a.checkout:hover,
.widget_shopping_cart_content .buttons a.checkout:hover {
    background-color: #1da851 !important;
    border-color: #1da851 !important;
    color: #ffffff !important;
}

/* ─── 5. Cart page — Send Order via WhatsApp button ─────────── */
.wc-proceed-to-checkout a.checkout-button,
.cart_totals a.checkout-button {
    background-color: #25D366 !important;
    border-color: #25D366 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    display: block !important;
    text-align: center !important;
    padding: 14px 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    line-height: 1.4 !important;
    min-height: 48px !important;
}
.wc-proceed-to-checkout a.checkout-button:hover,
.cart_totals a.checkout-button:hover {
    background-color: #1da851 !important;
    border-color: #1da851 !important;
    color: #ffffff !important;
}

/* ─── 6. Cart page — Continue Shopping button ───────────────── */
.kimtech-continue-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    background-color: #01728E !important;
    border: 2px solid #01728E !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    padding: 12px 20px !important;
    box-sizing: border-box !important;
    min-height: 48px !important;
    text-align: center !important;
    text-decoration: none !important;
    margin-top: 12px !important;
    cursor: pointer !important;
    line-height: 1.4 !important;
    white-space: normal !important;
}
.kimtech-continue-btn:hover {
    background-color: #015a70 !important;
    border-color: #015a70 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* ─── 7. Add-to-cart popup buttons ───────────────────────────── */
[class*="minicart-ajax"] .buttons a,
[class*="minicart-ajax"] .button-group a,
[class*="minicart-ajax"] .cart-buttons a,
.sw-added-to-cart-popup .buttons a,
.added-to-cart-popup .buttons a {
    border-radius: 8px !important;
    font-weight: 700 !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 16px !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    white-space: normal !important;
    line-height: 1.4 !important;
    width: 100% !important;
    text-align: center !important;
}
[class*="minicart-ajax"] .buttons a:not(.checkout):not([href*="checkout"]),
.sw-added-to-cart-popup .buttons a:not(.checkout):not([href*="checkout"]),
.added-to-cart-popup .buttons a:not(.checkout):not([href*="checkout"]) {
    background-color: #01728E !important;
    border-color: #01728E !important;
    color: #ffffff !important;
}
[class*="minicart-ajax"] .buttons a:not(.checkout):not([href*="checkout"]):hover,
.sw-added-to-cart-popup .buttons a:not(.checkout):not([href*="checkout"]):hover,
.added-to-cart-popup .buttons a:not(.checkout):not([href*="checkout"]):hover {
    background-color: #015a70 !important;
    border-color: #015a70 !important;
    color: #ffffff !important;
}
[class*="minicart-ajax"] .buttons a.checkout,
[class*="minicart-ajax"] .buttons a[href*="checkout"],
.sw-added-to-cart-popup .buttons a.checkout,
.added-to-cart-popup .buttons a.checkout {
    background-color: #25D366 !important;
    border-color: #25D366 !important;
    color: #ffffff !important;
}
[class*="minicart-ajax"] .buttons a.checkout:hover,
[class*="minicart-ajax"] .buttons a[href*="checkout"]:hover,
.sw-added-to-cart-popup .buttons a.checkout:hover,
.added-to-cart-popup .buttons a.checkout:hover {
    background-color: #1da851 !important;
    border-color: #1da851 !important;
    color: #ffffff !important;
}

/* ═══════════════════════════════════════════════════════════════
   PRODUCT CARDS — Hide Wishlist, Compare, Quick View
   ═══════════════════════════════════════════════════════════════ */
ul.products li.product .yith-wcwl-add-to-wishlist,
ul.products li.product .add_to_wishlist,
ul.products li.product .sw-wishlist,
ul.products li.product a[href*="add_to_wishlist"],
ul.products li.product .tinvwl_add_to_wishlist_button,
.woocommerce ul.products li.product .yith-wcwl-add-to-wishlist {
    display: none !important;
}
ul.products li.product .sw-compare-button,
ul.products li.product .compare,
ul.products li.product a[href*="compare"],
ul.products li.product .wooscp-btn,
.woocommerce ul.products li.product .sw-compare-button,
.woocommerce ul.products li.product .compare {
    display: none !important;
}
ul.products li.product .sw-quickview-button,
ul.products li.product .quick-view,
ul.products li.product .quick_view,
ul.products li.product a[class*="quickview"],
ul.products li.product a[class*="quick-view"],
ul.products li.product a[class*="quick_view"],
ul.products li.product .button.sw_quickview_button,
.woocommerce ul.products li.product .sw-quickview-button,
.woocommerce ul.products li.product .button.sw_quickview_button {
    display: none !important;
}
ul.products li.product .sw-product-buttons a:not(.add_to_cart_button):not(.kimtech-card-buynow),
ul.products li.product .sw-product-buttons .yith-wcwl-add-to-wishlist,
ul.products li.product .sw-product-buttons .sw-compare-button,
ul.products li.product .sw-product-buttons .sw-quickview-button {
    display: none !important;
}
ul.products li.product .sw-product-card-bottom a[href*="quick"],
ul.products li.product .product-loop-action a:not(.add_to_cart_button):not(.kimtech-card-buynow) {
    display: none !important;
}

/* ─── Add to Cart button — product cards ─────────────────────── */
ul.products li.product a.add_to_cart_button,
ul.products li.product a.button.add_to_cart_button {
    background-color: #01728E !important;
    border-color: #01728E !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    width: 100% !important;
    text-align: center !important;
    padding: 10px 16px !important;
    box-sizing: border-box !important;
    display: block !important;
    margin-top: 6px !important;
    text-decoration: none !important;
}
ul.products li.product a.add_to_cart_button:hover,
ul.products li.product a.button.add_to_cart_button:hover {
    background-color: #015a70 !important;
    border-color: #015a70 !important;
    color: #ffffff !important;
}

/* ─── Buy Now button — product cards ─────────────────────────── */
ul.products li.product a.kimtech-card-buynow {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 10px 16px !important;
    box-sizing: border-box !important;
    background-color: #25D366 !important;
    border: 2px solid #25D366 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    margin-top: 6px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    line-height: 1.4 !important;
    white-space: normal !important;
}
ul.products li.product a.kimtech-card-buynow:hover {
    background-color: #1da851 !important;
    border-color: #1da851 !important;
    color: #ffffff !important;
}

/* ═══════════════════════════════════════════════════════════════
   POPULAR ITEMS SLIDER — style22 — ALL SCREENS
   ═══════════════════════════════════════════════════════════════ */

/* Fix item-content absolute positioning on ALL screens */
.woo-slider-style22 .item-content {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px !important;
    background: #fff !important;
    z-index: 2 !important;
}

/* Add to Cart button — full width, no overflow */
.woo-slider-style22 .item-content .add_to_cart_button {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    margin-top: 8px !important;
    position: relative !important;
    z-index: 3 !important;
}

/* Hide WhatsApp Buy Now button in Popular Items ONLY */
.woo-slider-style22 .item-content a[href*="wa.me"],
.elementor-widget-wp-widget-sw_woo_slider_widget .item-content a[href*="wa.me"] {
    display: none !important;
}

/* ── MOBILE — stack layout, banner image ALWAYS visible ───────── */
@media (max-width: 768px) {

    /* Stack vertically */
    .woo-slider-style22 .item-wrap {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        overflow: hidden !important;
    }

    /* Banner image — ALWAYS visible, full width */
    .woo-slider-style22 .item-banner-right {
        display: block !important;
        width: 100% !important;
    }
    .woo-slider-style22 .item-banner-right img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: cover !important;
    }

    /* item-detail full width */
    .woo-slider-style22 .item-detail {
        width: 100% !important;
        flex: 1 1 100% !important;
        position: relative !important;
    }

    /* Product image */
    .woo-slider-style22 .item-img {
        width: 100% !important;
        overflow: hidden !important;
    }
    .woo-slider-style22 .item-img img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* item-content below image */
    .woo-slider-style22 .item-content {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        padding: 8px !important;
        box-sizing: border-box !important;
    }

    /* Product title */
    .woo-slider-style22 .item-content .woocommerce-loop-product__title {
        font-size: 12px !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        margin-bottom: 4px !important;
    }

    /* Price */
    .woo-slider-style22 .item-content .price {
        font-size: 12px !important;
        display: block !important;
        margin-bottom: 5px !important;
    }

    /* Button — short text "Add" set by JS, fits perfectly */
    .woo-slider-style22 .item-content .add_to_cart_button {
        font-size: 11px !important;
        padding: 8px 6px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        margin: 4px 0 0 0 !important;
        position: relative !important;
        z-index: 5 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   CART PAGE — Responsive Styles
   ═══════════════════════════════════════════════════════════════ */
.woocommerce-cart .woocommerce {
    padding: 0 10px;
    box-sizing: border-box;
}
.woocommerce table.shop_table {
    border: none !important;
    border-collapse: collapse !important;
    width: 100% !important;
}
.woocommerce table.shop_table th {
    background-color: #01728E !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 12px 10px !important;
    border: none !important;
}
.woocommerce table.shop_table td {
    padding: 14px 10px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #e0f0f4 !important;
    border-top: none !important;
    font-size: 14px !important;
}
.woocommerce table.shop_table tr:last-child td {
    border-bottom: none !important;
}
.woocommerce table.shop_table td.product-thumbnail img {
    width: 70px !important;
    height: 70px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    display: block !important;
}
.woocommerce table.shop_table td.product-name a {
    color: #333333 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
}
.woocommerce table.shop_table td.product-name a:hover {
    color: #01728E !important;
}
.woocommerce table.shop_table td.product-quantity .quantity input.qty {
    width: 60px !important;
    text-align: center !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    padding: 6px !important;
    font-size: 14px !important;
}
.woocommerce table.shop_table td.product-remove a.remove {
    color: #01728E !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    border: 2px solid #01728E !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}
.woocommerce table.shop_table td.product-remove a.remove:hover {
    background-color: #01728E !important;
    color: #ffffff !important;
}
.woocommerce .cart_totals {
    background: #f4fafc !important;
    border: 1px solid #d0eaf0 !important;
    border-radius: 10px !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}
.woocommerce .cart_totals h2 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #01728E !important;
    margin-bottom: 16px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #01728E !important;
}
.woocommerce .cart_totals table.shop_table th,
.woocommerce .cart_totals table.shop_table td {
    background: transparent !important;
    color: #333333 !important;
    font-size: 14px !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #d0eaf0 !important;
}
.woocommerce .cart_totals table.shop_table th {
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    width: 40% !important;
}
.woocommerce .cart_totals .order-total th,
.woocommerce .cart_totals .order-total td {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #01728E !important;
    border-bottom: none !important;
}
.woocommerce .woocommerce-cart-form__contents button[name="update_cart"] {
    background-color: #ffffff !important;
    border: 2px solid #01728E !important;
    color: #01728E !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}
.woocommerce .woocommerce-cart-form__contents button[name="update_cart"]:hover {
    background-color: #01728E !important;
    color: #ffffff !important;
}

/* ═══════════════════════════════════════════════════════════════
   TABLET — max-width: 768px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    .woocommerce-cart #contents-detail,
    .woocommerce-cart #primary,
    .woocommerce-cart .site-main,
    .woocommerce-cart .woocommerce {
        padding-left: 16px !important;
        padding-right: 16px !important;
        box-sizing: border-box !important;
    }
    .woocommerce-cart .woocommerce-cart-form,
    .woocommerce-cart .cart_totals,
    .woocommerce-cart .cross-sells {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .woocommerce-cart table.shop_table {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
    .woocommerce table.shop_table thead {
        display: none !important;
    }
    .woocommerce table.shop_table,
    .woocommerce table.shop_table tbody,
    .woocommerce table.shop_table tr,
    .woocommerce table.shop_table td {
        display: block !important;
        width: 100% !important;
    }
    .woocommerce table.shop_table tr {
        margin-bottom: 16px !important;
        border: 1px solid #d0eaf0 !important;
        border-radius: 10px !important;
        overflow: hidden !important;
        background: #ffffff !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
        padding: 0 !important;
    }
    .woocommerce table.shop_table td {
        text-align: right !important;
        padding: 10px 14px !important;
        border-bottom: 1px solid #e8f5f8 !important;
        position: relative !important;
        font-size: 14px !important;
    }
    .woocommerce table.shop_table td:last-child {
        border-bottom: none !important;
    }
    .woocommerce table.shop_table td::before {
        content: attr(data-title);
        float: left !important;
        font-weight: 700 !important;
        color: #01728E !important;
        font-size: 12px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
    .woocommerce table.shop_table td.product-remove {
        text-align: right !important;
        padding: 8px 14px !important;
        background: #f4fafc !important;
    }
    .woocommerce table.shop_table td.product-remove::before {
        content: 'Remove' !important;
    }
    .woocommerce table.shop_table td.product-thumbnail {
        text-align: center !important;
        padding: 14px !important;
        background: #f4fafc !important;
    }
    .woocommerce table.shop_table td.product-thumbnail::before {
        display: none !important;
    }
    .woocommerce table.shop_table td.product-thumbnail img {
        width: 90px !important;
        height: 90px !important;
        margin: 0 auto !important;
    }
    .woocommerce table.shop_table td.product-name {
        text-align: left !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        padding: 12px 14px !important;
    }
    .woocommerce table.shop_table td.product-name::before {
        display: none !important;
    }
    .woocommerce table.shop_table td.product-quantity {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    .woocommerce table.shop_table td.product-quantity .quantity {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }
    .woocommerce table.shop_table td.product-quantity .quantity input.qty {
        width: 50px !important;
        font-size: 15px !important;
    }
    .woocommerce .cart_totals {
        width: 100% !important;
        float: none !important;
        margin-top: 20px !important;
    }
    .woocommerce .woocommerce-cart-form__contents button[name="update_cart"] {
        width: 100% !important;
        margin-top: 10px !important;
        padding: 12px 20px !important;
    }
    .woocommerce table.shop_table td.actions {
        text-align: center !important;
        padding: 14px !important;
    }
    .woocommerce table.shop_table td.actions::before {
        display: none !important;
    }
    .woocommerce table.shop_table td.actions .coupon {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }
    .woocommerce table.shop_table td.actions .coupon input#coupon_code {
        width: 100% !important;
        padding: 10px 14px !important;
        border: 1px solid #ddd !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        box-sizing: border-box !important;
    }
    .woocommerce table.shop_table td.actions .coupon .button {
        width: 100% !important;
        padding: 10px 14px !important;
        background-color: #01728E !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 8px !important;
        font-weight: 700 !important;
        font-size: 14px !important;
        cursor: pointer !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE — max-width: 480px
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

    .woocommerce-cart #contents-detail,
    .woocommerce-cart #primary,
    .woocommerce-cart .site-main,
    .woocommerce-cart .woocommerce {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
    .woocommerce-cart h1.entry-title,
    .woocommerce-cart .page-title {
        font-size: 20px !important;
        margin-bottom: 16px !important;
    }
    .woocommerce table.shop_table tr {
        margin-bottom: 12px !important;
    }
    .woocommerce table.shop_table td {
        padding: 9px 12px !important;
        font-size: 13px !important;
    }
    .woocommerce table.shop_table td.product-thumbnail img {
        width: 75px !important;
        height: 75px !important;
    }
    .woocommerce table.shop_table td.product-name a {
        font-size: 13px !important;
    }
    .woocommerce table.shop_table td.product-quantity input.qty {
        width: 44px !important;
        font-size: 14px !important;
    }
    .woocommerce .cart_totals {
        padding: 14px !important;
    }
    .woocommerce .cart_totals h2 {
        font-size: 16px !important;
    }
    .woocommerce .cart_totals table.shop_table th,
    .woocommerce .cart_totals table.shop_table td {
        font-size: 13px !important;
        padding: 8px 0 !important;
    }
    .woocommerce .cart_totals .order-total th,
    .woocommerce .cart_totals .order-total td {
        font-size: 15px !important;
    }
    .wc-proceed-to-checkout a.checkout-button,
    .cart_totals a.checkout-button {
        font-size: 14px !important;
        padding: 13px 16px !important;
        min-height: 50px !important;
    }
    .kimtech-continue-btn {
        font-size: 14px !important;
        padding: 13px 16px !important;
        min-height: 50px !important;
    }
    .woocommerce .cross-sells ul.products {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }
    .woocommerce .cross-sells ul.products li.product {
        width: calc(50% - 6px) !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        flex-shrink: 0 !important;
    }
    .woocommerce .cross-sells h2 {
        font-size: 16px !important;
        color: #01728E !important;
        font-weight: 700 !important;
        margin-bottom: 12px !important;
    }
    .woocommerce div.product form.cart button.single_add_to_cart_button {
        font-size: 13px !important;
        padding: 10px 12px !important;
        min-height: 40px !important;
    }
    .woocommerce div.product a[data-kimtech-processed="1"] {
        font-size: 14px !important;
        padding: 12px 16px !important;
        min-height: 44px !important;
    }
}
