/**
 * Mobile Bottom Navigation Bar & Mobile UI Modernization
 * Cafe De Pasta / Multi-Vendor Platform
 */

/* ==========================================================================
   1. MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 64px;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-bottom-nav-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    width: 100%;
    height: 100%;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 4px 4px 4px;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-decoration: none !important;
    color: #4b5563;
    transition: all 0.2s ease-in-out;
    padding: 6px 2px 3px 2px;
    position: relative;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
    color: var(--web-primary, #074c6e);
    text-decoration: none;
}

.mobile-nav-item.active {
    color: var(--web-primary, #074c6e);
}

.mobile-nav-item.active .mobile-nav-icon svg {
    stroke: var(--web-primary, #074c6e);
    stroke-width: 2.3;
}

.mobile-nav-item.active .mobile-nav-label {
    color: var(--web-primary, #074c6e);
    font-weight: 700;
}

.mobile-nav-icon {
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3px;
    transition: transform 0.15s ease;
}

.mobile-nav-item:active .mobile-nav-icon {
    transform: scale(0.9);
}

.mobile-nav-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.2px;
    white-space: nowrap;
    color: inherit;
}

/* Center Elevated Cart FAB */
.mobile-nav-cart-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    position: relative;
}

.mobile-nav-cart-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    position: relative;
    top: -14px;
}

.mobile-nav-cart-btn:hover,
.mobile-nav-cart-btn:focus {
    text-decoration: none;
}

.cart-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--web-primary, #074c6e);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3.5px solid #ffffff;
    box-shadow: 0 4px 14px rgba(7, 76, 110, 0.35);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.mobile-nav-cart-btn:active .cart-fab {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(7, 76, 110, 0.25);
}

.mobile-nav-cart-label {
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
    margin-top: 4px;
    line-height: 1.1;
    white-space: nowrap;
}

