/*
 * Kukdukoo - phone ke liye saaf layout.
 * style.css ke baad load hoti hai (layouts/app.blade.php). Sirf chhoti screen
 * par lagti hai, desktop ko nahi chhedti (footer aur logo ke alawa).
 */

/* Header logo: naya logo_web.png 360x98 ka hai, jagah purane jitni hi rahe */
#logo_web { max-height: 49px; width: auto; }
.section-footer { background: #1c1c1c !important; }

@media (max-width: 992px) {
    /*
     * style.css phone par `.d-none { display:block !important }` karta hai taaki
     * har page ka mobile header (sirf class="d-none" wala div) dikhe. Par isse
     * baaki saari chhupi cheezein bhi dikh jaati thi: khaali "Highlights" dabba,
     * dukaan khuli ho tab bhi "restaurant closed", cashback, error alert.
     * Jiske paas d-none ke saath koi aur class hai wo chhupa hi rahe; JS
     * removeClass('d-none') karke dikhata hai, wo waise hi chalega.
     */
    .d-none:not([class="d-none"]):not(.mobile-filter),
    #cashback-button.d-none,
    form.d-none {
        display: none !important;
    }

    /* Mobile header: logo chhota, language wala dabba hata (site sirf English) */
    .mobile-logo img { height: 40px; width: auto; max-width: 160px; }
    .mobile-header-loc-lang #language_dropdown_box { display: none !important; }
    .mobile-header-loc-lang { padding-top: 10px !important; }
    .mobile-header-loc-lang .takeaway-btn { font-size: 13px; padding: 4px 10px; }
    .mobile-set-location { margin-top: 8px !important; }
    .mobile-set-location .user_locationnew {
        font-size: 13px;
        text-overflow: ellipsis;
    }
}

@media (max-width: 767px) {
    body { font-size: 14px; }
    body.fixed-bottom-bar { padding-bottom: 64px; }

    /* Section headings aur "See All" chhote */
    .title h5, .most_popular h5, .title h3 { font-size: 17px; }
    .btn-sm, .see-all, a.btn.btn-primary.btn-sm { font-size: 12px; }
    .pt-5, .py-5 { padding-top: 12px !important; }
    .pb-5, .py-5 { padding-bottom: 12px !important; }

    /*
     * Dukaan aur khane ke card: ek-ek poori screen jitna bada card tha, 300px
     * ki photo ke saath. Ab app jaisi list - bayen chhoti photo, dayen naam/daam.
     * Sirf dukaan (.p-3) aur khane (.py-2) ke card; category ke card
     * (.p-2.brand-title) template jaise hi rehte hain.
     */
    .list-card:has(> .p-3, > .py-2) {
        display: flex !important;
        flex-direction: row;
        align-items: stretch;
        height: auto !important;
        border-radius: 12px !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, .08) !important;
        margin-bottom: 10px;
        background: #fff;
    }
    .list-card:has(> .p-3, > .py-2) .list-card-image {
        flex: 0 0 92px;
        width: 92px;
        min-height: 92px;
        position: relative;
    }
    .list-card:has(> .p-3, > .py-2) .list-card-image > a { display: block; height: 100%; }
    .list-card:has(> .p-3, > .py-2) .list-card-image img.item-img {
        width: 92px !important;
        height: 92px !important;
        min-height: 92px;
        object-fit: cover;
        border-radius: 12px 0 0 12px;
    }
    .list-card:has(> .p-3, > .py-2) .list-card-image .member-plan { top: 4px; left: 4px; z-index: 2; }
    .list-card:has(> .p-3, > .py-2) .list-card-image .badge { font-size: 9px; padding: 2px 5px; }
    .list-card:has(> .p-3, > .py-2) > .p-3, .list-card:has(> .p-3, > .py-2) > .py-2 {
        flex: 1 1 auto;
        min-width: 0;
        padding: 8px 10px !important;
    }
    .list-card:has(> .p-3, > .py-2) h6, .list-card:has(> .p-3, > .py-2) .product-title, .list-card:has(> .p-3, > .py-2) .popul-title { font-size: 14px; margin-bottom: 2px !important; }
    .list-card:has(> .p-3, > .py-2) h6 a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
    .list-card:has(> .p-3, > .py-2) p.small {
        font-size: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .list-card:has(> .p-3, > .py-2) .pro-price { font-size: 14px; font-weight: 600; color: #222; }
    .list-card:has(> .p-3, > .py-2) .star { margin-top: 4px !important; }
    .list-card:has(> .p-3, > .py-2) .star .badge { font-size: 11px; }

    /* Card wale grid: card ke beech kam jagah */
    .product-list, .row > [class*="col-md-3"], .row > [class*="col-md-4"].product-list {
        padding-left: 8px !important;
        padding-right: 8px !important;
        margin-bottom: 0 !important;
    }

    /* Top categories: 4 ek line mein, chhote gol icon */
    .cat-item img, .top-cat-list img { max-height: 64px; object-fit: cover; }

    /* Dukaan ka page: banner ki 4 photo ki jagah ek chhoti */
    .resturant-banner { padding-top: 8px !important; padding-bottom: 0 !important; }
    .resturant-banner .restaurant-pic {
        height: 150px !important;
        width: 100%;
        object-fit: cover;
        border-radius: 12px;
    }
    .resturant-banner .resturant-banner-right { display: none !important; }

    /*
     * Dukaan ki categories: 14 line ki lambi list menu se pehle aati thi.
     * Ab upar chipakne wali, side mein khiskne wali patti (Swiggy jaisi).
     */
    #category-list { position: sticky; top: 0; z-index: 20; background: #fff; margin: 0 -15px 8px; }
    #category-list .vandor-sidebar { border: 0 !important; padding: 0 !important; box-shadow: none !important; }
    #category-list .vandor-sidebar h3 { display: none; }
    #category-list .vandorcat-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding: 10px 15px !important;
        margin: 0 !important;
        border-bottom: 1px solid #eee;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    #category-list .vandorcat-list::-webkit-scrollbar { display: none; }
    #category-list .vandorcat-list li {
        flex: 0 0 auto;
        border: 1px solid #e5e5e5 !important;
        border-radius: 20px;
        padding: 0 !important;
        margin: 0 !important;
        background: #fff;
    }
    #category-list .vandorcat-list li a {
        display: flex;
        align-items: center;
        padding: 5px 12px 5px 5px !important;
        font-size: 13px;
        white-space: nowrap;
        color: #333;
    }
    #category-list .vandorcat-list li span img { width: 24px; height: 24px; border-radius: 50%; margin-right: 6px; object-fit: cover; }
    #category-list .vandorcat-list li.active { background: #e71f57; border-color: #e71f57 !important; }
    #category-list .vandorcat-list li.active a { color: #fff !important; }
    #category-list .vandorcat-list li::before, #category-list .vandorcat-list li a::before { display: none !important; }

    /* Product page */
    .product-detail-page .product-image img { max-height: 260px; object-fit: cover; border-radius: 12px; }
    .product-detail-page .car-det-title h2 { font-size: 20px; }
    .product-detail-page .car-det-price .price { font-size: 20px; }
    .product-detail-page .addtocart {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .product-detail-page .addtocart p { flex: 1 0 100%; margin-bottom: 4px; }
    .product-detail-page .addtocart .btn {
        flex: 1 1 0;
        width: auto !important;
        margin: 0 !important;
        font-size: 15px;
        padding: 12px 8px;
        white-space: nowrap;
    }

    /* Footer: saaf dark, padhne layak */
    .section-footer .container { padding-top: 16px !important; padding-bottom: 8px !important; }
    .section-footer h6 { font-size: 14px; margin-bottom: 6px; }
    .section-footer .col-md-4 { margin-bottom: 10px !important; }

    /* hc-offcanvas ka apna "Home / Help" bottom-nav - ab neeche wala bar hai */
    .hc-offcanvas-nav ul.bottom-nav { display: none; }

    /* Neeche ka app jaisa menu bar (layouts/footer.blade.php) */
    .kdk-bottom-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1030;
        display: flex;
        background: #fff;
        border-top: 1px solid #eee;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, .06);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .kdk-bottom-bar a {
        flex: 1 1 0;
        text-align: center;
        padding: 7px 0 6px;
        color: #777;
        font-size: 11px;
        line-height: 1.2;
        text-decoration: none;
    }
    .kdk-bottom-bar a i { display: block; font-size: 20px; margin-bottom: 2px; }
    .kdk-bottom-bar a.active { color: #e71f57; font-weight: 600; }

    /*
     * Pehla page (set-location) - iska HTML Firestore settings/homepageTemplate
     * se aata hai. Logo headline ke upar chadh jaata tha, dayen ki badi photo
     * phone par sirf jagah leti thi.
     */
    .st-home-page-main .header-main { position: static !important; height: auto; padding: 12px 0 0; }
    .st-home-page-main .header-main br { display: none; }
    .st-home-page-main .header-main .logo_web { height: 56px; width: auto; border-radius: 12px; }
    .st-home-banner { padding-top: 8px !important; min-height: 0 !important; }
    .st-home-banner-content { padding: 8px 4px 16px !important; }
    .st-home-banner-content h1 { font-size: 24px !important; line-height: 1.25; }
    .st-home-banner-content h1 br { display: none; }
    .st-home-banner-content p { font-size: 14px; }
    .st-home-banner-content .cont-btn { margin-top: 16px !important; }
    .st-home-banner-content .btn-continue { width: 100%; padding: 12px; font-size: 16px; }
    .st-home-banner-right { display: none !important; }
    .st-home-service { padding: 16px 0 !important; }
    .st-service-box { padding: 16px !important; margin-bottom: 10px; }
    .st-service-box img { max-height: 40px; }
    .st-service-box h3 { font-size: 17px; margin: 8px 0 !important; }
    .st-service-box p { font-size: 13px; margin: 0; }
    /* "All Vendors" wala hissa: pizza/gola sajawat text ke upar aati thi,
       app store ke button '#' par jaate hain aur photo tooti hai */
    .st-appstore { padding: 20px 0 !important; }
    .st-appstore:after, .st-appstore-left:after { display: none !important; }
    .st-appstore-left h3 { font-size: 22px !important; }
    .st-appstore-left p { font-size: 14px !important; }
    .st-appstore-down, .st-appstore-right { display: none !important; }

    .section-footer, .section-footer p, .section-footer .text-white-50, .section-footer a.text-white-50 { color: rgba(255, 255, 255, .72) !important; }
}

/* ---- Menu se seedha cart: ADD / − n + aur "View cart" patti (js/kdk-cart.js) ---- */
.kdk-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.kdk-row .pro-price { position: static !important; margin: 0 !important; font-weight: 600; color: #222 !important; font-size: 15px; }
.kdk-ctl { display: flex; justify-content: flex-end; margin-left: auto; }
.kdk-add-btn {
    min-width: 84px;
    height: 34px;
    border: 1px solid #e71f57;
    background: #fff;
    color: #e71f57;
    font-weight: 700;
    font-size: 14px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    position: relative;
    cursor: pointer;
}
.kdk-add-btn span { position: absolute; top: 0; right: 6px; font-size: 13px; }
.kdk-stepper {
    display: inline-flex;
    align-items: center;
    height: 34px;
    background: #e71f57;
    border-radius: 8px;
    color: #fff;
    overflow: hidden;
}
.kdk-stepper button {
    width: 32px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.kdk-stepper span { min-width: 22px; text-align: center; font-weight: 700; font-size: 15px; }

.kdk-cart-bar {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translate(-50%, 150%);
    width: calc(100% - 20px);
    max-width: 480px;
    z-index: 1031;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #1f9d55;
    color: #fff !important;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    text-decoration: none !important;
    transition: transform .2s ease;
}
.kdk-cart-bar:not(.show) { visibility: hidden; }
.kdk-cart-bar.show { transform: translate(-50%, 0); }
.kdk-cart-bar-info { display: flex; flex-direction: column; line-height: 1.25; font-size: 12px; }
.kdk-cart-bar-info b { font-size: 14px; }
.kdk-cart-bar-cta { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 4px; }

#kdk-toast {
    position: fixed;
    left: 50%;
    top: 16px;
    transform: translate(-50%, -150%);
    z-index: 2000;
    background: #222;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    transition: transform .2s ease;
    max-width: calc(100% - 32px);
    text-align: center;
}
#kdk-toast.show { transform: translate(-50%, 0); }
#kdk-toast.kdk-toast-error { background: #c62828; }

@media (max-width: 767px) {
    .kdk-cart-bar { bottom: 70px; }
    body.kdk-has-cart-bar.fixed-bottom-bar { padding-bottom: 130px; }
    /* Khane ka card: ADD button daam ke saath neeche-dayen */
    .kdk-food-card .list-card-body { display: flex; flex-direction: column; height: 100%; }
    .kdk-food-card .kdk-row { margin-top: auto; padding-top: 4px; }
    .kdk-food-card .star { display: none; }
    .kdk-food-card .kdk-add-btn { min-width: 76px; height: 32px; font-size: 13px; }
}

/* ---- Site khulte hi location (js/kdk-location.js) ---- */
#kdk-loc-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, .55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#kdk-loc-overlay.show { display: flex; }
.kdk-loc-box {
    background: #fff;
    border-radius: 16px;
    padding: 24px 20px 18px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
.kdk-loc-box h5 { font-size: 18px; font-weight: 700; margin: 14px 0 6px; color: #222; }
.kdk-loc-box p { font-size: 14px; color: #555; margin: 0 0 14px; }
.kdk-loc-manual {
    border: 0;
    background: none;
    color: #e71f57;
    font-weight: 600;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}
.kdk-loc-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto;
    border: 4px solid #fde2ea;
    border-top-color: #e71f57;
    border-radius: 50%;
    animation: kdk-spin .8s linear infinite;
}
@keyframes kdk-spin { to { transform: rotate(360deg); } }
.kdk-loc-hint {
    background: #fff4e5;
    color: #8a5300;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    margin-bottom: 10px;
}
