/**
 * MOISSA.CSS - Kunnasha Theme Custom Styles
 * Version: 1.0.0
 * Clean, organized stylesheet replacing kareem.css
 *
 * TABLE OF CONTENTS:
 * 1. Global Styles
 * 2. Header & Navigation
 * 3. Product Cards & Buttons
 * 4. Homepage Product Buttons
 * 5. Cart & Wishlist Icons
 * 6. Mini Cart
 * 7. Search Results
 * 8. Breadcrumbs
 * 9. Ratings & Reviews
 * 10. Forms & Login
 * 11. Sticky Elements
 * 12. Accessibility (UserWay)
 * 13. Miscellaneous
 * 14. Desktop (min-width: 1240px)
 * 15. Medium Desktop (max-width: 1240px)
 * 16. Desktop (min-width: 1024px)
 * 17. Tablet (max-width: 1024px)
 * 18. Desktop Product Titles (min-width: 768px)
 * 19. Mobile (max-width: 768px) - Layout & UI
 * 20. Mobile (max-width: 768px) - HOME PAGE CARDS (THE KEY SECTION)
 */


/* ==============================================
   1. GLOBAL STYLES
   ============================================== */

.home img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail,
.home img.woocommerce-placeholder.wp-post-image {
    object-fit: contain;
    aspect-ratio: unset !important;
}

img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail.wp-post-image {
    height: 100%;
    width: 100%;
}

.wp-block-woocommerce-customer-account {
    display: block !important;
}

.bookix-product-badges,
.single-product .bookix-coin-only-price {
    display: none;
}

.single-product .bookix-single-coin-price .price {
    display: none;
}

.add_to_cart_button {
    display: none !important;
}

.d-flex .wp-block-button__link img {
    transform: rotate(180deg) !important;
}

.custom-main-image img {
    display: block !important;
}

.home-v3-product.has-5-columns .wc-block-grid__product .wc-block-grid__product-image,
.home-v3-product.has-6-columns .wc-block-grid__product .wc-block-grid__product-image {
    padding: unset !important;
}

.category-pill-item p {
    display: none;
}

.category-pills-grid-container {
    display: none;
}

span.product-image {
    height: max-content !important;
}

.page-id-10 .wp-block-woocommerce-mini-cart {
    display: none !important;
}

ul.products .product-image img {
    object-fit: contain !important;
}

.single-product-page.has-global-padding.is-layout-constrained.wp-container-core-group-is-layout-92b9201d {
    display: none;
}

div#section-2 {
    padding: unset !important;
    background-color: #128f91 !important;
}

div#section-2 p {
    color: white !important;
}

div#section-3 {
    padding: unset !important;
}

.single-product .product-card {
    padding: unset !important;
}

.single-product .product-card h4 {
    text-align: center;
}

.single-lp_course footer {
    padding-top: 3rem;
}

body:not(.home) .wp-container-core-group-is-layout-538ad228 {
    display: none !important;
}

#productBotButton {
    display: none;
}

.wc-block-components-checkout-return-to-cart-button {
    display: none;
}


/* ==============================================
   2. HEADER & NAVIGATION
   ============================================== */

.header-coin-balance a {
    gap: 0.2rem;
    color: white !important;
}

.wp-block-woocommerce-customer-account a {
    padding: unset !important;
}

.wp-block-group-is-layout-flex .header-coin-balance {
    margin: 0 !important;
}

body:not(.editor-styles-wrapper) .header.v4 .search-v4 {
    padding-left: unset !important;
}