.mobile-nav-cart-btn.active .mobile-nav-cart-label {
    color: var(--web-primary, #074c6e);
    font-weight: 700;
}

/* Ensure body has bottom margin on mobile to avoid overlapping content */
@media (max-width: 767.98px) {
    body.has-mobile-bottom-nav {
        padding-bottom: 74px !important;
    }

    /* Reposition Floating WhatsApp widget and Back-To-Top button above the bottom nav */
    .__floating-btn,
    .wa-widget-send-button {
        bottom: 80px !important;
        right: 16px !important;
        z-index: 1040 !important;
    }

    .btn-scroll-top {
        bottom: 80px !important;
        left: 16px !important;
        z-index: 1040 !important;
    }

    /* Reposition Product Details Sticky Bar cleanly above the bottom nav */
    .bottom-sticky.bg-white.d-sm-none {
        position: fixed !important;
        bottom: 64px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1045 !important;
        background: #ffffff !important;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08) !important;
        border-top: 1px solid #f1f3f5 !important;
        padding: 6px 12px !important;
    }

    .bottom-sticky.bg-white.d-sm-none .btn-sm {
        padding: 8px 16px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
    }
}

/* ==========================================================================
   2. MOBILE HEADER & SEARCH REFINEMENTS (Matching Screenshot 1 & 2)
   ========================================================================== */
@media (max-width: 767.98px) {
    .mobile-head .navbar {
        padding: 8px 12px !important;
    }

    .mobile-logo-img {
        max-height: 38px !important;
        width: auto !important;
        object-fit: contain;
    }

    /* Pill-shaped modern mobile search bar */
    .search-form-mobile {
        width: 100% !important;
        margin-top: 6px !important;
    }

    .search-form-mobile .search-bar-input {
        border-radius: 25px !important;
        background-color: #f4f6f8 !important;
        border: 1px solid #eef0f2 !important;
        padding-left: 38px !important;
        padding-right: 36px !important;
        font-size: 13px !important;
        height: 42px !important;
        box-shadow: none !important;
        transition: border-color 0.2s ease, background 0.2s ease;
    }

    .search-form-mobile .search-bar-input:focus {
        background-color: #ffffff !important;
        border-color: var(--web-primary, #074c6e) !important;
        box-shadow: 0 0 0 3px rgba(7, 76, 110, 0.1) !important;
    }

    /* Search input icon positioning */
    .search-form-mobile .d-flex {
        position: relative;
    }

    .search-form-mobile .d-flex::before {
        content: "";
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-size: contain;
        pointer-events: none;
        z-index: 5;
    }
}

/* ==========================================================================
   3. MOBILE HERO BANNER (Rounded, Modern, Shadow)
   ========================================================================== */
@media (max-width: 767.98px) {
    .__top-slider-images,
    .hero-slider {
        border-radius: 16px !important;
        overflow: hidden !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
    }

    .__slide-img {
        border-radius: 16px !important;
        object-fit: cover !important;
    }
}

/* ==========================================================================
   4. TRUST / VALUE BADGES (Matching Screen 1 in Screenshot 2)
   ========================================================================== */
.mobile-trust-badges {
    display: none;
}

@media (max-width: 767.98px) {
    .mobile-trust-badges {
        display: block;
        padding: 12px 0;
        margin-bottom: 8px;
    }

    .mobile-trust-badges-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .mobile-trust-card {
        background: #ffffff;
        border: 1px solid #f0f2f5;
        border-radius: 12px;
        padding: 10px 4px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    }

    .mobile-trust-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        background: #f8fafc;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 6px;
        color: #1e293b;
    }

    .mobile-trust-icon svg {
        width: 18px;
        height: 18px;
        stroke: #334155;
    }

    .mobile-trust-text {
        font-size: 10px;
        font-weight: 600;
        line-height: 1.2;
        color: #334155;
        margin: 0;
    }
}

/* ==========================================================================
   5. SHOP BY CATEGORY (Modern Rounded Grid & Pills)
   ========================================================================== */
@media (max-width: 767.98px) {
    .categories-title span {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #1e293b !important;
    }

    .__cate-item {
        background: transparent !important;
    }

    .__cate-item .__img {
        width: 64px !important;
        height: 64px !important;
        border-radius: 16px !important;
        background: #f8fafc !important;
        border: 1px solid #eef2f6 !important;
        margin: 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .__cate-item:active .__img {
        transform: scale(0.94);
    }

    .__cate-item img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    .__cate-item p {
        font-size: 11px !important;
        font-weight: 600 !important;
        color: #334155 !important;
        margin-top: 6px !important;
        line-height: 1.2 !important;
    }
}

/* ==========================================================================
   6. 2-COLUMN MODERN PRODUCT CARDS (Homepage & Listing)
   ========================================================================== */
@media (max-width: 767.98px) {
    .product-single-hover,
    .product-single-hover.style--card {
        background: #ffffff !important;
        border-radius: 14px !important;
        border: 1px solid #f1f3f5 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
        overflow: hidden !important;
        transition: transform 0.15s ease, box-shadow 0.15s ease !important;
        padding: 0 0 10px 0 !important;
    }

    .product-single-hover:active {
        transform: scale(0.98);
    }

    .product-single-hover .inline_product {
        border-radius: 14px 14px 0 0 !important;
        overflow: hidden !important;
        background: #fafafa !important;
        position: relative !important;
        padding: 8px !important;
    }

    .product-single-hover .inline_product img {
        border-radius: 10px !important;
        max-height: 160px !important;
        width: 100% !important;
        object-fit: cover !important;
    }

    /* Floating Wishlist Heart */
    .product-single-hover .inline_product .wishlist-btn-mobile {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(4px);
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        z-index: 5;
    }

    .product-single-hover .for-discount-value {
        position: absolute;
        top: 8px;
        left: 8px;
        border-radius: 6px !important;
        background: #111827 !important;
        color: #ffffff !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        padding: 2px 6px !important;
        z-index: 5;
    }

    .single-product-details {
        padding: 8px 10px 0 10px !important;
    }

    .single-product-details a {
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #1e293b !important;
        line-height: 1.3 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        height: 34px;
    }

    .product-price {
        margin-top: 4px !important;
    }

    .product-price .text-accent {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #0f172a !important;
    }

    .category-single-product-price {
        font-size: 11px !important;
        color: #94a3b8 !important;
    }
}

/* ==========================================================================
   7. CATEGORY PILL FILTER BAR (Screen 2: Horizontal Scrollable Pills)
   ========================================================================== */
.mobile-category-pills-bar {
    display: none;
}

@media (max-width: 767.98px) {
    .mobile-category-pills-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        overflow-x: auto;
        white-space: nowrap;
        padding: 8px 12px 12px 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .mobile-category-pills-bar::-webkit-scrollbar {
        display: none;
    }

    .category-pill-tag {
        display: inline-flex;
        align-items: center;
        padding: 6px 16px;
        border-radius: 20px;
        background: #f1f5f9;
        color: #475569;
        font-size: 13px;
        font-weight: 500;
        text-decoration: none !important;
        border: 1px solid transparent;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }

    .category-pill-tag:hover {
        background: #e2e8f0;
        color: #1e293b;
    }

    .category-pill-tag.active {
        background: #0f172a !important;
        color: #ffffff !important;
        border-color: #0f172a !important;
        font-weight: 600;
    }
}

/* ==========================================================================
   8. PRODUCT DETAILS PAGE MOBILE REFINEMENTS (Screen 3)
   ========================================================================== */
@media (max-width: 767.98px) {
    /* Variation Pills */
    .variant-change input[type="radio"] + label {
        border-radius: 8px !important;
        padding: 8px 14px !important;
        border: 1.5px solid #e2e8f0 !important;
        font-weight: 600 !important;
        font-size: 13px !important;
        color: #334155 !important;
        background: #ffffff !important;
        transition: all 0.15s ease !important;
    }

    .variant-change input[type="radio"]:checked + label {
        border-color: #0f172a !important;
        background: #0f172a !important;
        color: #ffffff !important;
    }

    /* Product Details Action Buttons */
    .bottom-sticky .action-buy-now-this-product {
        background: #0f172a !important;
        border-color: #0f172a !important;
        color: #ffffff !important;
        border-radius: 24px !important;
        font-weight: 600 !important;
    }

    .bottom-sticky .action-add-to-cart-form {
        background: #ffffff !important;
        border: 1.5px solid #0f172a !important;
        color: #0f172a !important;
        border-radius: 24px !important;
        font-weight: 600 !important;
    }
}
