 /* ==========================================================================
   Millat Mart - Footer Stylesheet
   File: /assets/css/footer.css
   Loaded on every page via includes/header.php. Also covers the floating
   chatbot widget, since includes/chatbot-widget.php is pulled in site-wide
   from includes/footer.php.

   Contents:
      1. Value Proposition Banner
      2. Back to Top Bar
      3. Main Footer (columns, middle branding/payments bar, bottom bar)
      4. Mobile Footer & Responsive Layout Overrides
      5. Floating Chat Assistant Widget
      5b. Floating WhatsApp Sales Button
      6. Floating "REVIEWS" Vertical Tab + Modal
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Value Proposition Banner
   -------------------------------------------------------------------------- */
.value-props-banner {
    background-color: #ffffff;
    border-top: 1px solid #e7e7e7;
    border-bottom: 1px solid #e7e7e7;
    padding: 20px 0;
}

.value-prop-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.value-prop-icon {
    width: 48px;
    height: 48px;
    background-color: #eafaf0;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   2. Back to Top Button Bar
   -------------------------------------------------------------------------- */
.back-to-top-bar {
    background-color: #1a6b3c;
    color: #ffffff;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.back-to-top-bar:hover {
    background-color: #217a45;
}

/* --------------------------------------------------------------------------
   3. Main Footer Container
   -------------------------------------------------------------------------- */
.main-footer {
    background-color: var(--secondary-color);
    color: #ffffff;
    padding: 40px 0 20px 0;
    font-size: 13px;
}

.main-footer h6 {
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 15px;
}

.main-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-footer ul li {
    margin-bottom: 8px;
}

.main-footer ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.main-footer ul li a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Footer Middle Branding & Payments Bar */
.footer-middle-bar {
    background-color: var(--primary-color);
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    color: #ffffff;
}

.site-logo-img-footer {
    height: 42px;
}

.payment-badge {
    background-color: #ffffff;
    color: #14211a;
    font-weight: 700;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

/* Bottom Copyright Bar */
.footer-bottom-bar {
    background-color: var(--footer-bottom-bg);
    color: var(--text-muted);
    font-size: 12px;
    padding: 15px 0;
}

.footer-bottom-bar a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s ease;
}

.footer-bottom-bar a:hover {
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   4. Responsive Overrides - Full Mobile Footer Layout
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    /* Ensure all sections of the footer display fully and cleanly on mobile */
    .value-props-banner,
    #backToTop,
    .main-footer,
    .footer-bottom-bar {
        display: block !important;
    }

    /* Keep the middle bar in standard document flow instead of fixed positioning */
    .footer-middle-bar {
        position: static !important;
        box-shadow: none;
        transform: none;
        will-change: auto;
        padding: 20px 0;
    }

    /* Reset global mobile body padding adjustments */
    body {
        padding-bottom: 0 !important;
    }

    /* Stack main footer columns cleanly to full width on mobile screens */
    .main-footer .col-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 24px;
    }

    .main-footer .col-6:last-child {
        margin-bottom: 0;
    }

    /* Arrange value proposition items in a clean 2x2 grid on mobile */
    .value-props-banner .col-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    /* Center and stack middle bar branding and payment badges nicely */
    .footer-middle-bar .d-flex {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
        gap: 15px !important;
    }

    .footer-middle-bar .text {
        display: inline !important;
    }

    .footer-middle-bar .payment-badge {
        font-size: 10px !important;
        padding: 5px 8px !important;
    }
}

/* --------------------------------------------------------------------------
   5. Floating Chat Assistant Widget
   (includes/chatbot-widget.php is required site-wide from includes/footer.php)
   -------------------------------------------------------------------------- */
.millat-chatbot {
    position: fixed;
    right: 20px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    z-index: 1080;
    font-family: inherit;
    transform: translateZ(0);
    will-change: transform;
}

.chatbot-toggle-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    font-size: 1.4rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease;
}
.chatbot-toggle-btn:hover {
    transform: scale(1.06);
}

.chatbot-toggle-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2ecc71;
    border: 2px solid #ffffff;
}

.chatbot-panel {
    position: absolute;
    right: 0;
    bottom: 74px;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 480px;
    max-height: 70vh;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.millat-chatbot.chatbot-open .chatbot-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chatbot-panel-header {
    background: var(--primary-color);
    color: #ffffff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chatbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-yellow);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.chatbot-status {
    color: rgba(255,255,255,0.75);
    font-size: 0.72rem;
}
.chatbot-status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2ecc71;
    margin-right: 4px;
}