.wp-block-woocommerce-customer-wishlist {
    width: 45px;
    height: 45px;
    background: #2a9a9c;
    border-radius: 50%;
    box-shadow: unset;
    box-sizing: unset;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wp-block-woocommerce-customer-wishlist {
    display: flex !important;
}

.wp-block-woocommerce-customer-wishlist a {
    width: 1.5rem;
    height: 1.5rem;
}

svg.wc-block-mini-cart__icon {
    width: 1.7rem !important;
    height: 1.7rem !important;
}


/* ==============================================
   3. PRODUCT CARDS & BUTTONS
   ============================================== */

.products .product,
.woocommerce ul.products li.product {
    border: 1px solid #e5e5e5;
    border-radius: 12px !important;
    padding: 16px;
    background: white !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
}

.products .product:hover,
.woocommerce ul.products li.product:hover {
    border-color: #1a8f8f !important;
    box-shadow: 0 4px 12px rgba(26, 143, 143, 0.15) !important;
    transform: translateY(-2px);
}

.shop-preview-badge {
    display: none !important;
}

.bookix-buy-now-btn {
    background: linear-gradient(135deg, #1a8f8f 0%, #2ba5a5 100%) !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 12px 20px !important;
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    margin: 12px 0 0 !important;
    box-shadow: 0 3px 8px rgba(26, 143, 143, 0.25) !important;
    border: none !important;
}

.bookix-buy-now-btn .buy-text,
.bookix-buy-now-btn .price-separator {
    display: none !important;
}

.bookix-buy-now-btn .coin-icon {
    font-size: 20px !important;
    line-height: 1 !important;
}

.bookix-buy-now-btn .coin-amount {
    font-size: 18px !important;
    font-weight: 700 !important;
}

.bookix-buy-now-btn .coin-label {
    font-size: 15px !important;
    font-weight: 500 !important;
}

.bookix-buy-now-btn:hover {
    background: linear-gradient(135deg, #2ba5a5 0%, #3bc0c0 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(26, 143, 143, 0.35) !important;
}

.bookix-buy-now-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(26, 143, 143, 0.3) !important;
}

.woocommerce-loop-product__link .price {
    display: block !important;
    margin: 0 !important;
    width: 100% !important;
}

.wc-block-grid__product .wc-block-grid__product-title {
    min-height: 3rem;
    text-align: center !important;
}

/* Free product styles */
.bookix-free-product {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
}

.bookix-free-product:hover {
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%) !important;
}

.bookix-free-product-price .coin-icon {
    color: #4CAF50;
    font-size: 2em;
}

.bookix-free-product-price .coin-text {
    color: #4CAF50;
    font-weight: 600;
    font-size: 1.5em;
}


/* ==============================================
   4. HOMEPAGE PRODUCT BUTTONS
   ============================================== */

.home-v3-product .bookix-buy-now-btn,
.home-v4-product .bookix-buy-now-btn,
.wc-block-grid__products .bookix-buy-now-btn,
.wc-block-grid__product .bookix-buy-now-btn,
ul.products .bookix-buy-now-btn,
.products .bookix-buy-now-btn {
    width: 100% !important;
    padding: 14px 12px !important;
    background: linear-gradient(135deg, #158F90, #1aa5a6) !important;
    color: #fff !important;
    border: none !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border-radius: 0 0 10px 10px !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.home-v3-product .bookix-buy-now-btn:hover,
.home-v4-product .bookix-buy-now-btn:hover,
.wc-block-grid__products .bookix-buy-now-btn:hover,
.wc-block-grid__product .bookix-buy-now-btn:hover,
ul.products .bookix-buy-now-btn:hover,
.products .bookix-buy-now-btn:hover {
    background: linear-gradient(135deg, #1aa5a6, #158F90) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(21, 143, 144, 0.4) !important;
    color: white !important;
}

.home-v3-product .bookix-buy-now-btn .usd-price,
.wc-block-grid__product .bookix-buy-now-btn .usd-price,
ul.products .bookix-buy-now-btn .usd-price,
.products .bookix-buy-now-btn .usd-price {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: white !important;
}

.home-v3-product .bookix-buy-now-btn .coin-icon,
.wc-block-grid__product .bookix-buy-now-btn .coin-icon,
ul.products .bookix-buy-now-btn .coin-icon,
.products .bookix-buy-now-btn .coin-icon {
    font-size: 18px !important;
    line-height: 1 !important;
}

.home-v3-product .bookix-buy-now-btn .coin-amount,
.wc-block-grid__product .bookix-buy-now-btn .coin-amount,
ul.products .bookix-buy-now-btn .coin-amount,
.products .bookix-buy-now-btn .coin-amount {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: white !important;
}

.home-v3-product .bookix-buy-now-btn .coin-label,
.wc-block-grid__product .bookix-buy-now-btn .coin-label,
ul.products .bookix-buy-now-btn .coin-label,
.products .bookix-buy-now-btn .coin-label {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: white !important;
}

.home-v3-product .bookix-buy-now-btn .buy-text,
.home-v3-product .bookix-buy-now-btn .price-separator,
.wc-block-grid__product .bookix-buy-now-btn .buy-text,
.wc-block-grid__product .bookix-buy-now-btn .price-separator,
ul.products .bookix-buy-now-btn .buy-text,
ul.products .bookix-buy-now-btn .price-separator,
.products .bookix-buy-now-btn .buy-text,
.products .bookix-buy-now-btn .price-separator {
    display: none !important;
}

/* Shine effect on hover */
.home-v3-product .bookix-buy-now-btn::before,
.wc-block-grid__product .bookix-buy-now-btn::before,
ul.products .bookix-buy-now-btn::before,
.products .bookix-buy-now-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.home-v3-product .bookix-buy-now-btn:hover::before,
.wc-block-grid__product .bookix-buy-now-btn:hover::before,
ul.products .bookix-buy-now-btn:hover::before,
.products .bookix-buy-now-btn:hover::before {
    left: 100%;
}

.wpb-product-slider-wrapper .swiper-button-next {
    right: unset !important;
}


/* ==============================================
   5. CART & WISHLIST ACTION ICONS
   ============================================== */

.product-card-action-icons {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.product-card:hover .product-card-action-icons {
    opacity: 1;
    transform: translateX(0);
}

.custom-add-to-cart-icon,
.custom-wishlist-icon {
    width: 35px;
    height: 35px;
    border: 2px solid #158F90;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    color: #158F90;
}

.custom-add-to-cart-icon:hover,
.custom-wishlist-icon:hover {
    background: #158F90;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(21, 143, 144, 0.3);
}

.custom-add-to-cart-icon.success {
    background: #4CAF50 !important;
    color: white !important;
    border-color: #4CAF50 !important;
}

.custom-wishlist-icon.active {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.custom-wishlist-icon.active svg {
    fill: currentColor;
}

.product-in-cart .custom-add-to-cart-icon {
    background: #1a8f8f !important;
    color: white !important;
}


/* ==============================================
   6. MINI CART & CART ICON
   ============================================== */

.mini-cart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    gap: 15px;
}

.cart-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #1a8f8f;
    border-radius: 50%;
    animation: cartSpin 0.7s linear infinite;
}

@keyframes cartSpin {
    to { transform: rotate(360deg); }
}

.mini-cart-loading p {
    color: #888;
    font-size: 14px;
    margin: 0;
}

.wc-block-mini-cart__footer .wp-element-button::after {
    transform: rotate(180deg);
}

.mini-cart-title {
    color: white;
}

[data-block-name="woocommerce/mini-cart"] {
    display: none !important;
}

div#bookixCustomCartIcon {
    width: 45px;
    height: 45px;
    background: #2a9a9c;
    border-radius: 50%;
    box-shadow: unset;
    box-sizing: unset;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bookix-custom-cart-icon {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.bookix-custom-cart-icon svg {
    width: 30px;
    height: 30px;
    fill: white;
    color: white;
}

.bookix-custom-cart-badge-icon {
    position: absolute;
    top: -9px;
    right: 2px;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
    z-index: 10;
}

.bookix-custom-cart-badge-icon.show {
    display: flex;
}

.wc-block-components-drawer__screen-overlay.wc-block-components-drawer__screen-overlay--with-slide-in.wc-block-components-drawer__screen-overlay--with-slide-out {
    display: none !important;
}


/* ==============================================
   7. SEARCH RESULTS — legacy WC loop
   Search page uses the native WooCommerce legacy template on
   BOTH desktop and mobile — only the column count differs.
   Desktop: 5 columns (scoped to min-width:769px to avoid
            overriding Section 18's 2-col mobile rule).
   Mobile:  2 columns, handled by Section 18.
   ============================================== */

@media (min-width: 769px) {
    .search .products.columns-4,
    .search .products.columns-5,
    .search ul.products.columns-4,
    .search ul.products.columns-5,
    .search .woocommerce ul.products.columns-4,
    .search .woocommerce ul.products.columns-5 {
        grid-template-columns: repeat(5, 1fr) !important;
    }

    .search .products.columns-4 li.product,
    .search .products.columns-5 li.product,
    .search ul.products.columns-4 li.product,
    .search ul.products.columns-5 li.product {
        width: 100% !important;
    }
}

.search .wc-block-grid__product-price,
.search .bookix-buy-now-btn,
.search .wc-block-grid__product .wc-block-grid__product-price,
.search .wc-block-grid__product .bookix-buy-now-btn {
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
}

.search .wp-block-button.wc-block-grid__product-add-to-cart,
.search .wc-block-grid__product .wp-block-button.wc-block-grid__product-add-to-cart {
    width: 100% !important;
    display: block !important;
}

.search .wp-block-button__link,
.search .wc-block-grid__product .wp-block-button__link {
    width: 100% !important;
    display: block !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

.search .bookix-buy-now-btn {
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.search .bookix-buy-now-btn .buy-text,
.search .bookix-buy-now-btn .price-separator,
.search .bookix-buy-now-btn .usd-price,
.search .bookix-buy-now-btn .coin-icon,
.search .bookix-buy-now-btn .coin-amount,
.search .bookix-buy-now-btn .coin-label,
.search .bookix-buy-now-btn .free-text {
    display: inline-block;
}

.search .price {
    width: 100% !important;
    padding: 14px 12px !important;
    background: linear-gradient(135deg, #158F90, #1aa5a6) !important;
    color: #fff !important;
    border: none !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border-radius: 0 0 10px 10px !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.search-results #section-20 {
    display: none;
}

.search-results .wc-block-grid__product-image img {
    object-fit: unset !important;
}

.search-results .products .product,
.woocommerce ul.products li.product {
    border: unset !important;
    padding: unset !important;
}

/* Search results equal-height cards */
.search ul.products,
.search-results ul.products {
    display: grid !important;
    grid-auto-rows: 1fr !important;
    align-items: stretch !important;
}

.search ul.products li.product,
.search-results ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
}

.search ul.products li.product a img,
.search-results ul.products li.product a img,
.search ul.products li.product .woocommerce-loop-product__link img,
.search-results ul.products li.product .woocommerce-loop-product__link img {
    height: 300px !important;
    width: 100% !important;
    object-fit: contain !important;
    background: #f9f9f9 !important;
}

.search .woocommerce-loop-product__title,
.search-results .woocommerce-loop-product__title {
    min-height: 60px !important;
    max-height: 60px !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    text-align: center !important;
    font-size: 13px !important;
}

.search ul.products li.product .price,
.search-results ul.products li.product .price {
    margin-top: auto !important;
}

/* Emoji fix in search titles */
.woocommerce-loop-product__title .product-image {
    display: inline !important;
    vertical-align: middle;
}

.search-results .woocommerce-loop-product__title .product-image img.emoji,
.search-results .woocommerce-loop-product__title img.emoji,
.search ul.products li.product .woocommerce-loop-product__title img.emoji {
    width: 1em !important;
    height: 1em !important;
    max-width: 1em !important;
    max-height: 1em !important;
    display: inline !important;
    vertical-align: -0.1em !important;
    object-fit: contain !important;
    background: transparent !important;
    padding: 0 !important;
}


/* ==============================================
   8. BREADCRUMBS
   ============================================== */

.bookix-breadcrumb {
    background: transparent;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

ol.breadcrumb-list li {
    font-size: 0.8rem !important;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    font-size: 0.8rem !important;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: #1a73e8;
}

.breadcrumb-item a svg {
    flex-shrink: 0;
}

.breadcrumb-item.active span {
    color: #1a73e8;
    font-weight: 600;
}

.breadcrumb-separator {
    display: flex;
    align-items: center;
    color: #999;
}

.breadcrumb-separator svg {
    transform: rotate(180deg);
}

[dir="rtl"] .breadcrumb-separator svg {
    transform: rotate(0deg);
}


/* ==============================================
   9. RATINGS & REVIEWS
   ============================================== */

.product-rating-stars {
    flex-direction: row-reverse;
}

.product-rating-container,
.product-rating-container * {
    pointer-events: auto !important;
}

.rating-star {
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
    padding: 5px;
    margin: -5px;
}

.rating-star.active {
    color: #FFD700 !important;
}

.wpb-product-slider-wrapper .rating-star.filled:not(.active) {
    color: #ddd;
}


/* ==============================================
   10. FORMS & LOGIN
   ============================================== */

.social-login-wrapper {
    text-align: center;
    margin: 20px 0;
}

.login-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.login-divider:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.login-divider span {
    background: #fff;
    padding: 0 15px;
    position: relative;
    color: #666;
    font-size: 14px;
}

p.woocommerce-form-row.woocommerce-form-row--first.form-row.form-row-first,
p.woocommerce-form-row.woocommerce-form-row--last.form-row.form-row-last {
    width: 100%;
}

.wc-block-checkout__actions .wc-block-checkout__actions_row {
    margin-top: 3rem;
}

.wc-block-components-checkbox__label a {
    font-size: 14px;
    text-decoration: underline;
    color: blue;
}

.wc-block-order-confirmation-address-wrapper,
.order-again {
    display: none;
}


/* ==============================================
   MODERN CHECKOUT STYLES
   ============================================== */

/* -- Shared variables scoped to checkout -- */
.woocommerce-checkout {
    --co-radius: 12px;
    --co-pad: 24px 26px;
    --co-shadow: 0 1px 4px rgba(32,55,55,.04);
    --co-shadow-hover: 0 4px 16px rgba(32,55,55,.07);
    --co-focus-ring: 0 0 0 3px rgba(32,55,55,.08);
    --co-input-bg: var(--wp--preset--color--bg-1);
    --co-primary: var(--wp--preset--color--primary);
    --co-secondary: var(--wp--preset--color--secondary);
    --co-border: var(--wp--preset--color--border);
    --co-transition: .2s ease;
}

/* -- Page heading -- */
.woocommerce-checkout .wp-block-heading {
    font-size: clamp(22px, 2.5vw, 30px);
    font-weight: 700;
    letter-spacing: -.3px;
    margin-bottom: 8px;
}

/* -- Layout -- */
.woocommerce-checkout .wc-block-checkout { row-gap: 0; }

/* -- Section cards -- */
.woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkout-step {
    background: #fff;
    border: 1px solid var(--co-border);
    border-radius: var(--co-radius);
    padding: var(--co-pad);
    margin-bottom: 16px;
    box-shadow: var(--co-shadow);
    transition: box-shadow .25s ease, border-color .25s ease;
    animation: coFadeIn .4s ease both;
}
.woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkout-step:nth-child(2) { animation-delay: .05s; }
.woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkout-step:nth-child(3) { animation-delay: .1s; }
.woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkout-step:nth-child(4) { animation-delay: .15s; }
.woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkout-step:nth-child(5) { animation-delay: .2s; }
.woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkout-step:nth-child(6) { animation-delay: .25s; }
.woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkout-step:hover {
    box-shadow: var(--co-shadow-hover);
    border-color: rgba(32,55,55,.15);
}
@keyframes coFadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* Step title */
.woocommerce-checkout .wc-block-components-checkout-step__heading { margin-bottom: 16px; }
.woocommerce-checkout .wc-block-components-checkout-step .wc-block-components-title {
    font-size: 17px; font-weight: 600; letter-spacing: -.2px;
}

/*
 * ===  INPUTS & LABELS  ===
 * Shared base for text-input AND combobox so both match.
 */

/* All text inputs */
.woocommerce-checkout .wp-block-woocommerce-checkout .wc-block-components-text-input input[type],
.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input input[type] {
    background: var(--co-input-bg) !important;
    border: 1.5px solid transparent !important;
    border-radius: 10px !important;
    padding: 24px 16px 8px !important;
    text-indent: 0 !important;
    font-size: 15px;
    height: auto !important;
    line-height: 1.4 !important;
    transition: border-color var(--co-transition), background var(--co-transition), box-shadow var(--co-transition);
}
.woocommerce-checkout .wp-block-woocommerce-checkout .wc-block-components-text-input.is-active input[type] {
    padding: 24px 16px 8px !important;
}
.woocommerce-checkout .wp-block-woocommerce-checkout .wc-block-components-text-input input[type]:focus {
    background: #fff !important;
    border-color: var(--co-primary) !important;
    box-shadow: var(--co-focus-ring) !important;
    outline: none;
}

/* Native <select> fields (country / state) — WC Blocks renders these as
   .wc-blocks-components-select__select inside .wc-block-components-select_container */
.woocommerce-checkout .wc-block-components-select_container select.wc-blocks-components-select__select,
.woocommerce-checkout select#billing-country,
.woocommerce-checkout select#shipping-country,
.woocommerce-checkout select#billing-state,
.woocommerce-checkout select#shipping-state {
    background-color: var(--co-input-bg) !important;
    border: 1.5px solid transparent !important;
    border-radius: 10px !important;
    padding: 28px 16px 6px !important;
    height: auto !important;
    min-height: 56px;
    line-height: 1.3 !important;
    font-size: 15px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23203737' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: left 12px center !important;
    background-size: 14px 10px !important;
    transition: border-color var(--co-transition), background-color var(--co-transition), box-shadow var(--co-transition);
}
.woocommerce-checkout .wc-block-components-select_container select:focus {
    background-color: #fff !important;
    border-color: var(--co-primary) !important;
    box-shadow: var(--co-focus-ring) !important;
}
/* Select container — relative for label positioning */
.woocommerce-checkout .wc-block-components-select_container {
    position: relative !important;
}

/*
 * ===  FLOATING LABELS  ===
 * Override EVERYTHING from style.css: line-height, margin-left, transform.
 */

/* Text-input label — resting (placeholder) */
.woocommerce-checkout .wp-block-woocommerce-checkout .wc-block-components-text-input label,
.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input label {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 16px !important;
    left: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 500;
    line-height: 1.2 !important;
    color: #888;
    pointer-events: none;
    transition: all var(--co-transition);
}
/* Text-input label — active (has value / focused) */
.woocommerce-checkout .wp-block-woocommerce-checkout .wc-block-components-text-input.is-active label,
.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input.is-active label {
    top: 8px !important;
    transform: translateY(0) !important;
    font-size: 11px !important;
    color: var(--co-primary);
}

/* Select label (country/state) — sits above the value inside the select container.
   WC Blocks uses: label.wc-blocks-components-select__label */
.woocommerce-checkout .wc-block-components-select_container label.wc-blocks-components-select__label,
.woocommerce-checkout label[for="billing-country"],
.woocommerce-checkout label[for="shipping-country"],
.woocommerce-checkout label[for="billing-state"],
.woocommerce-checkout label[for="shipping-state"] {
    position: absolute !important;
    top: 6px !important;
    right: 16px !important;
    left: auto !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 11px !important;
    font-weight: 500;
    line-height: 1.2 !important;
    color: var(--co-primary);
    pointer-events: none;
    z-index: 1;
}

/* -- Checkboxes -- */
.woocommerce-checkout .wc-block-components-checkbox__input[type=checkbox] {
    width: 20px !important; height: 20px !important;
    border-radius: 6px !important;
    border: 1.5px solid var(--co-border) !important;
    transition: all .15s ease;
    accent-color: var(--co-secondary);
}
.woocommerce-checkout .wc-block-components-checkbox__input[type=checkbox]:checked {
    background-color: var(--co-secondary) !important;
    border-color: var(--co-secondary) !important;
}

/* -- Radio options (payment / shipping) -- */
.woocommerce-checkout .wc-block-components-radio-control__option {
    padding: 16px 20px !important;
    border: 1.5px solid var(--co-border);
    border-radius: 10px;
    margin-bottom: 8px;
    background: #fff;
    transition: border-color var(--co-transition), background var(--co-transition), box-shadow var(--co-transition);
}
.woocommerce-checkout .wc-block-components-radio-control__option:hover {
    border-color: rgba(32,55,55,.25);
}
.woocommerce-checkout .wc-block-components-radio-control__option.wc-block-components-radio-control__option--checked,
.woocommerce-checkout .wc-block-components-radio-control__option:has(input:checked) {
    border-color: var(--co-primary);
    background: rgba(32,55,55,.02);
    box-shadow: 0 0 0 1px var(--co-primary);
}
.woocommerce-checkout .wc-block-components-radio-control__input {
    border-color: var(--co-border) !important;
    position: absolute !important;
    right: 16px !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
}
.woocommerce-checkout .wc-block-components-radio-control__option {
    position: relative !important;
    padding-right: 48px !important;
    padding-left: 20px !important;
    display: flex !important;
    align-items: center !important;
    flex-direction: row-reverse !important;
    justify-content: flex-end !important;
    gap: 10px !important;
}
.woocommerce-checkout .wc-block-components-radio-control__input:checked {
    border-color: var(--co-primary) !important;
    background: var(--co-primary) !important;
}
.woocommerce-checkout .wc-block-components-radio-control__label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-direction: row-reverse !important;
    flex: 1 !important;
}
.woocommerce-checkout .wc-block-components-radio-control__label img {
    order: 1 !important;
}
.woocommerce-checkout .wc-block-components-radio-control__secondary-label {
    display: none !important;
}
.woocommerce-checkout .wc-block-components-radio-control-accordion-option:after,
.woocommerce-checkout .wc-block-checkout__shipping-option .wc-block-components-radio-control__option:after { display: none; }

/* -- Order summary sidebar -- */
.woocommerce-checkout .wc-block-checkout__sidebar {
    background: #fff !important;
    border: 1px solid var(--co-border) !important;
    border-radius: 16px !important;
    padding: 28px !important;
    box-shadow: 0 2px 12px rgba(32,55,55,.05) !important;
    position: sticky; top: 100px;
}
.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__title {
    border-bottom: 1px solid var(--co-border);
    padding-bottom: 16px; margin-bottom: 8px;
}
.woocommerce-checkout .wc-block-components-order-summary-item { padding: 12px 0 !important; gap: 14px; }
.woocommerce-checkout .wc-block-components-order-summary-item__image img {
    border-radius: 10px !important;
    border: 1px solid var(--co-border);
}
.woocommerce-checkout .wc-block-components-order-summary-item__quantity {
    background-color: var(--co-primary) !important;
    border: 0 !important; color: #fff !important;
    font-size: 11px !important; font-weight: 600;
    min-width: 22px; height: 22px; border-radius: 50% !important;
}

/* Totals */
.woocommerce-checkout .wc-block-components-totals-item { padding: 10px 0; }
.woocommerce-checkout .wc-block-components-totals-footer-item {
    border-top: 2px solid var(--co-primary) !important;
    margin-top: 8px; padding-top: 16px !important;
}
.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-formatted-money-amount {
    font-size: 18px !important; font-weight: 700 !important; color: var(--co-primary);
}

/* Coupon */
.woocommerce-checkout .wc-block-components-totals-coupon-link {
    font-size: 14px; font-weight: 500;
    color: var(--co-secondary); text-decoration: none;
    transition: color var(--co-transition);
}
.woocommerce-checkout .wc-block-components-totals-coupon-link:hover {
    color: var(--co-primary) !important; text-decoration: underline;
}
.woocommerce-checkout .wc-block-components-totals-coupon__form { display: flex; gap: 8px; }
.woocommerce-checkout .wc-block-components-totals-coupon__form button { border-radius: 10px !important; font-weight: 600; }

/* Summary separators */
.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-cart-items-block,
.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-coupon-form-block,
.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-subtotal-block,
.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-shipping-block {
    border-bottom: 1px solid var(--co-border) !important;
    padding-bottom: 14px;
}

/* -- Place order button -- */
.woocommerce-checkout .wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
    background: var(--co-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--co-radius) !important;
    padding: 16px 32px !important;
    font-size: 16px !important; font-weight: 700 !important;
    letter-spacing: .3px;
    width: 100%; cursor: pointer;
    box-shadow: 0 4px 14px rgba(32,55,55,.15);
    transition: all .3s ease;
}
.woocommerce-checkout .wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button:hover {
    background: var(--co-secondary) !important;
    box-shadow: 0 6px 20px rgba(211,96,71,.25);
    transform: translateY(-1px);
}
.woocommerce-checkout .wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(32,55,55,.15);
}

/* -- Terms -- */
.woocommerce-checkout .wc-block-checkout__terms {
    background: var(--co-input-bg); border-radius: 10px;
    padding: 14px 16px; margin-bottom: 8px;
}
.woocommerce-checkout .wc-block-checkout__terms .wc-block-components-checkbox__label {
    font-size: 13px; line-height: 1.5; color: #666;
}

/* -- Notices -- */
.woocommerce-checkout .wc-block-components-notice-banner {
    border-radius: 10px; padding: 14px 18px; margin-bottom: 16px; border: none; font-size: 14px;
}
.woocommerce-checkout .wc-block-components-notice-banner.is-error   { background: #fef2f2; color: #b91c1c; }
.woocommerce-checkout .wc-block-components-notice-banner.is-success { background: #f0fdf4; color: #166534; }
.woocommerce-checkout .wc-block-components-notice-banner.is-info    { background: #eff6ff; color: #1e40af; }

/* -- Validation errors -- */
.woocommerce-checkout .wc-block-components-validation-error p {
    color: #e74c3c; font-size: 13px; margin-top: 4px; font-weight: 500;
}

/* -- Mobile -- */
@media (max-width: 1023px) {
    .woocommerce-checkout { --co-pad: 18px; --co-radius: 10px; }
    .woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkout-step { margin-bottom: 12px; }
    .woocommerce-checkout .wc-block-checkout__sidebar {
        padding: 20px 18px !important; border-radius: 14px !important;
        margin-top: 16px; position: static;
    }
    .woocommerce-checkout .wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
        padding: 14px 24px !important; font-size: 15px !important;
    }
}


/* ==============================================
   11. STICKY ELEMENTS
   ============================================== */

.sticky-question-btn {
    position: fixed;
    left: 20px;
    bottom: 54px;
    transform: translateY(-50%);
    z-index: 9999;
}

.sticky-question-btn a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #128f91;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(80, 149, 139, 0.3);
    transition: all 0.3s ease;
}

.sticky-question-btn a:hover {
    background: #3d7268;
    box-shadow: 0 4px 15px rgba(80, 149, 139, 0.5);
    transform: scale(1.1);
}

.sticky-question-btn svg {
    width: 24px;
    height: 24px;
}


/* ==============================================
   12. ACCESSIBILITY (UserWay)
   ============================================== */

.cya11y-menu-btn {
    right: unset !important;
}

#INDmenu-btn,
.uwy.userway_p6 #INDmenu-btn {
    right: 10px !important;
    left: unset !important;
    bottom: 20px !important;
    top: unset !important;
    position: fixed !important;
}


/* ==============================================
   13. MISCELLANEOUS
   ============================================== */

.faq-item.active h3 {
    color: white !important;
}

p[style*="font-size:13px"] {
    font-size: clamp(0.8rem, 0.8rem + ((1vw - 0.2rem) * 0.481), 1.125rem) !important;
}

p[style*="font-size:12px"] {
    font-size: clamp(0.7rem, 0.7rem + ((1vw - 0.2rem) * 0.481), 1.125rem) !important;
}

.package-item li::before {
    right: 35px !important;
}

li.woocommerce-MyAccount-navigation-link.woocommerce-MyAccount-navigation-link--downloads {
    display: none;
}

.bookix-downloads-page > h2 {
    font-weight: bold;
    font-size: 1.8rem !important;
}

.features-list li:hover {
    transform: unset !important;
}

.features-list li::before {
    right: 35px !important;
}

div#div-115 .wp-block-buttons .wp-block-button__link {
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1000000;
    display: block;
    position: relative;
}

.dna a {
    background: unset !important;
    border-color: unset !important;
    border: unset !important;
}

.sidebar-title {
    color: white;
}

.wishlist-product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.wishlist-product-link:hover .wishlist-product-name {
    color: #1a8f8f;
}

.wishlist-product-actions {
    padding: 0 20px 20px 20px;
}

.wishlist-product-name {
    text-align: center;
}

.wishlist-product-price {
    justify-content: center;
}

.mailpoet_form_popup_overlay.active {
    margin-block-start: unset !important;
}

.mailpoet_form_close_icon {
    right: unset;
    left: 10px;
}

@media (max-width: 1450px) {
    img.wp-block-cover__image-background.wp-image-1738.size-large {
        object-fit: contain;
    }
}


/* ==============================================
   14. DESKTOP (min-width: 1240px)
   ============================================== */

@media only screen and (min-width: 1240px) {
    .wp-container-core-columns-is-layout-28f84493 .wc-block-grid__product-title {
        min-height: 5rem;
    }

    .wishlist-product-actions {
        padding: unset;
    }

    .wishlist-product-image-wrapper {
        position: relative;
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        height: 382px !important;
        padding-top: unset !important;
    }

    .wishlist-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)) !important;
        gap: 25px;
    }

    .woocommerce-loop-product__title,
    .woocommerce-loop-category__title,
    .wc-block-grid__product-title,
    .products-block-post-template .wp-block-post-title,
    .wp-block-woocommerce-related-products .wp-block-post-title,
    .wp-block-cart-cross-sells-product__product-title {
        min-height: 3rem;
    }

    .wc-block-grid__product-image {
        height: 353px !important;
    }

    .slide-inner img {
        max-height: 87vh !important;
    }

    .main-gallery {
        height: unset !important;
    }
}


