/* =====================================================================
   assets/css/custom.css
   Janaushadhi Stores - template ke upar humare apne styles.
   Template ki style.css ko chhede bina saare fixes yahan hain.
   Kuch galat lage to is file ko hata do, site pehle jaisi ho jayegi.
   ===================================================================== */

/* ---------- 1. Header styles (pehle includes/header.php ke andar inline the) ---------- */
    
    .home-2 .hs-1 .hero-img {
    position: absolute;
    right: 0;
    bottom: 0px;
    text-align: center;
    width: 60%;
}
    
    
        .navbar-brand img { width: 270px; }
        .footer-logo img { border-radius: 5px; width: 200px; margin-bottom: 15px; }
        .navbar { background: #fff; }
        .navbar .nav-item .nav-link {
            margin-right: 25px; padding: 10px 0; font-size: 16px; font-weight: 500;
            color: #244091; text-transform: capitalize;
        }
        @media (max-width: 767px) {
            .header-top { display: none; }
            .navbar-brand img { width: 210px; }
            .hero-single .hero-content .hero-title { font-size: 25px; }
            .site-title { font-weight: 700; font-size: 25px; color: var(--color-dark); margin-top: 4px; }
            .home-2 .hs-1 .hero-img-info { top: 68%; right: -20px; }
            .home-2 .hs-1 .hero-img-info .icon {
                width: 24px; height: 27px; line-height: 24px; background: var(--theme-color);
                border-radius: 47px; text-align: center;
            }
            .mobile-menu-right, .mobile-menu-btn { display: flex; align-items: center; gap: 10px; }
            .home-2 .nav-right-link { color: var(--color-dark); font-size: 14px; padding: 4px; }
            
            
            
        }
        
        
        /* Mega Menu Scrollable Fix */
.mega-menu .dropdown-menu {
    max-height: 80vh;           /* Limits total dropdown height */
    overflow: hidden;           /* Hide overflow on the menu itself */
    padding: 20px 0;            /* Nice spacing */
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 10px;
}

.mega-menu .mega-content {
    max-height: 70vh;           /* Inner content scrollable area */
    overflow-y: auto;           /* Enable vertical scroll */
    padding: 0 20px;
}

/* Custom scrollbar for better look (optional but recommended) */
.mega-menu .mega-content::-webkit-scrollbar {
    width: 8px;
}
.mega-menu .mega-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.mega-menu .mega-content::-webkit-scrollbar-thumb {
    background: #244091;
    border-radius: 10px;
}
.mega-menu .mega-content::-webkit-scrollbar-thumb:hover {
    background: #1a3070;
}

/* Group title styling */
.mega-menu-title {
    font-weight: 600;
    color: #244091;
    margin-bottom: 12px;
    font-size: 16px;
    padding-left: 5px;
}

/* Responsive adjustment */
@media (max-width: 991px) {
    .mega-menu .dropdown-menu {
        max-height: none;
        height: auto;
        overflow-y: visible;
    }
    .mega-menu .mega-content {
        max-height: none;
        overflow-y: visible;
    }
}

.category-info .content h4 {
    font-size: 14px;
    color: var(--color-dark);
    transition: all .3s ease-in-out;
}

.shop-widget {
    background: var(--color-white);
    padding: 10px;
    margin-bottom: 25px;
    border-radius: 10px;
}





    


/* ---------- 2. General ---------- */
img { max-width: 100%; height: auto; }
.navbar-brand img { height: auto; }
.header-top-list li span { color: inherit; }

/* Accessibility: keyboard focus dikhe */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #244091;
    outline-offset: 2px;
}

/* Header top bar desktop par 2 line me na toote */
@media (min-width: 992px) and (max-width: 1399px) {
    .header-top-list { flex-wrap: nowrap; }
    .header-top-list li { white-space: nowrap; }
    .header-top .header-top-list li.help { display: none; }
}

/* ---------- 3. Shop / Category: mobile par products pehle, filters baad me ---------- */
@media (max-width: 991.98px) {
    .row > .col-lg-3:has(> .shop-sidebar) { order: 2; }
    .row > .col-lg-9:has(.shop-sort, .shop-item-wrap, .product-item) { order: 1; }
    .shop-widget-banner { display: none; }
    .shop-sidebar .shop-category-list { max-height: 260px; overflow-y: auto; }
}

/* ---------- 4. Account pages (dashboard, orders, profile...): mobile sidebar compact ---------- */
@media (max-width: 991.98px) {
    .user-area .sidebar { padding: 12px; margin-bottom: 20px; }
    .user-area .sidebar .sidebar-top { display: none; }
    .user-area .sidebar-list {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        margin: 0;
    }
    .user-area .sidebar-list li { flex: 0 0 auto; margin: 0; }
    .user-area .sidebar-list li a {
        white-space: nowrap;
        padding: 8px 14px;
        border-radius: 20px;
        border: 1px solid #e3e8f4;
        font-size: 14px;
    }
}

