/*================================================================
    1. GENERAL & ROOT
================================================================*/

/* ----- Hide Scrollbar ----- */
html {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* Internet Explorer 10+ */
    scroll-behavior: smooth !important;
}

html::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, Edge */
    scroll-behavior: smooth !important;
}

/* ----- Color Palette ----- */
:root {
    --ecoeen-B: #000000 !important;
    --ecoeen-W: #FFFFFF !important;
    --ecoeen-0: #00000000 !important;
    --ecoeen-1: #397D3C !important;
    --ecoeen-2: #F8FBF2 !important;
    --ecoeen-3: #2A482C !important;
    --ecoeen-4: #0B130E !important;
    --ecoeen-5: #FEF1E1 !important;
    --ecoeen-4-60: #0B130E99 !important;
}


/*================================================================
    2. TYPOGRAPHY
================================================================*/

/* ----- General link and price styling ----- */
a,
ins,
span {
    text-decoration: none !important;
}

/* ----- Big Heading ----- */
.ecoeen-big-heading {
    font-family: 'Poppins', sans-serif !important;
    font-size: 48px !important;
    font-weight: 600 !important;
    line-height: 1.2em !important;
}

@media (max-width: 1024px) {
    .ecoeen-big-heading {
        font-size: 40px !important;
    }
}

@media (max-width: 767px) {
    .ecoeen-big-heading {
        font-size: 28px !important;
    }
}

/* ----- Heading ----- */
.ecoeen-heading {
    font-family: 'Poppins', sans-serif !important;
    font-size: 40px !important;
    font-weight: 500 !important;
    line-height: 1.2em !important;
}

@media (max-width: 1024px) {
    .ecoeen-heading {
        font-size: 32px !important;
    }
}

@media (max-width: 767px) {
    .ecoeen-heading {
        font-size: 24px !important;
    }
}

/* ----- Sub Heading ----- */
.ecoeen-sub-heading {
    font-family: 'Poppins', sans-serif !important;
    font-size: 24px !important;
    font-weight: 500 !important;
    line-height: 1.2em !important;
}

@media (max-width: 1024px) {
    .ecoeen-sub-heading {
        font-size: 20px !important;
    }
}

@media (max-width: 767px) {
    .ecoeen-sub-heading {
        font-size: 20px !important;
    }
}

/* ----- Big Text ----- */
.ecoeen-big-TXT {
    font-family: 'Poppins', sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1.4em !important;
}

@media (max-width: 1024px) {
    .ecoeen-big-TXT {
        font-size: 16px !important;
    }
}

@media (max-width: 767px) {
    .ecoeen-big-TXT {
        font-size: 14px !important;
    }
}

/* ----- Standard Text & Product Titles ----- */
.ecoeen-TXT,
.woocommerce-loop-product__title {
    font-family: 'Poppins', sans-serif !important;
    font-size: 16px !important;
    font-weight: 300 !important;
    line-height: 1.4em !important;
}

@media (max-width: 1024px) {
    .ecoeen-TXT,
    .woocommerce-loop-product__title {
        font-size: 14px !important;
    }
}

@media (max-width: 767px) {
    .ecoeen-TXT,
    .woocommerce-loop-product__title {
        font-size: 12px !important;
    }
}


/*================================================================
    3. HEADER & NAVIGATION
================================================================*/

/* ----- Header container styling ----- */
#ecoeen-header-container {
    position: relative;
    width: 100%;
    transition: transform 0.3s ease-in-out;
}

/* ----- Scrolled (sticky) header state ----- */
#ecoeen-header-container.scrolled {
    position: fixed;
    top: 0;
    z-index: 9999;
    width: 100% !important;
}

/* ----- Off-canvas Container ----- */
#offcanvas-panel {
    position: fixed;
    top: 0;
    right: -400px; /* Hidden position */
    width: 400px;
    height: 100vh;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.4s ease;
    z-index: 10001;
    overflow-y: auto;
}

/* Active (visible) state */
#offcanvas-panel.active {
    right: 0;
}

/* ----- Overlay background ----- */
#offcanvas-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
}

