/*
Theme Name: Jaymedz
Theme URI: https://github.com/jaymedz/theme
Author: Antigravity
Description: Premium medical solutions theme for Jaymedz. Fully customizable via the WordPress Block Editor (FSE) and fully integrated with WooCommerce.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jaymedz
*/

/* Minimal CSS reset and fallback styles for older browsers.
   Most theme styles are declared in theme.json. */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Custom Slider styling to override Gutenberg layout constraints */
.jaymedz-hero-slider {
    position: relative !important;
    overflow: hidden !important;
    width: 94% !important; /* Keep space from both sides on smaller viewports */
    max-width: 1400px !important; /* Elegant maximum container size */
    margin: 2rem auto !important; /* Center on page with vertical/horizontal space */
    border-radius: 12px !important; /* Premium rounded corners */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02) !important;
    height: 600px !important; /* Steady height for maximum width on desktop */
}

@media (max-width: 1200px) {
    .jaymedz-hero-slider {
        height: 480px !important; /* Comfortable steady height for tablets */
    }
}

@media (max-width: 768px) {
    .jaymedz-hero-slider {
        height: 280px !important; /* Comfortable steady height for mobile devices */
    }
}

.jaymedz-slider-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    height: 100% !important;
}

.jaymedz-slider-wrapper > div,
.jaymedz-slider-wrapper > .wp-block-cover {
    margin: 0 !important;
    max-width: none !important;
    box-sizing: border-box !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    height: 100% !important;
}

.jaymedz-slider-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Keep image cover layout to fill the steady container size */
    object-position: center !important;
    display: block !important;
}
.jaymedz-slider-arrow {
    background: rgba(13, 30, 61, 0.6) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}
.jaymedz-slider-arrow:hover {
    background: #2872fa !important;
}
.jaymedz-slider-dots .dot {
    transition: all 0.3s ease !important;
}

