/* Techwave storefront fixes — 27 Oct 2026 */

/* Page scrolling. common.css sets html,body{height:100%;overflow-x:hidden}, which makes <body> its own
   scroll box: the window never scrolls, so "View More Info", the Specification/Description/Reviews
   tabs and the on-scroll sticky header did nothing. Keep the "no sideways scroll" safety net on <html>
   and let the window scroll normally. */
html, body { height: auto; min-height: 100%; }
html { overflow-x: hidden; }
body { overflow-x: hidden; overflow-x: clip; overflow-y: visible; }

/* Product page ad (Admin > Design > Ads, position "Product Page") */
.tw-pd-ad:empty { display: none; }
.tw-pd-ad { margin-top: 14px; }
.tw-pd-ad img { display: block; width: 100%; height: auto; border-radius: 10px; }

/* Popup ad (position "Popup") */
.popup.tw-ad-popup { background: rgba(0, 0, 0, .55); text-align: center; z-index: 10000; }
.popup.tw-ad-popup .popup-inner { background: transparent; padding: 0; max-width: min(92vw, 720px); }
.popup.tw-ad-popup .popup-inner img { display: block; max-width: 100%; max-height: 82vh; height: auto; border-radius: 10px; margin: 0 auto; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }

/* Success messages were printed with the red error style; give them a green look */
.alert.alert-success { margin: 0 auto 20px; text-align: center; background: #1f8f4e; color: #fff; border-radius: 5px; border: none; }
.alert.alert-success span, .alert.alert-success a { color: #fff; }

/* Reward points box (cart + checkout) */
.tw-cart-reward { margin-top: 14px; }
.tw-reward-box .tw-reward-title { display: block; font-weight: 600; margin-bottom: 6px; }
.tw-reward-box .help-block, #reward .help-block { margin: 4px 0 0; font-size: 12px; color: #667; }

/* Order success page (old icons pointed to a theme folder that does not exist) */
.order-success .tw-success-icon { display: block; font-size: 64px; color: #1f9d55; margin: 0 auto 6px; }
.order-success .tw-step-icon { display: block; font-size: 40px; color: #0a2a8c; margin-bottom: 8px; }
.order-success .tw-order-summary { max-width: 460px; margin: 12px auto 16px; border: 1px solid #e6e8ef; border-radius: 10px; padding: 8px 16px; text-align: left; background: #fafbff; }
.order-success .tw-order-line { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px dashed #e3e6ee; font-size: 14px; }
.order-success .tw-order-line:last-child { border-bottom: 0; }
.order-success .tw-order-total { font-size: 15px; color: #0a2a8c; }

/* Checkout side panel icons (old images were missing on the server) */
.all-pay-info .tw-pay-icon { display: block; font-size: 30px; color: #0a2a8c; margin: 0 auto 4px; }
.all-pay-info .tw-pay-logo { height: 26px; width: auto; }

/* Main menu "More" entry (holds categories that do not fit on one line) */
.mainmenu-bar .nav .responsive-menu > li.tw-more > a::after { content: " \25BE"; font-size: 11px; }
.mainmenu-bar .nav .responsive-menu > li.tw-more > .drop-menu-1 { max-height: 70vh; overflow: visible; }

/* 29 Oct 2026: floating contact button (Messenger / WhatsApp / Call), restored from the Sep build */
.tw-chat-widget {
    position: fixed;
    right: 24px;
    bottom: 120px;
    z-index: 99998;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none;
}

.tw-chat-widget * {
    box-sizing: border-box;
}

.tw-chat-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(18px) scale(.92);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.tw-chat-widget.active .tw-chat-actions {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.tw-chat-action,
.tw-chat-trigger {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #fff;
    box-shadow: 0 12px 24px rgba(13, 33, 65, .24);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.tw-chat-action:hover,
.tw-chat-action:focus,
.tw-chat-trigger:hover,
.tw-chat-trigger:focus {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(13, 33, 65, .3);
    outline: none;
}

.tw-chat-action svg {
    width: 39px;
    height: 39px;
    fill: #fff;
}

.tw-chat-messenger,
.tw-chat-trigger {
    background: #1d8cf0;
}

.tw-chat-whatsapp {
    background: #20d267;
}

.tw-chat-phone {
    background: #13c6d7;
}

.tw-chat-phone .material-symbols-outlined,
.tw-chat-trigger .material-symbols-outlined {
    color: #fff;
    font-size: 36px;
    line-height: 1;
}

.tw-chat-trigger {
    position: relative;
    padding: 0;
    border: none;
    background: #ad9273;
    cursor: pointer;
    pointer-events: auto;
}

.tw-chat-widget.active .tw-chat-trigger {
    background: #1d8cf0;
    border: 4px solid #fff;
}

.tw-trigger-close {
    display: none !important;
}

.tw-chat-widget.active .tw-trigger-chat {
    display: none !important;
}

.tw-chat-widget.active .tw-trigger-close {
    display: inline-flex !important;
}

.tw-support-img {
    position: absolute;
    top: -24px;
    left: 50%;
    width: 96px;
    height: 38px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.tw-chat-widget.active .tw-support-img {
    display: none;
}

.tw-chat-avatar {
    width: 36px;
    height: 36px;
    margin-left: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: 0 6px 14px rgba(13, 33, 65, .22);
}

.tw-chat-avatar:first-child {
    margin-left: 0;
}

.tw-chat-avatar-one {
    background: #0a2a8c;
}

.tw-chat-avatar-two {
    background: #e5651d;
}

.tw-chat-avatar-three {
    background: #718096;
}

.tw-status-dot {
    position: absolute;
    top: 0;
    right: 3px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #20d267;
}

@media (max-width: 767px) {
    .tw-chat-widget {
        right: 14px;
        bottom: 152px;
        gap: 10px;
    }

    .tw-chat-action,
    .tw-chat-trigger {
        width: 64px;
        height: 64px;
        border-width: 3px;
    }

    .tw-chat-widget.active .tw-chat-trigger {
        border-width: 3px;
    }

    .tw-chat-action svg {
        width: 32px;
        height: 32px;
    }

    .tw-chat-phone .material-symbols-outlined,
    .tw-chat-trigger .material-symbols-outlined {
        font-size: 31px;
    }

    .tw-support-img {
        top: -22px;
        width: 84px;
    }

    .tw-chat-avatar {
        width: 31px;
        height: 31px;
        font-size: 10px;
    }
}

/* Brand page search box */
.tw-brand-page-search { margin: 6px 0 18px; }
.tw-brand-page-search .tw-brands-search { max-width: 420px; width: 100%; min-width: 0; }
.tw-brand-page-empty { text-align: center; color: #667; margin: 10px 0 30px; }