/* ==============================================
   15. MEDIUM DESKTOP (max-width: 1240px)
   ============================================== */

@media only screen and (max-width: 1240px) {
    img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail {
        height: 300px !important;
    }
}


/* ==============================================
   16. DESKTOP (min-width: 1024px)
   ============================================== */

@media only screen and (min-width: 1024px) {
    .imgmob {
        display: none;
    }

    .wpb-product-slider-wrapper .wc-block-grid__product {
        border-right: unset !important;
        border-left: unset !important;
    }

    .newmea {
        padding: unset !important;
    }

    .swiper-button-next,
    .swiper-button-prev {
        top: var(--swiper-navigation-top-offset, 32%);
    }

    .wp-container-core-columns-is-layout-4afff5be {
        max-width: 91% !important;
    }
}


/* ==============================================
   17. TABLET (max-width: 1024px)
   ============================================== */

@media only screen and (max-width: 1024px) {
    .wpb-product-slider-wrapper .swiper-slide {
        max-width: calc(50% - 5px) !important;
        flex: 0 0 calc(50% - 5px) !important;
    }

    .home .wc-block-grid .wc-block-grid__products,
    .home ul.products,
    .home .wp-block-post-template:is(.columns-3, .columns-4, .columns-5, .columns-6) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .homev3-product-list,
    .homev4-product-list {
        flex-wrap: wrap !important;
        overflow-x: auto;
        display: flex;
        overflow-y: hidden;
    }

    body:not(.editor-styles-wrapper) .header .header-content .wp-block-column:nth-child(3) > .wp-block-group {
        gap: 5px;
    }
}


