/**
* Theme Name: Bokifa Child
* Description: This is a child theme of Bokifa, generated by Merlin WP.
* Author: <a href="http://themelexus.com/">Themelexus</a>
* Template: bokifa
* Version: 1.0.13
*/

.hide_header .wc-block-components-checkout-step__heading {
    display: none !important;
}

.bokifa-custom-checkout .woocommerce-checkout-review-order,
.bokifa-custom-checkout .form-row,
.bokifa-custom-checkout #place_order {
    margin-top: 20px !important;
}

/* ========================================
   Responsive Coupon Form Styling
   ======================================== */

/* Coupon Toggle Link */
.woocommerce-form-coupon-toggle {
    margin-bottom: 20px;
}

.woocommerce-form-coupon-toggle .woocommerce-info {
    margin-bottom: 0 !important;
    padding: 1em 1.5em;
    font-size: 14px;
    line-height: 1.6;
}

.woocommerce-form-coupon-toggle .woocommerce-info a.showcoupon {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.woocommerce-form-coupon-toggle .woocommerce-info a.showcoupon:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* Coupon Wrapper */
.checkout-coupon-wrapper {
    margin: 20px 0;
}

/* Coupon Form Container */
.checkout_coupon.woocommerce-form-coupon {
    background: #f7f7f7;
    padding: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.checkout_coupon .coupon-description {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666;
}

/* Form Fields Container - Flexbox Layout */
.checkout_coupon .coupon-form-fields {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Input Wrapper */
.checkout_coupon .coupon-input-wrapper {
    flex: 1 1 auto;
    min-width: 200px;
}

.checkout_coupon .coupon-input-wrapper input.input-text {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 1px solid #d3d3d3;
    border-radius: 4px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    height: auto;
}

.checkout_coupon .coupon-input-wrapper input.input-text:focus {
    outline: none;
    border-color: var(--e-global-color-primary, #333);
    box-shadow: 0 0 0 1px var(--e-global-color-primary, #333);
}

.checkout_coupon .coupon-input-wrapper input.input-text::placeholder {
    color: #999;
    opacity: 1;
}

/* Button Wrapper */
.checkout_coupon .coupon-button-wrapper {
    flex: 0 0 auto;
}

.checkout_coupon .apply-coupon-btn {
    width: auto;
    min-width: 140px;
    padding: 12px 24px !important;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    height: auto;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout_coupon .apply-coupon-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.checkout_coupon .apply-coupon-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Message Area */
.checkout_coupon .woocommerce-coupon-message {
    margin-top: 15px;
}

.checkout_coupon .woocommerce-coupon-message .woocommerce-message,
.checkout_coupon .woocommerce-coupon-message .woocommerce-error,
.checkout_coupon .woocommerce-coupon-message .woocommerce-info {
    margin: 0;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
}

.checkout_coupon .woocommerce-coupon-message .woocommerce-message {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.checkout_coupon .woocommerce-coupon-message .woocommerce-error {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
}

/* ========================================
   Responsive Breakpoints
   ======================================== */

/* Tablet (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .checkout_coupon.woocommerce-form-coupon {
        padding: 18px;
    }
    
    .checkout_coupon .coupon-form-fields {
        gap: 12px;
    }
}

/* Mobile Landscape / Small Tablet (600px - 767px) */
@media screen and (max-width: 767px) {
    .woocommerce-form-coupon-toggle .woocommerce-info {
        padding: 0.9em 1.2em;
        font-size: 13px;
    }
    
    .checkout_coupon.woocommerce-form-coupon {
        padding: 16px;
    }
    
    .checkout_coupon .coupon-description {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .checkout_coupon .coupon-form-fields {
        gap: 10px;
    }
    
    .checkout_coupon .coupon-input-wrapper {
        min-width: 160px;
    }
    
    .checkout_coupon .apply-coupon-btn {
        min-width: 120px;
        padding: 12px 20px !important;
        font-size: 13px;
    }
}

/* Mobile Portrait (480px - 599px) */
@media screen and (max-width: 599px) {
    .checkout-coupon-wrapper {
        margin: 15px 0;
    }
    
    .checkout_coupon.woocommerce-form-coupon {
        padding: 15px;
    }
    
    .checkout_coupon .coupon-form-fields {
        flex-direction: column;
        gap: 12px;
    }
    
    .checkout_coupon .coupon-input-wrapper {
        width: 100%;
        min-width: 100%;
    }
    
    .checkout_coupon .coupon-button-wrapper {
        width: 100%;
    }
    
    .checkout_coupon .apply-coupon-btn {
        width: 100%;
        min-width: 100%;
        padding: 14px 20px !important;
        justify-content: center;
    }
}

/* Very Small Mobile (< 480px) */
@media screen and (max-width: 479px) {
    .woocommerce-form-coupon-toggle .woocommerce-info {
        padding: 0.8em 1em;
        font-size: 12px;
    }
    
    .checkout_coupon.woocommerce-form-coupon {
        padding: 12px;
        border-radius: 3px;
    }
    
    .checkout_coupon .coupon-description {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .checkout_coupon .coupon-input-wrapper input.input-text {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .checkout_coupon .apply-coupon-btn {
        padding: 12px 16px !important;
        font-size: 13px;
    }
    
    .checkout_coupon .woocommerce-coupon-message {
        margin-top: 12px;
    }
    
    .checkout_coupon .woocommerce-coupon-message .woocommerce-message,
    .checkout_coupon .woocommerce-coupon-message .woocommerce-error {
        padding: 10px 12px;
        font-size: 12px;
    }
}

.hide_header .wc-block-components-checkout-step__heading {
    display: none !important;
}

.bokifa-custom-checkout .woocommerce-checkout-review-order,
.bokifa-custom-checkout .form-row,
.bokifa-custom-checkout #place_order {
    margin-top: 10px !important;
}

.bokifa-custom-checkout .form-row input, 
.bokifa-custom-checkout .form-row textarea, 
.bokifa-custom-checkout .form-row select {
    padding: 0.4rem 1rem;
}

.bokifa-custom-checkout .checkout_coupon {
    display: block;
}

@media screen and (max-width: 599px) {
    
    .sendus-form .text-field {
        padding: 0.4rem 1rem;
    }

    .sendus-form .jet-form-builder-repeater__actions {
        margin: 0;
    }

    .sendus-form button {
    height: 40px;
    }
    .sendus-form .wp-block-columns {
        display: block;
    }
}

ul.bokifa-products.products.elementor-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

@media screen and (max-width: 739px) {
    ul.bokifa-products.products.elementor-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media screen and (max-width: 649px) {
    ul.bokifa-products.products.elementor-grid {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }
}

@media screen and (max-width: 500px) {
    /* Ensure container takes full width */
    .bokifa-products-grid,
    .woocommerce-page .bokifa-products-grid,
    .archive.woocommerce .bokifa-products-grid {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }
    
    /* Show 2 products per row on mobile with fluid gap */
    ul.bokifa-products.products.elementor-grid,
    .bokifa-products-grid ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: calc(0.5vw + 4px) !important;
        display: grid !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Force product cards to fit in 2 columns */
    ul.bokifa-products.products.elementor-grid li.product,
    .bokifa-products-grid ul.products li.product,
    .woocommerce ul.products li.product {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        padding: calc(0.5vw + 3px) !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure proper grid behavior */
    .bokifa-products-grid.elementor-grid-mobile-1 ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Product images - scale responsively */
    ul.bokifa-products.products.elementor-grid li.product img,
    ul.bokifa-products.products.elementor-grid li.product .attachment-woocommerce_thumbnail,
    .bokifa-products-grid ul.products li.product img,
    .woocommerce ul.products li.product img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        border-radius: calc(0.5vw + 4px) !important;
    }
    
    /* Product title - AGGRESSIVE fluid scaling */
    /* ul.bokifa-products.products.elementor-grid li.product h2,
    ul.bokifa-products.products.elementor-grid li.product h3,
    ul.bokifa-products.products.elementor-grid li.product .woocommerce-loop-product__title,
    .bokifa-products-grid ul.products li.product h2,
    .bokifa-products-grid ul.products li.product h3,
    .bokifa-products-grid ul.products li.product .woocommerce-loop-product__title,
    .woocommerce ul.products li.product h2,
    .woocommerce ul.products li.product h3,
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: calc(10px + 1vw) !important;
        line-height: 1.25 !important;
        margin-bottom: calc(2px + 0.5vw) !important;
        margin-top: calc(2px + 0.5vw) !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    } */
    
    /* Price - fluid scaling */
    /* ul.bokifa-products.products.elementor-grid li.product .price,
    ul.bokifa-products.products.elementor-grid li.product .price ins,
    ul.bokifa-products.products.elementor-grid li.product .price del,
    .bokifa-products-grid ul.products li.product .price,
    .woocommerce ul.products li.product .price {
        font-size: calc(10px + 0.8vw) !important;
        margin-bottom: calc(2px + 0.5vw) !important;
    } */
    
    /* Price currency symbol */
    /* ul.bokifa-products.products.elementor-grid li.product .price .woocommerce-Price-currencySymbol,
    .woocommerce ul.products li.product .price .woocommerce-Price-currencySymbol {
        font-size: calc(9px + 0.8vw) !important;
    } */
    
    /* Star rating */
    /* ul.bokifa-products.products.elementor-grid li.product .star-rating,
    .woocommerce ul.products li.product .star-rating {
        font-size: calc(8px + 0.5vw) !important;
        margin-bottom: calc(2px + 0.3vw) !important;
    } */
    
    /* Buttons - AGGRESSIVE fluid scaling */
    /* ul.bokifa-products.products.elementor-grid li.product .button,
    ul.bokifa-products.products.elementor-grid li.product .add_to_cart_button,
    ul.bokifa-products.products.elementor-grid li.product a.button,
    .bokifa-products-grid ul.products li.product .button,
    .bokifa-products-grid ul.products li.product .add_to_cart_button,
    .woocommerce ul.products li.product .button,
    .woocommerce ul.products li.product .add_to_cart_button {
        font-size: calc(9px + 0.6vw) !important;
        padding: calc(4px + 0.8vw) calc(6px + 1vw) !important;
        line-height: 1.2 !important;
        min-height: auto !important;
        height: auto !important;
    } */
    
    /* Product category/meta info */
    ul.bokifa-products.products.elementor-grid li.product .product-categories,
    ul.bokifa-products.products.elementor-grid li.product .product-meta,
    .woocommerce ul.products li.product .product-categories {
        font-size: calc(8px + 0.5vw) !important;
    }
    
    /* Quantity cart wrapper */
    ul.bokifa-products.products.elementor-grid li.product .quantity_cart,
    .woocommerce ul.products li.product .quantity_cart {
        margin-top: calc(2px + 0.5vw) !important;
    }
    
    /* Product inner content wrapper */
    ul.bokifa-products.products.elementor-grid li.product .product-inner,
    ul.bokifa-products.products.elementor-grid li.product .product-content,
    .woocommerce ul.products li.product .product-inner {
        padding: calc(2px + 0.5vw) !important;
    }
}

/* Critical fix for 430px and below - ensure cards fit properly */
@media screen and (max-width: 430px) {
    /* Force container and grid to be full width */
    .bokifa-products-grid,
    ul.bokifa-products.products.elementor-grid,
    .bokifa-products-grid ul.products {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Reduce gap significantly on smaller screens */
    ul.bokifa-products.products.elementor-grid,
    .bokifa-products-grid ul.products {
        gap: calc(0.3vw + 2px) !important;
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Reduce padding to make room */
    ul.bokifa-products.products.elementor-grid li.product,
    .bokifa-products-grid ul.products li.product {
        padding: calc(0.3vw + 2px) !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure images don't overflow */
    ul.bokifa-products.products.elementor-grid li.product img,
    .bokifa-products-grid ul.products li.product img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
    }
    
    /* Scale down text more aggressively */
    /* ul.bokifa-products.products.elementor-grid li.product h2,
    ul.bokifa-products.products.elementor-grid li.product h3,
    ul.bokifa-products.products.elementor-grid li.product .woocommerce-loop-product__title,
    .bokifa-products-grid ul.products li.product h2,
    .bokifa-products-grid ul.products li.product h3,
    .bokifa-products-grid ul.products li.product .woocommerce-loop-product__title {
        font-size: calc(8px + 0.8vw) !important;
        line-height: 1.2 !important;
    } */
    
    /* Scale down price */
    /* ul.bokifa-products.products.elementor-grid li.product .price,
    .bokifa-products-grid ul.products li.product .price {
        font-size: calc(8px + 0.7vw) !important;
    } */
    
    /* Scale down buttons more */
    /* ul.bokifa-products.products.elementor-grid li.product .button,
    ul.bokifa-products.products.elementor-grid li.product .add_to_cart_button,
    .bokifa-products-grid ul.products li.product .button {
        font-size: calc(7px + 0.5vw) !important;
        padding: calc(3px + 0.5vw) calc(5px + 0.7vw) !important;
    } */
    
    /* Reduce inner content padding */
    ul.bokifa-products.products.elementor-grid li.product .product-inner,
    ul.bokifa-products.products.elementor-grid li.product .product-content,
    .woocommerce ul.products li.product .product-inner {
        padding: calc(1px + 0.3vw) !important;
    }
}

/* Show only 1 product per row on very small screens (375px and below) */
@media screen and (max-width: 375px) {
    /* Switch to single column layout */
    ul.bokifa-products.products.elementor-grid,
    .bokifa-products-grid ul.products {
        grid-template-columns: 1fr !important;
        gap: calc(1vw + 8px) !important;
    }
    
    /* Product cards take full width */
    ul.bokifa-products.products.elementor-grid li.product,
    .bokifa-products-grid ul.products li.product,
    .woocommerce ul.products li.product {
        width: 100% !important;
        max-width: 100% !important;
        padding: calc(1vw + 6px) !important;
    }
    
    /* Increase font sizes since we have more space now */
    /* ul.bokifa-products.products.elementor-grid li.product h2,
    ul.bokifa-products.products.elementor-grid li.product h3,
    ul.bokifa-products.products.elementor-grid li.product .woocommerce-loop-product__title,
    .bokifa-products-grid ul.products li.product h2,
    .bokifa-products-grid ul.products li.product h3,
    .bokifa-products-grid ul.products li.product .woocommerce-loop-product__title {
        font-size: calc(12px + 1vw) !important;
        line-height: 1.4 !important;
    } */
    
    /* Larger price */
    /* ul.bokifa-products.products.elementor-grid li.product .price,
    .bokifa-products-grid ul.products li.product .price {
        font-size: calc(11px + 0.8vw) !important;
    } */
    
    /* Keep button height consistent - only adjust font size */
    /* ul.bokifa-products.products.elementor-grid li.product .button,
    ul.bokifa-products.products.elementor-grid li.product .add_to_cart_button,
    .bokifa-products-grid ul.products li.product .button {
        font-size: calc(11px + 0.6vw) !important;
    } */
    
    /* More comfortable spacing for product content */
    ul.bokifa-products.products.elementor-grid li.product .product-inner,
    ul.bokifa-products.products.elementor-grid li.product .product-content,
    .woocommerce ul.products li.product .product-inner {
        padding: calc(2px + 1vw) !important;
    }
}

/* Additional breakpoint for very small screens (< 400px) */
@media screen and (max-width: 400px) {
    ul.bokifa-products.products.elementor-grid,
    .bokifa-products-grid ul.products {
        gap: calc(0.3vw + 3px) !important;
    }
    
    ul.bokifa-products.products.elementor-grid li.product,
    .bokifa-products-grid ul.products li.product {
        padding: calc(0.3vw + 2px) !important;
    }
    
    /* More compact titles */
    /* ul.bokifa-products.products.elementor-grid li.product h2,
    ul.bokifa-products.products.elementor-grid li.product h3,
    ul.bokifa-products.products.elementor-grid li.product .woocommerce-loop-product__title,
    .bokifa-products-grid ul.products li.product h2,
    .bokifa-products-grid ul.products li.product h3,
    .bokifa-products-grid ul.products li.product .woocommerce-loop-product__title {
        font-size: calc(9px + 0.8vw) !important;
    } */
    
    /* More compact price */
    /* ul.bokifa-products.products.elementor-grid li.product .price,
    .bokifa-products-grid ul.products li.product .price {
        font-size: calc(9px + 0.6vw) !important;
    } */
    
    /* More compact buttons */
    /* ul.bokifa-products.products.elementor-grid li.product .button,
    ul.bokifa-products.products.elementor-grid li.product .add_to_cart_button,
    .bokifa-products-grid ul.products li.product .button {
        font-size: calc(8px + 0.5vw) !important;
        padding: calc(3px + 0.5vw) calc(5px + 0.8vw) !important;
    } */
}

/* Additional breakpoint for ultra-small screens (< 340px) */
@media screen and (max-width: 340px) {
    ul.bokifa-products.products.elementor-grid,
    .bokifa-products-grid ul.products {
        gap: 3px !important;
    }
    
    ul.bokifa-products.products.elementor-grid li.product,
    .bokifa-products-grid ul.products li.product {
        padding: 3px !important;
    }
    
    /* Ultra-compact text */
    /* ul.bokifa-products.products.elementor-grid li.product h2,
    ul.bokifa-products.products.elementor-grid li.product h3,
    ul.bokifa-products.products.elementor-grid li.product .woocommerce-loop-product__title {
        font-size: 10px !important;
    } */
    
    ul.bokifa-products.products.elementor-grid li.product .price {
        font-size: 9px !important;
    }
    
    /* ul.bokifa-products.products.elementor-grid li.product .button,
    ul.bokifa-products.products.elementor-grid li.product .add_to_cart_button {
        padding: 4px 6px !important;
        font-size: 8px !important;
    } */
}

@media screen and (max-width: 599px) {
    .site-content:has(ul.bokifa-products) {
        padding: 0 !important;
    }
}