.chatbot-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    opacity: 0.8;
    font-size: 0.9rem;
    cursor: pointer;
    flex-shrink: 0;
}
.chatbot-close-btn:hover {
    opacity: 1;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f7f8fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chatbot-msg {
    max-width: 85%;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 0.86rem;
    line-height: 1.4;
    word-wrap: break-word;
}
.chatbot-msg a {
    color: inherit;
    text-decoration: underline;
}

.chatbot-msg-bot {
    background: #ffffff;
    border: 1px solid #e3e6e6;
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chatbot-msg-user {
    background: var(--primary-color);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: -2px;
}

.chatbot-chip {
    background: #ffffff;
    border: 1px solid var(--accent-yellow);
    color: var(--text-color);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}
.chatbot-chip:hover {
    background: var(--accent-yellow);
}

.chatbot-typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 12px 14px;
}
.chatbot-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a6b2c2;
    animation: chatbotBlink 1.2s infinite ease-in-out;
}
.chatbot-typing span:nth-child(2) { animation-delay: 0.15s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatbotBlink {
    0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-2px); }
}

.chatbot-products {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chatbot-product-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e3e6e6;
    border-radius: 12px;
    padding: 8px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease;
}
.chatbot-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.chatbot-product-card img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 8px;
    background: #f7f8fa;
    flex-shrink: 0;
}
.chatbot-product-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.25;
}
.chatbot-product-price {
    font-size: 0.78rem;
    font-weight: 700;
    color: #15803d;
}

.chatbot-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #e3e6e6;
    background: #ffffff;
    flex-shrink: 0;
}

.chatbot-input {
    flex: 1;
    border: 1px solid #d9dce1;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 0.85rem;
    outline: none;
}
.chatbot-input:focus {
    border-color: var(--accent-yellow);
}

.chatbot-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.chatbot-send-btn:hover {
    background: var(--secondary-color);
}

@media (max-width: 480px) {
    .millat-chatbot {
        right: 12px;
        bottom: calc(148px + env(safe-area-inset-bottom));
    }
    .chatbot-panel {
        width: calc(100vw - 24px);
        right: -8px;
        height: 65vh;
        bottom: 64px;
    }
}

/* --------------------------------------------------------------------------
   5b. Floating WhatsApp "Contact Sales Person" Button
   (includes/whatsapp-widget.php is required site-wide from includes/footer.php)
   -------------------------------------------------------------------------- */
.whatsapp-sales-btn {
    position: fixed;
    right: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25D366;
    color: #ffffff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    z-index: 1080;
    text-decoration: none;
    transition: transform 0.2s ease;
    transform: translateZ(0);
    will-change: transform;
}
.whatsapp-sales-btn:hover {
    color: #ffffff;
    transform: translateZ(0) scale(1.06);
}
.whatsapp-sales-tooltip {
    position: absolute;
    right: 68px;
    top: 50%;
    transform: translateY(-50%);
    background: #1f2a24;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}
.whatsapp-sales-btn:hover .whatsapp-sales-tooltip {
    opacity: 1;
}

@media (max-width: 480px) {
    .whatsapp-sales-btn {
        right: 12px;
        bottom: calc(80px + env(safe-area-inset-bottom));
        width: 52px;
        height: 52px;
        font-size: 1.35rem;
    }
    .whatsapp-sales-tooltip {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   6. Floating "REVIEWS" Vertical Tab + Modal
   (includes/reviews-widget.php is required site-wide from includes/footer.php)
   -------------------------------------------------------------------------- */
.review-tab-btn {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%) rotate(180deg) translateZ(0);
    will-change: transform;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 0 10px 10px 0;
    padding: 16px 10px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 3px 0 12px rgba(0,0,0,0.18);
    z-index: 1075;
    transition: padding-right 0.2s ease, background 0.2s ease;
}
.review-tab-btn:hover {
    background: var(--secondary-color, var(--primary-color));
    padding-right: 16px;
}
.review-tab-btn i {
    writing-mode: horizontal-tb;
    font-size: 0.95rem;
}

@media (max-width: 480px) {
    .review-tab-btn {
        padding: 12px 8px;
        font-size: 0.7rem;
    }
}

.review-modal-content {
    border-radius: 16px;
    border: none;
}

.review-star-input {
    display: inline-flex;
    flex-direction: row-reverse;
    font-size: 1.6rem;
    gap: 4px;
}
.review-star-input input {
    display: none;
}
.review-star-input label {
    color: #d8d8d8;
    cursor: pointer;
    transition: color 0.15s ease;
}
.review-star-input input:checked ~ label,
.review-star-input label:hover,
.review-star-input label:hover ~ label {
    color: #f5b301;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}
.review-list-item {
    display: flex;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
}
.review-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.review-list-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}
.review-list-body {
    flex: 1;
    min-width: 0;
}