/* ==============================================
   18. DESKTOP PRODUCT TITLES (min-width: 768px)
   ============================================== */

@media (min-width: 768px) {
    .home-v3-product .wc-block-grid__product-title {
        min-height: 3rem;
    }

    .swiper-wrapper {
        padding-bottom: 4rem !important;
    }

    .random-products-swiper .product-img {
        height: 26rem !important;
    }

    .home-v3-product.has-6-columns .wc-block-grid__product .wc-block-grid__product-image img {
        height: 352px !important;
    }

    .single-product .product-img {
        height: 16rem;
    }

    .single-product .product-card .bookix-buy-now-btn {
        height: 3rem !important;
        flex-direction: row !important;
        min-height: unset;
        max-height: unset;
        display: block;
        flex: unset;
        margin-top: auto !important;
    }

    .single-product .product-card h4 {
        min-height: 4rem;
    }
}


/* ==============================================
   19. MOBILE (max-width: 768px) - LAYOUT & UI
   ============================================== */

@media (max-width: 768px) {
    /* General layout */
    .imgdes {
        display: none;
    }

    .flex-sm-wrap.wp-block-columns.is-not-stacked-on-mobile > div,
    .flex-sm-wrap.is-nowrap > div {
        flex-basis: 46% !important;
    }

    #div-217 .flex-sm-wrap.wp-block-columns.is-not-stacked-on-mobile > div,
    #div-217 .flex-sm-wrap.is-nowrap > div,
    footer .flex-sm-wrap.wp-block-columns.is-not-stacked-on-mobile > div,
    footer .flex-sm-wrap.is-nowrap > div {
        flex-basis: 46% !important;
    }

    #div-217 .wp-block-column > p,
    footer .wp-block-column > p {
        font-weight: 900 !important;
        margin-bottom: 0.5rem !important;
        font-size: 1.2rem !important;
    }

    .wp-block-group.has-global-padding {
        margin-top: 0.5rem !important;
    }

    footer nav.has-text-color {
        margin-top: 0.5rem !important;
    }

    /* Product cards mobile */
    .products .product,
    .woocommerce ul.products li.product {
        padding: 12px !important;
        border-radius: 10px !important;
    }

    .bookix-buy-now-btn {
        padding: 10px 16px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
    }

    .bookix-buy-now-btn .coin-amount {
        font-size: 16px !important;
    }

    /* Sticky elements */
    .social-share-container {
        bottom: 125px !important;
        left: 20px;
    }

    .sticky-suggestions-button {
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        width: 45px !important;
        height: 45px !important;
    }

    .sticky-question-btn {
        left: 10px;
        bottom: 50px;
    }

    .sticky-question-btn a {
        width: 40px;
        height: 40px;
    }

    .sticky-question-btn svg {
        width: 20px;
        height: 20px;
    }

    /* Header */
    .header-coin-balance a {
        padding: unset !important;
    }

    /* Category pills horizontal scroll */
    .category-pills-grid-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        gap: 10px !important;
        padding: 0 !important;
    }

    .category-pills-grid-container::-webkit-scrollbar {
        height: 6px;
    }

    .category-pills-grid-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .category-pills-grid-container::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 10px;
    }

    .category-pills-grid {
        flex-wrap: unset !important;
    }

    .category-pill-item {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 120px !important;
        max-width: 200px !important;
    }

    .category-pill-item:first-child {
        margin-left: 15px;
    }

    .category-pill-item:last-child {
        margin-right: 15px;
    }

    /* Forms */
    .wpforms-submit-container {
        justify-content: center;
        display: flex;
        margin-top: 2rem !important;
    }

    .nda > div {
        margin-top: unset !important;
    }

    .nda {
        padding-bottom: unset !important;
        padding-right: var(--wp--style--root--padding-right);
        padding-left: var(--wp--style--root--padding-left);
        padding-top: 2rem;
    }

    .newna,
    .newmea {
        padding: unset !important;
    }

    div#section-3 img.wp-image-1583 {
        width: 50px !important;
    }

    h6.wp-block-heading.alignfull.has-text-align-center.has-white-color.has-text-color {
        width: 80%;
        margin: auto;
    }

    /* Random products swiper image height on mobile (scoped to avoid
       leaking into home page product sliders). */
    .random-products-swiper .product-img {
        height: 32rem !important;
    }

    .swiper-wrapper .swiper-wrapper {
        padding-bottom: 0rem !important;
    }

    .random-products-section {
        padding: 30px 0 !important;
    }

    .left-tabs-section .product-card h4 {
        font-size: 14px;
    }

    .product-card .bookix-buy-now-btn {
        flex-direction: row !important;
    }

    /* Breadcrumbs mobile */
    .bookix-breadcrumb {
        margin-bottom: 16px;
        padding: 8px 0;
    }

    .breadcrumb-list {
        font-size: 13px;
        gap: 6px;
    }

    .breadcrumb-item a svg,
    .breadcrumb-separator svg {
        width: 14px;
        height: 14px;
    }

    /* Mailpoet */
    .mailpoet_form_popup_overlay.active {
        display: block;
        margin-block-start: unset !important;
    }

    /* Shop page products */
    .page-id-2044 .products-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }

    /* Search mobile — force 2 columns on every WC column variant */
    .search .products,
    .search ul.products,
    .search .woocommerce ul.products,
    .search .products.columns-2,
    .search .products.columns-3,
    .search .products.columns-4,
    .search .products.columns-5,
    .search .products.columns-6,
    .search ul.products.columns-2,
    .search ul.products.columns-3,
    .search ul.products.columns-4,
    .search ul.products.columns-5,
    .search ul.products.columns-6,
    .search .woocommerce ul.products.columns-2,
    .search .woocommerce ul.products.columns-3,
    .search .woocommerce ul.products.columns-4,
    .search .woocommerce ul.products.columns-5,
    .search .woocommerce ul.products.columns-6 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .search .products li.product,
    .search ul.products li.product,
    .search .woocommerce ul.products li.product {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin: 0 !important;
    }

    .search .wc-block-grid__product-price,
    .search .bookix-buy-now-btn,
    .search .wc-block-grid__product .wc-block-grid__product-price,
    .search .wc-block-grid__product .bookix-buy-now-btn {
        width: 100% !important;
    }

    .search .wp-block-button.wc-block-grid__product-add-to-cart {
        width: 100% !important;
    }

    .search .wp-block-button__link {
        width: 100% !important;
    }

    div[data-template=archive-product] .woocommerce-result-count,
    div[data-template=product-search-results] .woocommerce-result-count {
        margin-bottom: 75px;
    }
}


