/*
Theme Name:   Xstore child
Theme URI:    https://xstore.8theme.com
Description:  XStore Child Theme for AMS Energy
Author:       8theme
Author URI:   https://www.8theme.com
Template:     xstore
Version:      1.0
Text Domain:  xstore-child
*/

/* ==========================================================================
   1. Clean Mobile Experience - Bottom Navigation Removal
   ========================================================================== */
.et-mobile-panel,
.mobile-panel,
.et-mobile-panel-wrapper {
    display: none !important;
}

/* ==========================================================================
   2. Desktop: Back-to-Top Native Alignment
   ========================================================================== */
@media (min-width: 769px) {
    #ams-mobile-floating-container {
        display: contents !important;
    }
    .ams-floating-whatsapp {
        display: none !important;
    }
}

/* ==========================================================================
   3. Mobile: Coordinated Floating Buttons (WhatsApp Left + Back-to-Top Right)
   ========================================================================== */
@media (max-width: 768px) {
    #ams-mobile-floating-container {
        position: fixed !important;
        bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
        left: 20px !important;
        right: 20px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        pointer-events: none !important;
        z-index: 9999 !important;
    }

    /* Floating WhatsApp Button (Left) */
    .ams-floating-whatsapp {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        min-height: 46px !important;
        border-radius: 50% !important;
        background-color: #25D366 !important;
        color: #FFFFFF !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(37, 211, 102, 0.4) !important;
        pointer-events: auto !important;
        text-decoration: none !important;
        -webkit-tap-highlight-color: transparent;
        transition: opacity 200ms linear, transform 200ms linear, visibility 200ms linear !important;
        opacity: 0;
        visibility: hidden;
        transform: translateY(15px);
    }

    .ams-floating-whatsapp svg {
        display: block !important;
        width: 24px !important;
        height: 24px !important;
        fill: #FFFFFF !important;
    }

    .ams-floating-whatsapp:active,
    .ams-floating-whatsapp:hover {
        background-color: #20BA5A !important;
        transform: scale(1.05) translateY(0) !important;
    }

    /* Scroll Synchronized Appearance for WhatsApp */
    .ams-floating-whatsapp.backIn,
    #ams-mobile-floating-container:has(#back-top.backIn) .ams-floating-whatsapp {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }

    /* Back-to-Top Button (Right) Coordinated inside Flex Container */
    #ams-mobile-floating-container #back-top {
        position: relative !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        top: auto !important;
        margin: 0 !important;
        pointer-events: auto !important;
        width: 46px !important;
        height: 46px !important;
        border-radius: 50% !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
    }
}
/* ==========================================================================
   4. Single Product Page WhatsApp Integrations & Cleanup
   ========================================================================== */

/* Remove Shipping Info tab and associated elements completely */
#tab-title-et_custom_tab_01,
#tab-et_custom_tab_01,
.woocommerce-Tabs-panel--et_custom_tab_01 {
    display: none !important;
}

/* "Have Question? Ask An Expert" WhatsApp CTA (Left Column) */
.ams-ask-expert-wrapper {
    margin: 15px 0 20px 0;
    text-align: center;
}

.ams-ask-expert-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 22px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background-color: #F8FAFC;
    color: #0B3954 !important;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ams-ask-expert-link:hover {
    background-color: #F0FDF4;
    border-color: #25D366;
    color: #071B2C !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.22);
}

.ams-ask-expert-link:active {
    transform: translateY(0);
}

.ams-ask-expert-link .ams-wa-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: #25D366;
    transition: transform 0.2s ease;
}

.ams-ask-expert-link:hover .ams-wa-icon svg {
    transform: scale(1.1);
}

/* "Got Questions? Feel free to Get in touch" WhatsApp Card (Right Column) */
.ams-get-in-touch-wrapper {
    margin: 10px 0 16px 0;
}

.ams-get-in-touch-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 20px;
    background-color: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ams-get-in-touch-box:hover {
    background-color: #F0FDF4;
    border-color: #25D366;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.2);
}

.ams-get-in-touch-box:active {
    transform: translateY(0);
}

.ams-git-main {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #64748B;
    line-height: 1.3;
}

.ams-git-sub {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #1E293B;
    line-height: 1.3;
}

.ams-git-action-word {
    color: #0B3954;
    font-weight: 700;
    transition: color 0.2s ease;
}

.ams-get-in-touch-box:hover .ams-git-action-word {
    color: #20BA5A;
}

.ams-git-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #25D366;
    color: #FFFFFF !important;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ams-get-in-touch-box:hover .ams-git-pill {
    background-color: #20BA5A;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.45);
    transform: scale(1.02);
}

@media (max-width: 480px) {
    .ams-get-in-touch-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .ams-git-pill {
        align-self: flex-start;
    }
}

/* ==========================================================================
   5. Cart, Checkout & Order Confirmation Header Logo Styling
   ========================================================================== */
.cart-checkout-light-header .et_b_header-logo.et_element-top-level img {
    width: 210px !important;
    max-width: 100% !important;
    height: auto !important;
}

@media (max-width: 768px) {
    .cart-checkout-light-header .et_b_header-logo.et_element-top-level img {
        width: 180px !important;
        max-width: 100% !important;
        height: auto !important;
    }
}