/* Page Layout Alignment Corrections */
.is-layout-constrained > .alignwide {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

.is-layout-constrained > .alignfull {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

/* Hide product descriptions in cart and mini-cart */
.wc-block-cart-items td.wc-block-cart-item__description,
.wc-block-cart-item__description,
.wc-block-components-cart-item__description,
.wc-block-components-cart-item__short-description,
.wc-block-mini-cart-item__description,
.wc-block-components-mini-cart-item__description,
.wc-block-components-mini-cart-item__short-description,
.wc-block-components-cart-item__details {
    display: none !important;
}

/* Stack WooCommerce variations table beautifully */
.variations {
    width: 100% !important;
    border: none !important;
    margin-bottom: 2rem;
}
.variations tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}
.variations td.label {
    padding: 0 0 0.5rem 0 !important;
    font-weight: 700;
    color: var(--wp--preset--color--primary, #1e293b);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}
.variations td.value {
    padding: 0 !important;
}

/* Variation Swatches Styling */
.jaymedz-swatches-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.jaymedz-swatch-button {
    background: #ffffff;
    border: 1px solid var(--wp--preset--color--neutral-light, #e2e8f0);
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--wp--preset--color--primary, #0f172a);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 48px;
    text-align: center;
}

.jaymedz-swatch-button:hover {
    border-color: var(--wp--preset--color--primary, #0f172a);
    background-color: var(--wp--preset--color--neutral-light, #f8fafc);
}

.jaymedz-swatch-button.is-active {
    border-color: var(--wp--preset--color--primary, #0f172a);
    background-color: var(--wp--preset--color--primary, #0f172a);
    color: #ffffff;
}

/* Contact Form Styling */
.jaymedz-contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--wp--preset--color--neutral-light, #e2e8f0);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-top: 1.5rem;
}
.jaymedz-contact-form .form-row {
    display: flex;
    gap: 1.25rem;
}
.jaymedz-contact-form .form-row .form-group {
    flex: 1;
}
.jaymedz-contact-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.jaymedz-contact-form label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--wp--preset--color--primary, #1e293b);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.jaymedz-contact-form input,
.jaymedz-contact-form textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--wp--preset--color--neutral-light, #cbd5e1);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--wp--preset--color--primary, #0f172a);
    transition: all 0.2s ease;
    background: #ffffff;
}
.jaymedz-contact-form input:focus,
.jaymedz-contact-form textarea:focus {
    outline: none;
    border-color: var(--wp--preset--color--accent, #2872fa);
    box-shadow: 0 0 0 3px rgba(40, 114, 250, 0.15);
}
.jaymedz-contact-form .form-submit-btn {
    background: var(--wp--preset--color--accent, #2872fa);
    color: #ffffff;
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    align-self: flex-start;
}
.jaymedz-contact-form .form-submit-btn:hover {
    background: var(--wp--preset--color--primary, #1a365d);
    transform: translateY(-1px);
}
@media (max-width: 768px) {
    .jaymedz-contact-form .form-row {
        flex-direction: column;
        gap: 1.25rem;
    }
}

/* Footer logo styling: rounded corners, fit, white card background */
.jaymedz-footer-logo img,
footer.wp-block-group img[src*="footer-logo"] {
    width: 180px !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    padding: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

/* Brand Palette Button & Link Overrides (#000000 Accent Black) */
.wp-block-button__link,
.elementor-button,
a.button,
button.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.wc-block-components-button,
.wp-block-read-more {
    background-color: #000000 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
    border: none !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-decoration: none !important;
}

.wp-block-button__link:hover,
.elementor-button:hover,
a.button:hover,
button.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.wc-block-components-button:hover,
.wp-block-read-more:hover {
    background-color: #0F2C59 !important;
    color: #ffffff !important;
}

/* Custom interactive buttons for Hero Banner and Category Grid */
.jaymedz-hero-btn {
    background-color: #000000 !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 1rem 2.25rem !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    display: inline-block !important;
    font-size: 1.05rem !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15) !important;
}
.jaymedz-hero-btn:hover {
    background-color: #0F2C59 !important;
    color: #FFFFFF !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 15px -3px rgba(15, 44, 89, 0.25) !important;
}

.jaymedz-hero-secondary-btn {
    background-color: #FFFFFF !important;
    color: #0F2C59 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 1rem 2.25rem !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    display: inline-block !important;
    font-size: 1.05rem !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid #0F2C59 !important;
}
.jaymedz-hero-secondary-btn:hover {
    background-color: #0F2C59 !important;
    color: #FFFFFF !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 15px -3px rgba(15, 44, 89, 0.2) !important;
}

.jaymedz-cat-btn {
    background-color: #000000 !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    padding: 0.75rem 1.75rem !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-block !important;
    border: none !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15) !important;
}
.jaymedz-cat-btn:hover {
    background-color: #0F2C59 !important;
    color: #FFFFFF !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 15px -3px rgba(15, 44, 89, 0.25) !important;
}

/* Image Carousel Slide Constraints for professional horizontal banners */
.elementor-widget-image-carousel .swiper-slide-image {
    width: 100% !important;
    height: 500px !important;
    object-fit: cover !important;
    object-position: center !important;
}

@media (max-width: 991px) {
    .elementor-widget-image-carousel .swiper-slide-image {
        height: 400px !important;
    }
}

@media (max-width: 767px) {
    .elementor-widget-image-carousel .swiper-slide-image {
        height: 280px !important;
    }
}

/* Explore Categories Responsive Grid (Enforce 1 Row on Desktop) */
.jaymedz-cat-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    width: 100% !important;
}

@media (min-width: 576px) {
    .jaymedz-cat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 992px) {
    .jaymedz-cat-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Header Navigation Menu Hover Effect */
.wp-block-navigation .wp-block-navigation-item__content {
    color: #475569 !important; /* Elegant slate grey by default */
    font-weight: 600 !important;
    position: relative !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    display: inline-block !important;
    padding: 0.5rem 0 !important;
}

.wp-block-navigation .wp-block-navigation-item__content:hover {
    color: #0F2C59 !important; /* Deep brand navy on hover */
}

/* Premium sliding underline effect */
.wp-block-navigation .wp-block-navigation-item__content::after {
    content: '' !important;
    position: absolute !important;
    width: 100% !important;
    height: 2px !important;
    bottom: 0 !important;
    left: 0 !important;
    background-color: #0F2C59 !important;
    transform: scaleX(0) !important;
    transform-origin: bottom right !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.wp-block-navigation .wp-block-navigation-item__content:hover::after {
    transform: scaleX(1) !important;
    transform-origin: bottom left !important;
}

/* Sleek Centered Buy Now Button for WooCommerce Product Grid */
.woocommerce ul.products li.product .button {
    display: block !important;
    width: fit-content !important;
    min-width: 140px !important;
    max-width: 180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 1rem !important;
    padding: 0.6rem 1.5rem !important;
    background-color: #000000 !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    letter-spacing: 0.05em !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-align: center !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.woocommerce ul.products li.product .button:hover {
    background-color: #0F2C59 !important;
    color: #FFFFFF !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(15, 44, 89, 0.2) !important;
}

/* Enforce uniform title height on homepage grid to align buttons */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    min-height: 2.8rem !important;
    display: block !important;
}

/* Category Grid Card Styling */
.wp-block-post-template > li {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.wp-block-post-template > li:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02) !important;
}

/* Category Page Buy Now Button Styling & Centering */
.wp-block-post-template a.wp-block-read-more {
    display: block !important;
    width: fit-content !important;
    min-width: 140px !important;
    max-width: 180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 1.25rem !important;
    margin-bottom: 1.5rem !important;
    padding: 0.6rem 1.5rem !important;
    background-color: #000000 !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    letter-spacing: 0.05em !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-align: center !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.wp-block-post-template a.wp-block-read-more:hover {
    background-color: #0F2C59 !important;
    color: #FFFFFF !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(15, 44, 89, 0.2) !important;
}

/* Category Page Title Height Equalization & Full Width Wrapping */
.wp-block-post-template h2.wp-block-post-title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #0F2C59 !important;
    margin: 0.5rem 0 !important;
    min-height: 2.8rem !important;
    line-height: 1.4 !important;
    display: block !important;
    width: 100% !important;
    text-align: left !important;
}

.wp-block-post-template h2.wp-block-post-title a {
    color: #0F2C59 !important;
    text-decoration: none !important;
    display: block !important;
    width: 100% !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

/* Category Page Price Alignment */
.wp-block-post-template .wp-block-woocommerce-product-price {
    margin-bottom: 0.5rem !important;
    font-size: 1rem !important;
    color: #475569 !important;
    font-weight: 600 !important;
    display: block !important;
    width: 100% !important;
}

/* Force exactly 3 columns inside the 75% width shop grid */
@media (min-width: 768px) {
    .wp-block-post-template.columns-3 {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.5rem !important;
    }
    .wp-block-post-template.columns-3 > li {
        width: 100% !important;
        margin: 0 !important;
    }
}

/* Custom Color Filter Widget styling */
.jaymedz-color-filter-widget {
    margin-top: 0.5rem !important;
}

.jaymedz-filter-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 1.5rem 0 !important;
}

.jaymedz-filter-item {
    margin-bottom: 0.85rem !important;
    list-style: none !important;
}

.jaymedz-filter-label {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: #475569 !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
    line-height: 1.2 !important;
}

.jaymedz-filter-label:hover {
    color: #0F2C59 !important;
}

.jaymedz-filter-label.active {
    color: #0F2C59 !important;
    font-weight: 700 !important;
}

.jaymedz-filter-checkbox {
    margin: 0 0.75rem 0 0 !important;
    accent-color: #0F2C59 !important;
    width: 16px !important;
    height: 16px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

.color-preview-dot {
    display: inline-block !important;
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    margin-right: 0.75rem !important;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15) !important;
    flex-shrink: 0 !important;
}

.color-title {
    flex-grow: 1 !important;
}

.color-product-count {
    color: #94A3B8 !important;
    font-size: 0.85rem !important;
    margin-left: 0.5rem !important;
}

/* Clear Filters Button */
.jaymedz-clear-filters-btn {
    display: block !important;
    background-color: #F1F5F9 !important;
    color: #475569 !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    letter-spacing: 0.05em !important;
    border: 1px solid #E2E8F0 !important;
}

.jaymedz-clear-filters-btn:hover {
    background-color: #0F2C59 !important;
    color: #FFFFFF !important;
    border-color: #0F2C59 !important;
}

/* Footer Quick Links styling override */
footer.wp-block-group .wp-block-navigation a.wp-block-navigation-item__content {
    color: #94A3B8 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    display: inline-block !important;
    padding: 0.25rem 0 !important;
}

footer.wp-block-group .wp-block-navigation a.wp-block-navigation-item__content:hover {
    color: #FFFFFF !important;
}

/* Spacing and Breathing Room Overrides for Homepage Sections */
.elementor-section {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

/* Exclude Hero Slider from top/bottom paddings to stay flush */
.jaymedz-hero-slider {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 4rem !important;
}

/* Value Propositions Section spacing */
.elementor-section:nth-of-type(2) {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

/* Categories Header Section spacing */
.elementor-section:nth-of-type(4) {
    padding-top: 5rem !important;
    padding-bottom: 1.5rem !important;
}

/* Categories Grid Section container padding & margin spacing */
.jaymedz-cat-section-container {
    padding-top: 0 !important;
    padding-bottom: 5rem !important;
    margin-bottom: 4rem !important;
}

/* Force a beautiful gap between native Elementor columns without wrapping */
.jaymedz-cat-section-container > .elementor-container {
    display: flex !important;
    gap: 1.5rem !important;
    flex-wrap: nowrap !important;
}

/* Style native Elementor category grid columns to match earlier premium design */
.jaymedz-cat-section-container .jaymedz-cat-card-el {
    width: calc(25% - 1.125rem) !important; /* Total width minus gaps divided by 4 */
    flex: 0 0 calc(25% - 1.125rem) !important;
    height: 260px !important;
    min-height: 260px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
}

.jaymedz-cat-section-container .jaymedz-cat-card-el:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 20px 25px -5px rgba(15, 44, 89, 0.2), 0 10px 10px -5px rgba(15, 44, 89, 0.1) !important;
}

/* Force Elementor widget wrapper inside column to center layout elements */
.jaymedz-cat-section-container .jaymedz-cat-card-el > .elementor-widget-wrap {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding: 2rem !important;
    box-sizing: border-box !important;
    gap: 1.25rem !important; /* Space between title and button */
}

/* Reset default elementor margins on category titles */
.jaymedz-cat-section-container .jaymedz-cat-card-el h3.elementor-heading-title {
    color: #FFFFFF !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Style the button inside native elementor category column */
.jaymedz-cat-section-container .jaymedz-cat-card-el .jaymedz-cat-btn {
    margin: 0 !important;
}

/* Responsive category grid styling */
@media (max-width: 991px) {
    .jaymedz-cat-section-container > .elementor-container {
        flex-wrap: wrap !important;
        gap: 1.5rem !important;
    }
    .jaymedz-cat-section-container .jaymedz-cat-card-el {
        width: calc(50% - 0.75rem) !important; /* 2 Columns per row on tablet */
        flex: 0 0 calc(50% - 0.75rem) !important;
    }
}

@media (max-width: 767px) {
    .jaymedz-cat-section-container > .elementor-container {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    .jaymedz-cat-section-container .jaymedz-cat-card-el {
        width: 100% !important; /* 1 Column per row on mobile */
        flex: 0 0 100% !important;
    }
}

/* WhatsApp button animations */
.jaymedz-whatsapp-btn:hover {
    background-color: #20ba5a !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4) !important;
}

.jaymedz-whatsapp-btn:active {
    transform: translateY(-1px) !important;
}

/* ==========================================================================
   MOBILE NAVIGATION MENU STYLING
   ========================================================================== */

/* Styling for the mobile slide-out menu when open */
.wp-block-navigation__responsive-container.is-menu-open {
    background-color: #ffffff !important;
    color: #0F2C59 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 999999 !important;
}

/* Force container list to align elements in a centered column layout */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    gap: 1.75rem !important; /* Spacious layout for easy tapping */
    margin: 0 auto !important;
    padding: 0 !important;
}

/* Style the navigation links in open mobile modal */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    font-size: 1.6rem !important; /* Large, readable text */
    font-weight: 700 !important;
    color: #0F2C59 !important; /* Deep brand navy color */
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    padding: 0.5rem 0 !important;
    display: inline-block !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
    color: #E55807 !important; /* Highlight orange on hover */
    transform: scale(1.05) !important;
}

/* Position and style the mobile close button */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
    position: absolute !important;
    top: 2rem !important;
    right: 2rem !important;
    color: #0F2C59 !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close svg {
    width: 32px !important;
    height: 32px !important;
}

/* ==========================================================================
   MOBILE HEADER ACTION ALIGNMENT (LOGO LEFT, CART & MENU RIGHT)
   ========================================================================== */
@media (max-width: 767px) {
    /* Prevent the main header container from wrapping */
    header.wp-block-group .wp-block-group.alignwide {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding-left: 0.75rem !important; /* Reduced padding */
        padding-right: 0.75rem !important;
    }

    /* Force the actions group (Navigation hamburger + WooCommerce Mini-Cart) onto a single row */
    header.wp-block-group .wp-block-group.alignwide > div:last-child {
        display: flex !important;
        flex-direction: row-reverse !important; /* Positions shopping cart on the left of the hamburger */
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 1rem !important; /* Clean tap spacing between icons */
        margin: 0 !important;
        flex-grow: 1 !important;
        justify-content: flex-end !important;
    }

    /* Hide the cart price text on mobile to save valuable header space */
    header.wp-block-group .wp-block-group.alignwide .wc-block-mini-cart__amount {
        display: none !important;
    }

    /* Scale down the logo on mobile view */
    header.wp-block-group .wp-block-group.alignwide > div:first-child img {
        width: 110px !important;
        height: auto !important;
    }

    /* Reset spacing on blocks to ensure alignment */
    header.wp-block-group .wp-block-group.alignwide .wc-block-mini-cart {
        margin: 0 !important;
    }

    header.wp-block-group .wp-block-group.alignwide .wp-block-navigation {
        margin: 0 !important;
        display: inline-flex !important;
    }

    /* Force the hamburger toggle button to render correctly and be visible */
    header.wp-block-group .wp-block-group.alignwide .wp-block-navigation button.wp-block-navigation__responsive-container-open {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: #0F2C59 !important; /* Brand navy color */
        background: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        cursor: pointer !important;
        width: 32px !important;
        height: 32px !important;
        justify-content: center !important;
        align-items: center !important;
    }

    header.wp-block-group .wp-block-group.alignwide .wp-block-navigation button.wp-block-navigation__responsive-container-open svg {
        fill: currentColor !important;
        stroke: currentColor !important;
        width: 28px !important;
        height: 28px !important;
        display: block !important;
    }

    /* Prevent the logo card container from shrinking */
    header.wp-block-group .wp-block-group.alignwide > div:first-child {
        flex-shrink: 0 !important;
        margin-right: 1rem !important;
    }
}

/* ==========================================================================
   WOOCOMMERCE TWO-COLUMN PRODUCT GRID ON MOBILE
   ========================================================================== */
@media (max-width: 767px) {
    /* Set products list to a flexbox wrap grid with high specificity */
    .woocommerce ul.products[class*="columns-"],
    .woocommerce-page ul.products[class*="columns-"],
    .woocommerce ul.products,
    .woocommerce-page ul.products {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 1rem !important; /* Space between products */
        margin: 0 auto !important;
        padding: 0 !important;
    }

    /* Force each product card to take exactly half the width minus the gap with high specificity */
    .woocommerce ul.products[class*="columns-"] li.product,
    .woocommerce-page ul.products[class*="columns-"] li.product,
    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product {
        width: calc(50% - 0.5rem) !important;
        flex: 0 0 calc(50% - 0.5rem) !important;
        max-width: calc(50% - 0.5rem) !important;
        margin: 0 0 1.5rem 0 !important; /* Row spacing */
        clear: none !important;
        float: none !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Resize the Buy Now button to fit the smaller cards */
    .woocommerce ul.products[class*="columns-"] li.product .button,
    .woocommerce-page ul.products[class*="columns-"] li.product .button,
    .woocommerce ul.products li.product .button,
    .woocommerce-page ul.products li.product .button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 0.5rem 0.5rem !important;
        font-size: 0.75rem !important;
        margin-top: auto !important; /* Pushes button to bottom */
    }

    /* Scale down spacing and typography on mobile cards */
    .woocommerce ul.products[class*="columns-"] li.product img,
    .woocommerce-page ul.products[class*="columns-"] li.product img,
    .woocommerce ul.products li.product img,
    .woocommerce-page ul.products li.product img {
        margin-bottom: 0.5rem !important;
    }

    .woocommerce ul.products[class*="columns-"] li.product .woocommerce-loop-product__title,
    .woocommerce-page ul.products[class*="columns-"] li.product .woocommerce-loop-product__title,
    .woocommerce ul.products li.product .woocommerce-loop-product__title,
    .woocommerce-page ul.products li.product .woocommerce-loop-product__title {
        font-size: 0.95rem !important;
        margin-bottom: 0.25rem !important;
        line-height: 1.3 !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
    }

    .woocommerce ul.products[class*="columns-"] li.product .price,
    .woocommerce-page ul.products[class*="columns-"] li.product .price,
    .woocommerce ul.products li.product .price,
    .woocommerce-page ul.products li.product .price {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
        display: block !important;
    }
}

/* ==========================================================================
   TABLET HEADER LAYOUT OVERRIDES (LOGO LEFT, CART RIGHT, NAV CENTER BELOW)
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Set relative position on the header container */
    header.wp-block-group .wp-block-group.alignwide {
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; /* Center the navigation menu */
        gap: 1.5rem !important;
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    /* Logo stays top-left */
    header.wp-block-group .wp-block-group.alignwide > div:first-child {
        align-self: flex-start !important;
    }

    /* Container for Navigation + Cart */
    header.wp-block-group .wp-block-group.alignwide > div:last-child {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin: 0 !important;
    }

    /* Position the Mini-Cart absolutely at the top-right (parallel to logo) */
    header.wp-block-group .wp-block-group.alignwide .wc-block-mini-cart {
        position: absolute !important;
        top: 1rem !important;
        right: 1.5rem !important;
        margin: 0 !important;
        z-index: 10 !important;
    }

    /* Navigation centered in the second row */
    header.wp-block-group .wp-block-group.alignwide .wp-block-navigation {
        width: 100% !important;
        justify-content: center !important;
        margin: 0 auto !important;
    }
}

/* ==========================================================================
   WOOCOMMERCE PRODUCT CARD ALIGNMENT (TABLET & MOBILE)
   ========================================================================== */
/* ==========================================================================
   GLOBAL PRODUCT CARD FLEXBOX ALIGNMENT (DESKTOP, TABLET, MOBILE)
   ========================================================================== */

/* Force all legacy WooCommerce lists and cards to behave as flex columns */
.woocommerce ul.products,
.woocommerce-page ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    height: 100% !important; /* Force cards to take equal height in grid rows */
}

/* Force Buy Now buttons to the absolute bottom of WooCommerce loop cards */
.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button {
    margin-top: auto !important; /* Flexbox trick: pushes item to bottom */
}

/* Force all Gutenberg Query Loop listings and cards to behave as flex columns */
ul.wp-block-post-template.is-flex-container {
    display: flex !important;
    flex-wrap: wrap !important;
}

ul.wp-block-post-template.is-flex-container > li {
    box-sizing: border-box !important;
}

ul.wp-block-post-template.is-flex-container > li > div.wp-block-group {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
}

/* Force Buy Now / Read-More buttons to the absolute bottom of Gutenberg loops */
ul.wp-block-post-template.is-flex-container > li .wp-block-read-more {
    margin-top: auto !important; /* Flexbox trick: pushes item to bottom */
}

/* ==========================================================================
   TABLET & MOBILE STYLING OVERRIDES (REMOVED LINE CLAMPING)
   ========================================================================== */
@media (max-width: 1024px) {
    /* Title styling on mobile/tablet (allowing full title wrap without limits) */
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
        margin-top: 0.75rem !important;
        margin-bottom: 0.5rem !important;
        text-align: center !important;
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        word-wrap: break-word !important;
        -webkit-line-clamp: none !important;
    }

    /* Center price and add bottom spacing */
    .woocommerce ul.products li.product .price {
        text-align: center !important;
        margin-top: 0.25rem !important;
        margin-bottom: 1rem !important;
        display: block !important;
    }

    /* Style button for tablet/mobile viewports */
    .woocommerce ul.products li.product .button {
        margin-bottom: 0 !important;
        display: block !important;
        width: 90% !important;
        max-width: 160px !important;
        min-width: 0 !important;
        text-align: center !important;
        padding: 0.6rem 0.5rem !important;
        font-size: 0.8rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* ==========================================================================
   WOOCOMMERCE GRID CLEARING FIX (MOBILE 2-COLUMN LAYOUT)
   ========================================================================== */
@media (max-width: 767px) {
    .woocommerce ul.products[class*="columns-"] li.product,
    .woocommerce-page ul.products[class*="columns-"] li.product,
    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product {
        clear: none !important;
    }

    .woocommerce ul.products li.product:nth-of-type(2n+1),
    .woocommerce-page ul.products li.product:nth-of-type(2n+1) {
        clear: both !important;
    }
}

/* ==========================================================================
   GLOBAL MOBILE VIEWPORT OVERFLOW CONSTRAINTS
   ========================================================================== */
html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.wp-site-layout,
main,
.elementor,
.entry-content,
#content {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.woocommerce ul.products,
.woocommerce-page ul.products {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ==========================================================================
   GUTENBERG QUERY LOOP POST TEMPLATE RESPONSIVE GRIDS (SHOP/CATEGORY PAGES)
   ========================================================================== */

/* --- Mobile View (Screens under 768px) --- */
@media (max-width: 767px) {
    ul.wp-block-post-template.is-flex-container {
        display: flex !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
        gap: 1rem !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    ul.wp-block-post-template.is-flex-container > li {
        width: calc(50% - 0.5rem) !important;
        flex: 0 0 calc(50% - 0.5rem) !important;
        margin: 0 0 1.5rem 0 !important;
        box-sizing: border-box !important;
    }

    ul.wp-block-post-template.is-flex-container > li .wp-block-post-featured-image {
        margin: 0 0 0.5rem 0 !important;
    }

    /* Title size and wraps fully on mobile category pages */
    ul.wp-block-post-template.is-flex-container > li .wp-block-post-title,
    ul.wp-block-post-template.is-flex-container > li .wp-block-post-title a {
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
        margin-top: 0 !important;
        margin-bottom: 0.5rem !important;
        text-align: center !important;
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        word-wrap: break-word !important;
        -webkit-line-clamp: none !important;
        text-decoration: none !important;
    }

    ul.wp-block-post-template.is-flex-container > li .wc-block-components-product-price {
        font-size: 0.9rem !important;
        text-align: center !important;
        margin-top: 0.25rem !important;
        margin-bottom: 1rem !important;
        display: block !important;
    }

    ul.wp-block-post-template.is-flex-container > li .wp-block-read-more {
        width: 100% !important;
        display: block !important;
        text-align: center !important;
        padding: 0.6rem 0.5rem !important;
        font-size: 0.8rem !important;
        border-radius: 4px !important;
        box-sizing: border-box !important;
    }
}

/* --- Tablet View (Screens 768px to 1024px) --- */
@media (min-width: 768px) and (max-width: 1024px) {
    ul.wp-block-post-template.is-flex-container {
        display: flex !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
        gap: 1.25rem !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    ul.wp-block-post-template.is-flex-container > li {
        width: calc(33.333% - 0.85rem) !important;
        flex: 0 0 calc(33.333% - 0.85rem) !important;
        margin: 0 0 1.5rem 0 !important;
        box-sizing: border-box !important;
    }

    /* Wrap titles fully on tablet category pages */
    ul.wp-block-post-template.is-flex-container > li .wp-block-post-title,
    ul.wp-block-post-template.is-flex-container > li .wp-block-post-title a {
        display: block !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        word-wrap: break-word !important;
        -webkit-line-clamp: none !important;
    }
}