/* ==============================================
   20. MOBILE HOME PAGE CARDS — UNIFIED STYLE
   Single source of truth for ALL product cards on
   mobile (<=768px). Both the first-row plain grid
   cards and the slider-row cards use the SAME rules
   and the SAME layout (horizontal CSS scroll).
   Swiper is NOT initialized on mobile — slider cards
   render as plain divs so these rules always win.
   ============================================== */

@media (max-width: 768px) {

    /* ---- 1. Containers: horizontal scroll row ---- */
    .home .wc-block-grid .wc-block-grid__products,
    .home ul.products,
    body.home .wpb-product-slider-wrapper .swiper-wrapper {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x mandatory !important;
        gap: 10px !important;
        padding: 0 10px 10px !important;
        margin: 0 !important;
        transform: none !important;
        transition: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .home .wc-block-grid .wc-block-grid__products::-webkit-scrollbar,
    .home ul.products::-webkit-scrollbar,
    body.home .wpb-product-slider-wrapper .swiper-wrapper::-webkit-scrollbar {
        display: none !important;
    }

    /* Hide Swiper navigation on mobile (Swiper isn't initialized here) */
    body.home .wpb-product-slider-wrapper .swiper-button-next,
    body.home .wpb-product-slider-wrapper .swiper-button-prev,
    body.home .wpb-product-slider-wrapper .swiper-pagination {
        display: none !important;
    }

    /* Outer wrapper: clip any spill, full viewport width */
    body.home .wpb-product-slider-wrapper {
        padding: 0 !important;
        margin: 0 0 24px !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    /* Any inner wp-block-group the shortcode adds */
    body.home .wpb-product-slider-wrapper > .wp-block-group,
    body.home .wpb-product-slider-wrapper .wp-block-group {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* The .swiper element: clip content so .swiper-wrapper scrolls inside it.
       (overflow: visible would let the 5×48% flex row spill past the viewport.) */
    body.home .wpb-product-slider-wrapper .swiper {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        margin: 1rem 0 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    /* ---- 2. Cards (items): 62% width ---- */
    .home .wc-block-grid__product,
    .home ul.products li.product,
    body.home .wpb-product-slider-wrapper .swiper-slide {
        flex: 0 0 62% !important;
        min-width: 62% !important;
        max-width: 62% !important;
        width: 62% !important;
        height: auto !important;
        margin: 0 !important;
        scroll-snap-align: start !important;
    }

    /* ---- 3. Card inner: flex column so price sticks to bottom ---- */
    body.home .wc-block-grid__product,
    body.home .wpb-product-slider-wrapper .swiper-slide .wc-block-grid__product {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    body.home .wc-block-grid__product .wc-block-grid__product-link,
    body.home .wpb-product-slider-wrapper .swiper-slide .wc-block-grid__product .wc-block-grid__product-link {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
    }

    /* ---- 4. Image: fixed 310px, object-fit cover ---- */
    body.home .wc-block-grid__product .wc-block-grid__product-image,
    body.home .wpb-product-slider-wrapper .swiper-slide .wc-block-grid__product .wc-block-grid__product-image,
    body.home .home-v3-product .wc-block-grid__product .wc-block-grid__product-image {
        height: 310px !important;
        min-height: 310px !important;
        max-height: 310px !important;
        overflow: hidden !important;
    }

    body.home .wc-block-grid__product .wc-block-grid__product-image img,
    body.home .wpb-product-slider-wrapper .swiper-slide .wc-block-grid__product .wc-block-grid__product-image img,
    body.home .wpb-product-slider-wrapper .swiper-slide img.attachment-woocommerce_thumbnail,
    body.home .home-v3-product .wc-block-grid__product .wc-block-grid__product-image img,
    .home img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail {
        height: 310px !important;
        width: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }

    /* ---- 5. Title: fixed 52px (2 lines clamped) ---- */
    body.home .wc-block-grid__product .wc-block-grid__product-title,
    body.home .wpb-product-slider-wrapper .swiper-slide .wc-block-grid__product .wc-block-grid__product-title,
    body.home .home-v3-product .wc-block-grid__product .wc-block-grid__product-title {
        min-height: 52px !important;
        max-height: 52px !important;
        overflow: hidden !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
        text-align: center !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        margin: 0.4rem 0 !important;
    }

    /* ---- 6. Rating: fixed 62px — fits stars line + "(0 تقييم)"
       count line. Previously 44px was clipping the count below the
       stars on the home page cards. ---- */
    body.home .wc-block-grid__product .product-rating-container,
    body.home .wpb-product-slider-wrapper .swiper-slide .product-rating-container {
        height: 62px !important;
        min-height: 62px !important;
        max-height: 62px !important;
        overflow: visible !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
    }

    body.home .wc-block-grid__product .product-rating-container .product-rating-stars,
    body.home .wpb-product-slider-wrapper .swiper-slide .product-rating-container .product-rating-stars {
        line-height: 1 !important;
    }

    body.home .wc-block-grid__product .product-rating-container .rating-info,
    body.home .wpb-product-slider-wrapper .swiper-slide .product-rating-container .rating-info {
        font-size: 11px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }

    /* ---- 7. Price button pinned to bottom ---- */
    body.home .wc-block-grid__product .wc-block-grid__product-price,
    body.home .wpb-product-slider-wrapper .swiper-slide .wc-block-grid__product-price {
        margin-top: auto !important;
        width: 100% !important;
    }

    body.home .bookix-buy-now-btn,
    body.home .wpb-product-slider-wrapper .swiper-slide .bookix-buy-now-btn {
        font-size: 15px !important;
        padding: 12px 10px !important;
        min-height: 48px !important;
    }
}


/* ==============================================
   21. SHOP PAGE (/shop-kunnasha/) — MOBILE CARDS
   The custom shop shortcode renders products into
   .bookix-custom-shop-container .products-grid with
   the same .wc-block-grid__product classes used on
   home. Cards in this grid vary in height when the
   title is short vs long, so we lock every section
   of the card to a fixed size so rows line up.
   ============================================== */

@media (max-width: 768px) {

    /* Outer container: full width, no leftover sidebar column.
       Keep padding very tight so each card gets maximum width. */
    .bookix-custom-shop-container {
        display: block !important;
        grid-template-columns: none !important;
        gap: 0 !important;
        padding: 8px 4px !important;
        max-width: 100% !important;
    }

    .bookix-custom-shop-container .products-grid {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        min-height: 0 !important;
    }

    /* Actual 2-column grid lives on the <ul> the JS injects inside
       #productsGrid. The <div class="products-grid"> only has the
       <ul> as its single direct child, so putting the grid there
       would collapse to one column. */
    .bookix-custom-shop-container .products-grid > ul.products-list,
    .bookix-custom-shop-container ul.products-list {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        list-style: none !important;
        box-sizing: border-box !important;
    }

    /* Card = flex column so the price/button pins to the bottom */
    .bookix-custom-shop-container .products-grid .wc-block-grid__product,
    .bookix-custom-shop-container ul.products-list > li.wc-block-grid__product {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 6px !important;
        box-sizing: border-box !important;
        background: #fff !important;
        border-radius: 12px !important;
        overflow: hidden !important;
    }

    .bookix-custom-shop-container .products-grid .wc-block-grid__product-link {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
    }

    /* Image: fixed 290px, object-fit cover */
    .bookix-custom-shop-container .products-grid .wc-block-grid__product-image {
        height: 290px !important;
        min-height: 290px !important;
        max-height: 290px !important;
        width: 100% !important;
        overflow: hidden !important;
        position: relative !important;
    }

    .bookix-custom-shop-container .products-grid .wc-block-grid__product-image img,
    .bookix-custom-shop-container .products-grid img.attachment-woocommerce_thumbnail {
        height: 290px !important;
        width: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }

    /* Title: fixed 2-line clamp so every card has the same title height */
    .bookix-custom-shop-container .products-grid .wc-block-grid__product-title {
        min-height: 52px !important;
        max-height: 52px !important;
        overflow: hidden !important;
        font-size: 15px !important;
        line-height: 1.5 !important;
        text-align: center !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        margin: 0.5rem 0 !important;
        padding: 0 4px !important;
    }

    /* Rating row: fixed 62px — enough for stars line + "(0 تقييم)"
       line. Previously 44px was clipping the count underneath. */
    .bookix-custom-shop-container .products-grid .product-rating-container {
        height: 62px !important;
        min-height: 62px !important;
        max-height: 62px !important;
        overflow: visible !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
    }

    .bookix-custom-shop-container .products-grid .product-rating-container .product-rating-stars {
        line-height: 1 !important;
    }

    .bookix-custom-shop-container .products-grid .product-rating-container .rating-info {
        font-size: 11px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }

    /* Badges wrapper (wishlist/cart icons): fixed height, not part of flex growth */
    .bookix-custom-shop-container .products-grid .custom-product-badges-wrapper {
        flex-shrink: 0 !important;
    }

    /* Price row pinned to bottom of card */
    .bookix-custom-shop-container .products-grid .wc-block-grid__product-price {
        margin-top: auto !important;
        width: 100% !important;
    }

    .bookix-custom-shop-container .products-grid .bookix-buy-now-btn {
        font-size: 16px !important;
        padding: 13px 10px !important;
        min-height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
    }

    /* Hide the generic WC add-to-cart button on mobile shop cards (the
       bookix-buy-now-btn is the primary CTA) to avoid stacking buttons
       of different heights below the image. */
    .bookix-custom-shop-container .products-grid .wc-block-grid__product-add-to-cart {
        display: none !important;
    }
}


/* ==============================================
   22. SINGLE PRODUCT PAGE — RELATED PRODUCTS TABS
   The three tabs on /product/... (منتجات ذات صلة,
   من نفس الفئة, الفئات) render .product-card items
   inside .tabs-container .products-grid. Their buy
   buttons were shrinking/growing with text length
   because custom_product.php's mobile rule sets
   only font-size + padding. Lock width, min-height,
   and flex layout so every button is identical.
   ============================================== */

@media (max-width: 768px) {

    /* The tab card itself: flex column so the button pins to the
       bottom and every card's CTA row lines up. */
    .tabs-container .tab-pane .products-grid .product-card,
    .tabs-container .products-grid .product-card {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    .tabs-container .tab-pane .products-grid .product-card > a,
    .tabs-container .products-grid .product-card > a {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        text-decoration: none !important;
    }

    /* Lock the title to a 2-line clamp at a fixed height */
    .tabs-container .tab-pane .products-grid .product-card h4,
    .tabs-container .products-grid .product-card h4 {
        min-height: 44px !important;
        max-height: 44px !important;
        overflow: hidden !important;
        font-size: 14px !important;
        line-height: 1.4 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        text-align: center !important;
        margin: 0.4rem 0 !important;
        padding: 0 4px !important;
    }

    /* THE FIX: the buy button is full-width with a fixed min-height,
       centered content, and truncated overflow so long labels don't
       stretch the button taller or wider than its siblings. */
    .tabs-container .tab-pane .products-grid .product-card .bookix-buy-now-btn,
    .tabs-container .products-grid .product-card .bookix-buy-now-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 48px !important;
        max-height: 48px !important;
        padding: 10px 8px !important;
        font-size: 14px !important;
        line-height: 1.2 !important;
        box-sizing: border-box !important;
        margin-top: auto !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
    }

    /* Inner spans of the button: prevent any single piece from
       stretching the layout. */
    .tabs-container .products-grid .product-card .bookix-buy-now-btn .buy-text,
    .tabs-container .products-grid .product-card .bookix-buy-now-btn .price-separator,
    .tabs-container .products-grid .product-card .bookix-buy-now-btn .coin-icon,
    .tabs-container .products-grid .product-card .bookix-buy-now-btn .coin-amount,
    .tabs-container .products-grid .product-card .bookix-buy-now-btn .coin-label,
    .tabs-container .products-grid .product-card .bookix-buy-now-btn .usd-price {
        flex: 0 0 auto !important;
        font-size: 13px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }
}


/* ==============================================
   23. FLOATING ACTION BUTTONS — MOBILE LAYOUT
   Layout on mobile (<=768px):
   - LEFT column (bottom → top), 50px buttons + 12px gap:
       1. Question (?)        bottom: 20px
       2. Suggestions (chat)  bottom: 82px
       3. Share               bottom: 144px   ← TOP
     The share button is on top so its 3-link expansion
     (whatsapp / facebook / instagram) opens UPWARD into
     empty space and never overlaps the two icons below.
   - RIGHT bottom: UserWay accessibility button.
     UserWay sets inline styles via JS, so the JS in
     bookix_floating_buttons_layout_js() (functions.php)
     also moves the wrapper after page load. The CSS
     here just makes the resting position correct.
   - When the suggestions popup is open, body gets
     class .bookix-modal-open and the UserWay wrapper
     is hidden so it can't overlap form fields.
   ============================================== */

@media (max-width: 768px) {

    /* 1. Question / help button — bottommost */
    .sticky-question-btn {
        left: 15px !important;
        right: auto !important;
        bottom: 20px !important;
        top: auto !important;
        transform: none !important;
        z-index: 9998 !important;
    }

    .sticky-question-btn a {
        width: 50px !important;
        height: 50px !important;
    }

    /* 2. Suggestions / chat button — middle */
    #sticky-suggestions-btn,
    .sticky-suggestions-button {
        left: 15px !important;
        right: auto !important;
        bottom: 82px !important;
        top: auto !important;
        width: 50px !important;
        height: 50px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        z-index: 9998 !important;
    }

    /* 3. Share button — TOP, so its expansion opens upward
       into empty space and never overlaps the other icons. */
    .social-share-container {
        left: 15px !important;
        right: auto !important;
        bottom: 144px !important;
        top: auto !important;
        z-index: 9998 !important;
    }

    .social-share-container .share-button,
    .social-share-container .product-bot-button {
        width: 50px !important;
        height: 50px !important;
    }

    /* 4. UserWay accessibility — pin OUTER wrapper to RIGHT bottom.
       UserWay sets these on .uwy via inline JS, so functions.php
       also re-applies them on DOMContentLoaded + a MutationObserver. */
    body .uwy,
    body .uwy.userway_p6,
    body .uwy.userway {
        left: auto !important;
        right: 15px !important;
        bottom: 20px !important;
        top: auto !important;
    }

    body #INDmenu-btn,
    body .uwy #INDmenu-btn,
    body .uwy.userway_p6 #INDmenu-btn {
        left: auto !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        position: fixed !important;
    }

    /* 5. Hide UserWay when a modal/popup is open so it cannot
       overlay form inputs. JS adds .bookix-modal-open to <body>
       whenever .suggestions-popup gets .active. */
    body.bookix-modal-open .uwy,
    body.bookix-modal-open .uwy.userway_p6,
    body.bookix-modal-open #INDmenu-btn {
        display: none !important;
        visibility: hidden !important;
    }

    /* And hide the 3 left icons too — the form should be the only
       interactive thing visible. */
    body.bookix-modal-open .social-share-container,
    body.bookix-modal-open .sticky-suggestions-button,
    body.bookix-modal-open .sticky-question-btn {
        display: none !important;
    }
}


/* ==============================================
   24. SEARCH SUGGESTIONS BAR — HEADER SEARCH MODAL
   The "اقتراحات للبحث" header has pill buttons that
   link to product search URLs. On mobile keep them
   in one row with horizontal scroll if too many.
   ============================================== */

@media (max-width: 768px) {

    .modal .search-cat-btn .wp-block-button__link {
        font-size: 12px !important;
        padding: 6px 14px !important;
        white-space: nowrap !important;
    }

    .modal .search-cat-btn .wp-block-button__link img {
        margin-left: 4px !important;
    }
}