#offcanvas-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ----- Mobile Navigation Animation ----- */
@media (max-width: 1024px) {
    /* Base: Initial hidden state */
    .elementskit-menu-container.elementskit-menu-offcanvas-elements {
        transition: all 0.3s ease-in-out !important;
        transform: translateX(100%) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* When menu is open */
    .elementskit-menu-container.elementskit-menu-offcanvas-elements.active {
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Mobile menu overlay (background blur) transition */
    .elementskit-menu-overlay {
        transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* Overlay when active */
    .elementskit-menu-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Fix: prevent menu from being instantly hidden by inline styles */
    .elementskit-menu-container[style*="display: none"] {
        display: block !important;
    }
}


/*================================================================
    4. WOOCOMMERCE
================================================================*/

/* ----- Hide default sale badge ----- */
span.onsale {
    display: none !important;
}

/* ----- Custom sale badge for product loop ----- */
.custom-discount {
    background-color: var(--ecoeen-3) !important;
    color: var(--ecoeen-2) !important;
    padding: 2px 6px !important;
    border-radius: 2px !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    margin-left: 6px !important;
}

/* ----- Product image aspect ratio ----- */
.woocommerce div.product div.images img {
    aspect-ratio: 1/1 !important;
    width: 100% !important;
}

/* ----- Hide long description title on single product page ----- */
.woocommerce-Tabs-panel h2 {
    display: none !important;
}

/* ----- Star review styling for product loops and archives ----- */
.star-rating-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: start !important;
    gap: 0.3em !important;
}

.review-count {
    font-size: 0.9em !important;
    color: #555 !important;
}

.star-rating {
    margin: 0 !important;
}

/* Style for empty stars when there are no reviews */
.star-rating.no-reviews::before {
    color: #03071E !important;
    opacity: 0.6 !important;
}

/* ----- Force modern grid layout for products ----- */
.woocommerce ul.products,
.woocommerce-page ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Reset float and clear rules for product items */
ul.products li.product,
ul.products li.product.first,
ul.products li.product.last,
ul.products li.product:nth-child(n) {
    float: none !important;
    clear: none !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Remove WooCommerce pseudo-element clearfix */
ul.products::before,
ul.products::after {
    display: none !important;
    content: none !important;
}

/* ----- Product grid responsive adjustments ----- */
@media (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ----- Product loop item background and padding ----- */
li.product {
    background: #fff !important;
    padding: 8px !important;
}

/* ----- Hide "View Cart" text after adding a product ----- */
a.added_to_cart.wc-forward {
    display: none;
}

/* ----- Display sale price before regular price ----- */
.price {
    display: flex !important;
}

.price del {
    order: 2;
}

.price ins {
    order: 1;
}

.ecoeen-price-wrapper {
    display: flex;
    justify-content: start;
    align-items: center;
   /* Note: This seems unusual, might need review */
}


/*================================================================
    5. LIVE SEARCH
================================================================*/

.marrto-header-search-box {
    position: relative;
    flex-grow: 1;
    margin: 0px;
    width: 100%;
}

#marrto-live-search-input {
    width: 100%;
    padding: 6px 16px;
    font-size: 16px;
    border: 1px solid #b0b0b0;
    background: transparent;
    border-radius: 50px;
    outline: none;
}

#marrto-live-search-input:hover {
    border: 1px solid #000;
    outline: none;
}

.marrto-search-button {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: none;
    background: var(--ecoeen-1);
    color: white;
    cursor: pointer;
    font-size: 14px;
    line-height: 1em;
    padding: 8px 16px;
    border-radius: 50px;
}

.marrto-search-button:hover {
    background: var(--black);
}

.marrto-live-search-results {
    position: absolute;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 5px 5px;
    background-color: #fff;
    z-index: 1000;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.marrto-live-search-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.marrto-live-search-results ul li {
    border-bottom: 1px solid #eee;
}

.marrto-live-search-results ul li:last-child {
    border-bottom: none;
}

.marrto-live-search-results ul li a {
    display: flex;
    align-items: center;
    padding: 10px;
    color: #333;
    text-decoration: none;
}

.marrto-live-search-results ul li a:hover {
    background-color: #f0f0f0;
}

.marrto-live-search-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 4px;
}

.marrto-live-search-info {
    display: flex;
    flex-direction: column;
}

.marrto-live-search-title {
    font-weight: 600;
    font-size: 16px;
}

.marrto-live-search-price {
    color: var(--red);
    font-size: 14px;
}

.marrto-live-search-sku {
    font-size: 12px;
    color: #777;
}

.marrto-no-results {
    padding: 15px;
    text-align: center;
    color: #777;
}