/* ---------- 5. Tables mobile par scroll ho, page bahar na nikle ---------- */
@media (max-width: 767.98px) {
    .table-responsive, .shop-cart .table-responsive { -webkit-overflow-scrolling: touch; }
    .site-breadcrumb-wrap .breadcrumb-menu { flex-wrap: wrap; }
}

/* ---------- 6. Product cards: image ka fixed area (layout shift kam) ---------- */
.product-item .product-img img { aspect-ratio: 1 / 1; object-fit: contain; width: 100%; }
.shop-item-wrap.item-list .product-item .product-img img { aspect-ratio: auto; }

/* ---------- 7. Wishlist heart active ---------- */
.js-wishlist.active i, .js-wishlist.active { color: #e63946 !important; }
.js-wishlist.active i::before { font-weight: 900; }

/* ---------- Home hero slider (admin banners) - badi image, chhota text, mobile par image upar ---------- */
.home-2 .hero-banner-slider .hero-single { padding-top: 165px; padding-bottom: 125px; }
.home-2 .hero-banner-slider .hero-img {
    position: relative; right: auto; bottom: auto; width: 100% !important; text-align: center;
}
.home-2 .hero-banner-slider .hero-img img {
    display: block; width: auto; max-width: 100%; max-height: 430px; margin: 0 auto;
    border-radius: 18px; box-shadow: 0 12px 35px rgba(11, 47, 159, .15);
}
.hero-banner-slider .hero-single .hero-content .hero-title { font-size: 38px; line-height: 1.2; margin: 16px 0; }
.hero-banner-slider .hero-single .hero-content p {
    font-size: 16px; line-height: 26px; margin-bottom: 22px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 1199px) {
    .hero-banner-slider .hero-single .hero-content .hero-title { font-size: 32px; }
}
@media (max-width: 991px) {
    .home-2 .hero-banner-slider .hero-single { padding: 160px 15px 95px; }
    .home-2 .hero-banner-slider .hero-img { margin: 0 0 18px; }
    .home-2 .hero-banner-slider .hero-img img { width: 100%; max-height: none; border-radius: 14px; }
    .hero-banner-slider .hero-single .hero-content { text-align: left; }
    .hero-banner-slider .owl-nav { display: none; }
}
@media (max-width: 767px) {
    .home-2 .hero-banner-slider .hero-single { padding: 145px 5px 90px; }
    .hero-banner-slider .hero-single .hero-content .hero-sub-title { font-size: 12px; letter-spacing: 2px; padding: 4px 14px 4px 18px; }
    .hero-banner-slider .hero-single .hero-content .hero-title { font-size: 22px; margin: 10px 0 8px; }
    .hero-banner-slider .hero-single .hero-content p { font-size: 14px; line-height: 22px; margin-bottom: 14px; -webkit-line-clamp: 2; }
    .hero-banner-slider .hero-btn { flex-wrap: wrap; gap: 8px; }
    .hero-banner-slider .hero-btn .theme-btn { font-size: 14px; padding: 8px 14px !important; }
}

/* ---------- Product card badges (% OFF, Rx, Out of Stock) ---------- */
.product-item .product-img { position: relative; }
.product-item .jas-badges {
    position: absolute; left: 10px; top: 10px; z-index: 2;
    display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
}
.product-item .jas-badges .type {
    position: static; font-size: 11px; font-weight: 700; padding: 3px 10px; letter-spacing: .5px;
}
.product-item .jas-badges .type.discount { background: #e53935; color: #fff; }
.product-item .jas-badges .type.rx { background: #0B2F9F; color: #fff; }

/* ---------- Mobile: 2 product per line, chhote card ---------- */
@media (max-width: 767px) {
    .product-area .row.g-3 > .col-6, .shop-area .row.g-4 > .col-6 { padding-left: 6px; padding-right: 6px; }
    .product-item { padding: 10px !important; border-radius: 14px; }
    .product-item .product-img img { max-height: 140px; object-fit: contain; }
    .product-item .product-content { padding-top: 8px; }
    .product-item .product-title { font-size: 14px !important; line-height: 1.3; min-height: 36px;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .product-item .product-price span { font-size: 15px; }
    .product-item .product-price del { font-size: 12px; }
    .product-item .product-cart-btn { width: 36px; height: 36px; line-height: 36px; font-size: 15px; }
    .product-item .jas-badges { left: 6px; top: 6px; }
    .product-item .jas-badges .type { font-size: 10px; padding: 2px 7px; }
    .product-item .product-action-wrap { display: none; }

    /* Categories: 3 per line, chhote */
    .category-area .category-info { padding: 12px 6px !important; }
    .category-area .category-info .icon { width: 56px !important; height: 56px !important; }
    .category-area .category-info .content h4 { font-size: 12px !important; }

    /* Why Choose Us: 2x3 compact grid */
    .choose-area .choose-content .choose-item {
        flex-direction: column; text-align: center; padding: 14px 10px !important; height: 100%;
    }
    .choose-area .choose-content .choose-icon { margin: 0 auto 8px !important; width: 52px !important; height: 52px !important; }
    .choose-area .choose-content .choose-icon img { width: 30px; }
    .choose-area .choose-content .choose-info h4 { font-size: 14px !important; margin-bottom: 4px; }
    .choose-area .choose-content .choose-info p {
        font-size: 12px !important; line-height: 1.45 !important; margin: 0;
        display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    }
    .choose-area .choose-content .row.g-4 { --bs-gutter-x: 10px; --bs-gutter-y: 10px; }
}

/* ---------- Section spacing: testimonials ke baad wala product section chipka na rahe ---------- */
.testimonial-area + .product-area { padding-top: 80px; }
@media (max-width: 767px) { .testimonial-area + .product-area { padding-top: 50px; } }

/* ---------- Mobile floating buttons ---------- */
.jas-float { display: none; }
@media (max-width: 991px) {
    .jas-float {
        display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
        position: fixed; left: 14px; bottom: 18px; z-index: 999;
    }
    .jas-float-btn {
        display: inline-flex; align-items: center; gap: 6px; height: 46px; min-width: 46px; padding: 0 14px;
        border-radius: 50px; color: #fff !important; font-size: 14px; font-weight: 600;
        box-shadow: 0 6px 18px rgba(0,0,0,.18); text-decoration: none;
    }
    .jas-float-btn i { font-size: 20px; }
    .jas-float-rx { background: #0B2F9F; }
    .jas-float-wa { background: #25D366; justify-content: center; padding: 0; width: 46px; }
}
.product-item .jas-badges .type.oos { background: #6c757d; color: #fff; }
@media (max-width: 767px) {
    .product-item .product-title, .product-item .product-title a { font-size: 14px !important; line-height: 1.3 !important; }
    /* Feature patti: 2x2 */
    .feature-area .feature-item { flex-direction: column; text-align: center; padding: 14px 6px !important; border: 0 !important; }
    .feature-area .feature-icon { margin: 0 auto 6px !important; width: 50px !important; height: 50px !important; line-height: 50px !important; font-size: 22px !important; }
    .feature-area .feature-content h4 { font-size: 14px !important; margin-bottom: 2px; }
    .feature-area .feature-content p { font-size: 12px !important; margin: 0; }
    .feature-area .feature-wrap { padding: 10px !important; }
    /* Category tabs: ek line me side scroll */
    .product-area #item-tab { flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin-top: 20px !important; margin-bottom: 25px !important; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
    .product-area #item-tab .nav-link { white-space: nowrap; font-size: 13px; padding: 7px 14px; }
}
@media (max-width: 767px) {
    /* Home: sections ke beech ka bada khaali gap kam */
    .home-2 .main .pb-100 { padding-bottom: 50px !important; }
    .home-2 .main .py-100 { padding-top: 55px !important; padding-bottom: 55px !important; }
    .home-2 .main .pt-80 { padding-top: 50px !important; }
}

/* ---------- Home product cards: saaf aur ek jaise (Trending + Popular) ---------- */
.home-2 .product-area .product-item {
    background: #f3f8fb; border: 1px solid #e3eef4; border-radius: 18px;
    height: 100%; display: flex; flex-direction: column; padding: 14px;
    transition: box-shadow .25s, transform .25s;
}
.home-2 .product-area .product-item:hover { box-shadow: 0 10px 28px rgba(11, 47, 159, .10); transform: translateY(-3px); }
.home-2 .product-area .product-item::before { display: none; }
.home-2 .product-area .product-item .product-img {
    background: #fff; border-radius: 14px; height: 190px;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.home-2 .product-area .product-item .product-img > a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.home-2 .product-area .product-item .product-img img { width: auto !important; max-width: 90%; max-height: 170px; height: auto; object-fit: contain; }
.home-2 .product-area .product-item .product-content { display: flex; flex-direction: column; flex: 1; padding-top: 12px; margin-top: 0; }
.home-2 .product-area .product-item .product-title { margin-bottom: 6px; min-height: 42px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-2 .product-area .product-item .product-title a { font-size: 16px; line-height: 1.3; }
.home-2 .product-area .product-item .product-bottom { margin-top: auto; padding-top: 6px; align-items: center; }
.home-2 .jas-popular .tab-pane .row > [class*="col-"] { display: flex; }
.home-2 .product-slider .owl-stage { display: flex; }
.home-2 .product-slider .owl-item { display: flex; }
.home-2 .product-slider .owl-item > .product-item { width: 100%; }

/* Popular section: tabs left me, saaf line; banner products ke saath upar se align */
.jas-popular .item-tab .nav { justify-content: flex-start; flex-wrap: wrap; gap: 10px; }
.jas-popular .item-tab .nav-link { font-size: 15px; padding: 8px 18px; }
.jas-popular #item-tab { margin-top: 22px !important; margin-bottom: 30px !important; }
.jas-popular .product-banner { position: sticky; top: 110px; }
.jas-popular .product-banner img { width: 100%; border-radius: 18px; box-shadow: 0 10px 28px rgba(0,0,0,.10); }
@media (max-width: 991px) {
    .jas-popular .product-banner { position: static; max-width: 420px; margin: 10px auto 0; }
}

/* ---------- 3 promo banners: chhote aur beech me ---------- */
.small-banner > .container { max-width: 1040px; }
.small-banner .banner-item { overflow: hidden; border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.small-banner .banner-item img { aspect-ratio: 1 / 1; object-fit: cover; transition: transform .35s; }
.small-banner .banner-item:hover img { transform: scale(1.03); }
@media (max-width: 767px) {
    /* Mobile: ek line me side-scroll (pehle 3 badi images ek ke neeche ek) */
    .small-banner .row { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
    .small-banner .row > [class*="col-"] { flex: 0 0 78%; max-width: 78%; scroll-snap-align: start; }
}
@media (max-width: 767px) {
    .home-2 .product-area .product-item { padding: 8px; }
    .home-2 .product-area .product-item .product-img { height: 140px; }
    .home-2 .product-area .product-item .product-img img { max-height: 125px; }
    .home-2 .product-area .product-item .product-title a { font-size: 14px; }
    .home-2 .product-area .product-item .product-title { min-height: 36px; }
}
.home-2 .jas-popular .tab-pane .row > [class*="col-"] > .product-item { width: 100%; }
.home-2 .product-area .product-item .product-title {
    font-size: 16px; line-height: 1.3; max-height: 2.6em; min-height: 2.6em; overflow: hidden; display: block;
}
@media (max-width: 767px) {
    .home-2 .product-area .product-item .product-title { font-size: 14px; }
}
/* Home popular section: mobile par products pehle, banner baad me (shop sidebar wala order-rule yahan na lage) */
.jas-popular .row > .col-lg-9 { order: 0 !important; }
.jas-popular .row > .col-lg-3 { order: 1 !important; }

/* ---------- Footer: chhota logo, saaf contact icons, floating buttons ke liye jagah ---------- */
.footer-area .footer-logo img { width: 160px; height: auto; border-radius: 10px; margin-bottom: 15px; }
.footer-area .footer-contact li { align-items: center; line-height: 1.6; }
.footer-area .footer-contact li i { flex: 0 0 35px; }
.footer-area .footer-contact li a { display: inline-flex; align-items: center; }
.footer-area .copyright .copyright-text { margin: 0; }
@media (min-width: 992px) {
    /* scroll-top button "Developed by" ko na dhake */
    .footer-area .copyright .col-lg-6.text-lg-end { padding-right: 70px; }
}
@media (max-width: 767px) {
    .footer-area .footer-widget-wrapper { padding-top: 50px !important; padding-bottom: 10px !important; }
    .footer-area .footer-logo img { width: 120px; }
    .footer-area .footer-widget-box { margin-bottom: 26px; }
    .footer-area .footer-widget-box.about-us p { font-size: 14px; line-height: 1.6; }
    .footer-area .footer-widget-title { font-size: 16px; padding-bottom: 12px; margin-bottom: 14px; }
    .footer-area .footer-list li { margin-bottom: 6px; }
    .footer-area .footer-list li a { font-size: 14px; }
    .footer-area .footer-contact li { font-size: 14px; }
    .footer-area .footer-contact li i { flex-basis: 32px; width: 32px; height: 32px; line-height: 32px; font-size: 14px; }
    .footer-area .copyright { text-align: center; padding-top: 14px; padding-bottom: 130px; }
    .footer-area .copyright .copyright-text { font-size: 13px; margin-bottom: 4px; text-align: center !important; }
}
