/*
 * ============================================================
 * TWAAB — Global Responsive Stylesheet
 * Covers: Desktop (1320px+), Laptop (1200px), Tablet (991px),
 *         Mobile-L (768px), Mobile-M (576px), Mobile-S (480px),
 *         Mobile-XS (360px)
 * Load order: after all other CSS files (last in head-content)
 * ============================================================
 */

/* ============================================================
   1. BASE — Mobile-safe defaults
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

table {
  width: 100%;
}

input, select, textarea, button {
  max-width: 100%;
}

/* Prevent horizontal overflow on the whole page */
body {
  overflow-x: hidden;
}

/* Container safe padding on all sizes */
.container,
.container-fluid {
  padding-left: 16px;
  padding-right: 16px;
}

/* ============================================================
   2. LARGE DESKTOP  ≥ 1400px
   ============================================================ */
@media (min-width: 1400px) {
  .container { max-width: 1320px; }
}

/* ============================================================
   3. LAPTOP / SMALL DESKTOP  ≤ 1199px
   ============================================================ */
@media (max-width: 1199px) {

  /* Navigation */
  .shell-service-nav__link { padding: 10px 14px; font-size: 13px; }

  /* Section headings */
  .section-title, .sec-title, .fp-sec-title,
  h2.section-h2, .home-title { font-size: 22px !important; }

  /* Vendor / Product grids */
  #ec-vendor-grid  { grid-template-columns: repeat(3, 1fr) !important; }
  #od .od-vendor-grid { grid-template-columns: repeat(3, 1fr) !important; }

  /* P2P grid */
  .gp-grid-row, .p2p-grid { grid-template-columns: repeat(3, 1fr) !important; }

  /* Hero banner text */
  .fd-hero-title, .hero-title { font-size: 28px !important; }
  .fd-hero-sub, .hero-sub     { font-size: 15px !important; }

  /* Footer */
  .shell-footer__grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 28px; }
}

/* ============================================================
   4. TABLET  ≤ 991px
   ============================================================ */
@media (max-width: 991px) {

  /* ── Layout ── */
  .container { padding-left: 20px; padding-right: 20px; }

  /* ── Header ── */
  #mainHeader .desktop-only,
  .header-desktop-only { display: none !important; }

  /* ── Service nav ── */
  .shell-service-nav__inner { padding: 0 12px; }
  .shell-service-nav__link  { padding: 10px 12px; font-size: 13px; gap: 6px; }
  .shell-service-nav__link img { width: 18px; height: 18px; }

  /* ── Hero banners ── */
  .fd-hero-title, .hero-title  { font-size: 24px !important; }
  .fd-hero-sub,   .hero-sub    { font-size: 14px !important; }
  #fp .fd-hero, #ec .ec-hero,
  #od .od-hero                 { padding: 32px 20px !important; }

  /* ── Vendor / Product grids ── */
  #ec-vendor-grid  { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
  #od .od-vendor-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
  .gp-grid-row     { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }

  /* ── Product cards ── */
  .gp-card, .vendor-item, .product-item { min-width: unset !important; width: 100% !important; }

  /* ── Slick sliders ── */
  .slick-slider .slick-slide { padding: 0 6px; }

  /* ── Cart page ── */
  #cpg .row > .col-lg-8,
  #cpg .row > .col-lg-4 { flex: 0 0 100%; max-width: 100%; }
  #cpg .cart-inner-pad { padding: 16px !important; }

  /* ── Checkout page ── */
  #ckp .row > [class*='col-lg-'] { flex: 0 0 100%; max-width: 100%; }
  #ckp .order-summary-col { margin-top: 24px; }

  /* ── Login / Register ── */
  .login-page .col-lg-6,
  .register-page .col-lg-6 { flex: 0 0 100%; max-width: 100%; }
  .right-login { display: none !important; }

  /* ── Profile / Account ── */
  .profile-sidebar { margin-bottom: 24px; }
  .profile-sidebar + .col-lg-9,
  .profile-sidebar + .col-md-9 { flex: 0 0 100%; max-width: 100%; }

  /* ── P2P grid ── */
  .p2p-featured-grid,
  #p2p-newly-listed-grid,
  #p2p-featured-grid,
  #p2p-reduced-grid    { grid-template-columns: repeat(2, 1fr) !important; gap: 14px !important; }

  /* ── On-demand section ── */
  #od .od-product-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* ── Footer ── */
  .shell-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .shell-footer        { padding: 36px 0 0; margin-top: 40px; }

  /* ── Tables — horizontal scroll ── */
  .table-responsive-md { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* ── Modals ── */
  .modal-dialog { margin: 10px auto; }

  /* ── Sidebar layout ── */
  .category-sidebar { display: none !important; }
  .category-main    { flex: 0 0 100%; max-width: 100%; }

  /* ── Vendor detail page ── */
  .vendor-detail-left  { flex: 0 0 100%; max-width: 100%; margin-bottom: 20px; }
  .vendor-detail-right { flex: 0 0 100%; max-width: 100%; }

  /* ── Search results ── */
  .search-filter-sidebar { display: none; }
  .search-results-main   { flex: 0 0 100%; max-width: 100%; }
}

/* ============================================================
   5. MOBILE LARGE  ≤ 768px
   ============================================================ */
@media (max-width: 768px) {

  /* ── Layout ── */
  .container { padding-left: 16px; padding-right: 16px; }

  /* ── Typography ── */
  h1, .h1 { font-size: 26px !important; }
  h2, .h2 { font-size: 22px !important; }
  h3, .h3 { font-size: 18px !important; }
  h4, .h4 { font-size: 16px !important; }
  h5, .h5 { font-size: 14px !important; }
  p, li, td, th, label { font-size: 14px; }

  /* ── Hero sections ── */
  .fd-hero-title, .hero-title  { font-size: 22px !important; }
  .fd-hero-sub,   .hero-sub    { font-size: 13px !important; }
  #fp .fd-search-wrapper       { max-width: 100% !important; }
  .fd-hero-search              { border-radius: 10px !important; }

  /* ── Grids → single or double column ── */
  #ec-vendor-grid  { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  #od .od-vendor-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .gp-grid-row     { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .grocery-product-grid { grid-template-columns: repeat(2, 1fr) !important; }
  #od .od-product-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* ── P2P grids ── */
  .p2p-featured-grid,
  #p2p-newly-listed-grid,
  #p2p-featured-grid,
  #p2p-reduced-grid,
  #p2p-luxury-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }

  /* ── Product cards ── */
  .gp-card { min-width: 140px !important; }
  .gp-card-img { height: 120px !important; }
  .gp-card-img img { height: 120px !important; }

  /* ── Slick sliders ── */
  .menu-slider .slick-slide  { width: 90px !important; }
  .vendor-slider .slick-slide { padding: 0 5px; }

  /* ── Cart page ── */
  #cpg .vendor_products_tr .col-md-10,
  #cpg .vendor_products_tr > .col-md-2 { flex: 0 0 100%; max-width: 100%; }
  #cpg .product-img-cart { width: 60px !important; height: 60px !important; }
  #cpg .cart-header-row   { flex-wrap: wrap; gap: 8px; }

  /* ── Checkout ── */
  #ckp .typo-content .row { flex-direction: column; }
  #ckp .payment-method-row { flex-wrap: wrap; gap: 10px; }

  /* ── Login / Auth ── */
  .login-page .container,
  .register-page .container { padding: 16px; }
  .theme-card { padding: 20px 16px !important; border-radius: 12px !important; }
  .login-form  { padding: 20px 16px !important; }

  /* ── Profile account pages ── */
  .order-item-row { flex-wrap: wrap; }
  .order-item-img { width: 56px !important; height: 56px !important; }
  .account-profile-header { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* ── Search results page ── */
  .search-result-card { flex-direction: column; }
  .search-result-img  { width: 100% !important; height: 180px !important; }

  /* ── Vendor detail ── */
  .vendor-banner { height: 180px !important; }
  .vendor-detail-info-row { flex-wrap: wrap; gap: 8px; }
  .vendor-timing-badge { font-size: 11px; }

  /* ── Modals ── */
  .modal-dialog { max-width: calc(100% - 24px) !important; margin: 12px auto; }
  .modal-body   { padding: 16px !important; }
  .modal-header { padding: 12px 16px !important; }
  .modal-footer { padding: 12px 16px !important; }

  /* ── Buttons ── */
  .btn-lg, .btn-group-lg > .btn { font-size: 14px !important; padding: 10px 20px !important; }
  .btn    { min-height: 40px; }

  /* ── Tables ── */
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table thead { display: none; }
  .table tbody tr { display: block; border: 1px solid #dee2e6; border-radius: 8px; margin-bottom: 10px; padding: 8px; }
  .table tbody td { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f5f5f5; padding: 8px 4px; font-size: 13px; }
  .table tbody td::before { content: attr(data-label); font-weight: 600; color: #555; flex-shrink: 0; margin-right: 12px; }

  /* ── Category / cuisine scroll row ── */
  .category-scroll-row { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .category-scroll-row::-webkit-scrollbar { display: none; }
  .category-scroll-row > * { flex-shrink: 0; }

  /* ── Address book page ── */
  .address-card { margin-bottom: 12px; }

  /* ── Breadcrumb ── */
  .breadcrumb { font-size: 12px; }

  /* ── Footer ── */
  .shell-footer__inner  { padding: 0 16px; }
  .shell-footer__grid   { gap: 20px; }
}

/* ============================================================
   6. MOBILE MEDIUM  ≤ 576px
   ============================================================ */
@media (max-width: 576px) {

  /* ── Container ── */
  .container { padding-left: 12px; padding-right: 12px; }

  /* ── Typography ── */
  h1, .h1 { font-size: 22px !important; }
  h2, .h2 { font-size: 18px !important; }
  h3, .h3 { font-size: 16px !important; }
  body, p, li, td, th { font-size: 13px; }

  /* ── Section headers ── */
  .sec-header, .section-head { flex-direction: column; align-items: flex-start !important; gap: 8px; }

  /* ── Grids → single column ── */
  #ec-vendor-grid  { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  #od .od-vendor-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .grocery-product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  #od .od-product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }

  /* ── P2P grids ── */
  .p2p-featured-grid,
  #p2p-newly-listed-grid,
  #p2p-featured-grid,
  #p2p-reduced-grid,
  #p2p-luxury-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }

  /* ── Cards ── */
  .gp-card     { min-width: 130px !important; }
  .gp-card-img { height: 110px !important; }
  .gp-card-img img { height: 110px !important; }
  .gp-card-name { font-size: 12px !important; }
  .gp-card-price { font-size: 13px !important; }

  /* ── Hero sections ── */
  .fd-hero-title, .hero-title { font-size: 20px !important; }
  #fp .fd-hero,
  #ec .ec-hero,
  #od .od-hero { padding: 24px 12px !important; min-height: 160px !important; }

  /* ── Cart ── */
  #cpg > .container { padding-top: 8px; }
  #cpg .cart-header-row h3 { font-size: 16px !important; }
  #cpg .counter-container  { transform: scale(0.9); }

  /* ── Checkout ── */
  #ckp .checkout-section-title { font-size: 15px !important; }

  /* ── Auth forms ── */
  .theme-card, .login-form { padding: 16px 12px !important; }
  .form-control { font-size: 14px; height: 44px; }
  .btn-solid { font-size: 14px !important; padding: 10px 16px !important; }

  /* ── Profile ── */
  .profile-menu-item { padding: 10px 12px !important; }
  .order-list-item   { padding: 12px !important; }

  /* ── Modals ── */
  .modal-dialog { max-width: calc(100% - 16px) !important; margin: 8px auto; }
  .modal-content { border-radius: 12px !important; }
  .modal-body    { padding: 14px !important; }

  /* ── Tabs ── */
  .nav-tabs .nav-link { padding: 8px 12px; font-size: 13px; }

  /* ── Banners ── */
  .vendor-banner,
  .fp-banner,
  .ec-banner { height: 160px !important; border-radius: 10px !important; }

  /* ── Footer ── */
  .shell-footer__grid { grid-template-columns: 1fr; gap: 20px; }
  .shell-footer        { padding: 28px 0 0; margin-top: 32px; }
  .shell-footer__apps  { flex-wrap: wrap; gap: 8px; }
  .shell-footer__bottom { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* ── Sliders — hide arrows, use touch ── */
  .gp-slider-arrow { display: none !important; }

  /* ── Service nav ── */
  .shell-service-nav__link { padding: 9px 10px; font-size: 12px; gap: 5px; }
  .shell-service-nav__link img { width: 16px; height: 16px; }

  /* ── Address page ── */
  .address-card-actions { flex-direction: row; gap: 6px; }
}

/* ============================================================
   7. MOBILE SMALL  ≤ 480px
   ============================================================ */
@media (max-width: 480px) {

  /* ── Typography ── */
  h1, .h1 { font-size: 20px !important; }
  h2, .h2 { font-size: 17px !important; }
  body     { font-size: 13px; }

  /* ── Container ── */
  .container { padding-left: 10px; padding-right: 10px; }

  /* ── Grids — stay 2-col for cards (better than 1-col) ── */
  #ec-vendor-grid  { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  #od .od-vendor-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .gp-grid-row { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
  .grocery-product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }

  /* ── P2P grids ── */
  .p2p-featured-grid,
  #p2p-newly-listed-grid,
  #p2p-featured-grid,
  #p2p-reduced-grid,
  #p2p-luxury-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }

  /* ── Cards ── */
  .gp-card     { min-width: 120px !important; }
  .gp-card-img { height: 100px !important; }
  .gp-card-img img { height: 100px !important; }
  .gp-card-body { padding: 8px !important; }
  .gp-card-name { font-size: 11px !important; line-height: 1.3 !important; }
  .gp-card-price { font-size: 12px !important; }

  /* ── Hero ── */
  .fd-hero-title, .hero-title { font-size: 18px !important; }
  .fd-hero-sub,   .hero-sub   { font-size: 12px !important; }
  #fp .fd-hero,
  #ec .ec-hero,
  #od .od-hero { padding: 20px 10px !important; min-height: 140px !important; }

  /* ── Buttons ── */
  .btn { min-height: 38px; font-size: 13px !important; }
  .btn-sm { min-height: 32px; font-size: 12px !important; }

  /* ── Cart ── */
  #cpg .product-img-cart { width: 50px !important; height: 50px !important; }
  #cpg .counter-container { transform: scale(0.85); }

  /* ── Checkout ── */
  #ckp .payment-icon { width: 36px !important; height: 24px !important; }

  /* ── Modal ── */
  .modal-body { padding: 12px !important; }
  .modal-header { padding: 10px 12px !important; }
  .modal-title { font-size: 15px !important; }

  /* ── Sliders ── */
  .cuisine-slider .slick-slide,
  .menu-slider .slick-slide { width: 80px !important; }
  .cuisine-slider .menu-cat-name { font-size: 11px !important; }

  /* ── Service nav ── */
  .shell-service-nav__link span:not(.active-indicator) { display: none; }
  .shell-service-nav__link img { width: 20px; height: 20px; }
  .shell-service-nav__link i   { font-size: 16px; }
  .shell-service-nav__link { padding: 10px 10px; }
}

/* ============================================================
   8. MOBILE EXTRA SMALL  ≤ 360px
   ============================================================ */
@media (max-width: 360px) {

  /* ── Container ── */
  .container { padding-left: 8px; padding-right: 8px; }

  /* ── Grids ── */
  #ec-vendor-grid,
  #od .od-vendor-grid,
  .gp-grid-row,
  .grocery-product-grid,
  .p2p-featured-grid,
  #p2p-newly-listed-grid,
  #p2p-featured-grid,
  #p2p-reduced-grid,
  #p2p-luxury-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }

  /* ── Cards ── */
  .gp-card { min-width: 110px !important; }
  .gp-card-img { height: 90px !important; }
  .gp-card-img img { height: 90px !important; }

  /* ── Typography ── */
  h1, .h1 { font-size: 18px !important; }
  h2, .h2 { font-size: 16px !important; }

  /* ── Buttons ── */
  .btn { min-height: 36px; padding: 6px 12px !important; font-size: 12px !important; }
}

/* ============================================================
   9. FOOD SERVICE PAGE  #fp
   ============================================================ */
@media (max-width: 991px) {
  #fp .fp-sec-row { padding: 28px 16px 0 !important; }
  #fp .fp-sec-title { font-size: 18px !important; }
  #fp .gp-scroll { gap: 10px !important; }
  #fp .fd-hero { padding: 32px 20px !important; }
}

@media (max-width: 768px) {
  #fp .fp-sec-row { padding: 20px 12px 0 !important; }
  #fp .fp-sec-title { font-size: 16px !important; }
  #fp .gp-card { min-width: 130px !important; }
  #fp .fd-hero { min-height: 200px !important; }
  #fp .fd-hero-title { font-size: 20px !important; }
}

@media (max-width: 480px) {
  #fp .fp-sec-row { padding: 16px 10px 0 !important; }
  #fp .fd-hero { min-height: 160px !important; padding: 16px 10px !important; }
  #fp .fd-hero-title { font-size: 17px !important; }
  #fp .gp-card { min-width: 115px !important; }
}

/* ============================================================
   10. PHARMACY / GROCERY / ECOMMERCE PAGES
   ============================================================ */
@media (max-width: 991px) {
  #ph .ph-hero, #gr .gr-hero, #ec .ec-hero { padding: 32px 20px !important; }
  #ph .ph-sec-title, #gr .gr-sec-title { font-size: 18px !important; }
}

@media (max-width: 768px) {
  #ph .ph-hero, #gr .gr-hero { min-height: 180px !important; }
  #ph .ph-search-form, #gr .search-form { max-width: 100% !important; }
}

@media (max-width: 480px) {
  #ec .ec-promo-grid { grid-template-columns: 1fr !important; }
}

/* ============================================================
   11. ON-DEMAND PAGE  #od
   ============================================================ */
@media (max-width: 991px) {
  #od .od-hero { padding: 32px 20px !important; min-height: 180px !important; }
  #od .od-section-row { padding: 24px 16px 0 !important; }
  #od .od-cart-section { display: none !important; }
  #od .od-left-col { flex: 0 0 100%; max-width: 100%; }
}

@media (max-width: 768px) {
  #od .od-hero { min-height: 160px !important; padding: 24px 16px !important; }
  #od .od-vendor-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  #od .od-product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
}

@media (max-width: 480px) {
  #od .od-section-title { font-size: 15px !important; }
  #od .od-service-card { padding: 12px !important; }
}

/* ============================================================
   12. P2P PAGE  #p2p-page / .p2p-module
   ============================================================ */
@media (max-width: 991px) {
  #p2p-page .gp-card-img  { height: 140px !important; }
  #p2p-page .gp-card-img img { height: 140px !important; }
  .p2p-hero-content { padding: 32px 20px !important; }
  .p2p-stats-row { flex-wrap: wrap; gap: 8px; }
  .p2p-stats-badge { font-size: 12px !important; padding: 6px 12px !important; }
}

@media (max-width: 768px) {
  #p2p-page .gp-card-img  { height: 130px !important; }
  #p2p-page .gp-card-img img { height: 130px !important; }
  .p2p-filter-bar  { flex-wrap: wrap; gap: 8px; }
  .p2p-filter-bar input,
  .p2p-filter-bar select { width: 100% !important; }
  .p2p-section-header { flex-direction: column; align-items: flex-start !important; gap: 8px; }
}

@media (max-width: 480px) {
  #p2p-page .gp-card-img  { height: 115px !important; }
  #p2p-page .gp-card-img img { height: 115px !important; }
  #p2p-page .gp-card-name  { font-size: 11px !important; }
  .p2p-add-post-btn { width: 100% !important; text-align: center; }
}

/* ============================================================
   13. DINE-IN PAGE
   ============================================================ */
@media (max-width: 991px) {
  .dinein-vendor-info { flex-wrap: wrap; gap: 10px; }
  .dinein-table-grid  { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 768px) {
  .dinein-table-grid  { grid-template-columns: repeat(2, 1fr) !important; }
  .dinein-menu-grid   { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  .dinein-table-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ============================================================
   14. CART PAGE  #cpg
   ============================================================ */
@media (max-width: 991px) {
  #cpg .row > [class*='col-lg-'] { flex: 0 0 100%; max-width: 100%; }
  #cpg .summary-sticky { position: static !important; }
  #cpg .cart-summary { margin-top: 20px; }
}

@media (max-width: 768px) {
  #cpg .vendor_products_tr { flex-wrap: wrap; }
  #cpg .cart-product-name  { font-size: 13px !important; }
  #cpg .cart-price-col     { font-size: 14px !important; }
  #cpg .cart-coupon-row    { flex-wrap: wrap; gap: 8px; }
  #cpg .cart-coupon-row input  { flex: 1; min-width: 0; }
  #cpg .cart-coupon-row button { flex-shrink: 0; }
}

@media (max-width: 480px) {
  #cpg .cart-header-title { font-size: 15px !important; }
  #cpg .cart-qty-box      { min-width: 80px; }
}

/* ============================================================
   15. CHECKOUT PAGE  #ckp
   ============================================================ */
@media (max-width: 991px) {
  #ckp > .container > .row { flex-direction: column; }
  #ckp .checkout-left,
  #ckp .checkout-right { flex: 0 0 100%; max-width: 100%; }
  #ckp .checkout-right  { margin-top: 20px; }
}

@media (max-width: 768px) {
  #ckp .address-card { padding: 12px !important; }
  #ckp .payment-row  { flex-wrap: wrap; gap: 8px; }
  #ckp .payment-row label { font-size: 13px; }
  #ckp .place-order-btn { width: 100% !important; font-size: 15px !important; }
}

@media (max-width: 480px) {
  #ckp .order-summary-item { font-size: 13px; }
  #ckp .order-total-row { font-size: 15px !important; }
}

/* ============================================================
   16. SEARCH RESULTS PAGE
   ============================================================ */
@media (max-width: 991px) {
  .search-page-layout { flex-direction: column; }
  .search-filter-col  { flex: 0 0 100%; max-width: 100%; margin-bottom: 16px; }
  .search-result-col  { flex: 0 0 100%; max-width: 100%; }
  #search-filter-sidebar { display: none; }
}

@media (max-width: 768px) {
  .search-result-vendor-card { flex-direction: column; }
  .search-result-vendor-img  { width: 100% !important; height: 140px !important; border-radius: 10px 10px 0 0; }
  .search-result-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
}

@media (max-width: 480px) {
  .search-result-grid { grid-template-columns: 1fr !important; }
}

/* ============================================================
   17. AUTH PAGES (Login / Register / Forgot Password)
   ============================================================ */
@media (max-width: 991px) {
  .login-page .row  { flex-direction: column; }
  .login-page .col-lg-6 { flex: 0 0 100%; max-width: 100%; }
  .right-login { display: none !important; }
  .login-banner-col { display: none !important; }
}

@media (max-width: 768px) {
  .theme-card  { padding: 24px 16px !important; }
  .login-form  { padding: 0 !important; }
  .login-title { font-size: 22px !important; }
  .login-sub   { font-size: 13px !important; }
}

@media (max-width: 480px) {
  .theme-card  { padding: 16px 12px !important; border-radius: 12px !important; }
  .form-control, .form-select { font-size: 14px !important; height: 44px !important; }
  .btn-solid, .btn-primary { width: 100% !important; }
  .social-login-row { flex-direction: column; gap: 8px; }
  .social-login-btn { width: 100% !important; }
}

/* ============================================================
   18. PROFILE / ACCOUNT PAGES
   ============================================================ */
@media (max-width: 991px) {
  .account-layout > .row { flex-direction: column; }
  .account-sidebar  { flex: 0 0 100%; max-width: 100%; margin-bottom: 16px; }
  .account-main     { flex: 0 0 100%; max-width: 100%; }
  .profile-menu-list { display: flex; overflow-x: auto; gap: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .profile-menu-list::-webkit-scrollbar { display: none; }
  .profile-menu-item { flex-shrink: 0; }
}

@media (max-width: 768px) {
  .order-row      { flex-wrap: wrap; gap: 10px; }
  .order-row-img  { width: 60px !important; height: 60px !important; }
  .order-actions  { flex-wrap: wrap; gap: 6px; }
  .order-status-badge { font-size: 11px !important; padding: 4px 10px !important; }
  .profile-stats-row  { flex-wrap: wrap; gap: 10px; }
  .profile-stat-card  { flex: 1 1 calc(50% - 8px); min-width: 120px; }
}

@media (max-width: 480px) {
  .profile-stat-card   { flex: 1 1 100%; }
  .notification-item   { flex-wrap: wrap; gap: 8px; }
  .notification-icon   { flex-shrink: 0; }
  .transaction-row     { flex-direction: column; align-items: flex-start !important; gap: 4px; }
}

/* ============================================================
   19. PRODUCT DETAIL PAGE
   ============================================================ */
@media (max-width: 991px) {
  .product-detail-row { flex-direction: column; }
  .product-detail-img-col  { flex: 0 0 100%; max-width: 100%; }
  .product-detail-info-col { flex: 0 0 100%; max-width: 100%; margin-top: 20px; }
}

@media (max-width: 768px) {
  .product-main-img   { height: 280px !important; }
  .product-thumb-row  { gap: 6px !important; }
  .product-thumb      { width: 56px !important; height: 56px !important; }
  .product-title      { font-size: 18px !important; }
  .product-price      { font-size: 20px !important; }
  .product-add-row    { flex-wrap: wrap; gap: 8px; }
  .product-add-row .btn { flex: 1; min-width: 0; }
}

@media (max-width: 480px) {
  .product-main-img   { height: 220px !important; }
  .product-title      { font-size: 16px !important; }
  .product-price      { font-size: 18px !important; }
  .product-detail-tabs .nav-link { padding: 8px 10px; font-size: 12px; }
}

/* ============================================================
   20. VENDOR DETAIL PAGE
   ============================================================ */
@media (max-width: 991px) {
  .vendor-detail-main-row { flex-direction: column; }
  .vendor-menu-sidebar { flex: 0 0 100%; max-width: 100%; }
  .vendor-product-list { flex: 0 0 100%; max-width: 100%; }
}

@media (max-width: 768px) {
  .vendor-info-banner { height: 160px !important; }
  .vendor-logo-wrap   { width: 64px !important; height: 64px !important; }
  .vendor-name        { font-size: 18px !important; }
  .vendor-meta-row    { flex-wrap: wrap; gap: 6px; }
  .vendor-meta-badge  { font-size: 11px !important; }
}

/* ============================================================
   21. MODAL OVERRIDES (common)
   ============================================================ */
@media (max-width: 576px) {
  .modal-dialog-centered { align-items: flex-end; }
  .modal-dialog-centered .modal-content { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important; }
  .modal-dialog { margin: 0 auto; max-width: 100% !important; }

  /* Product variant / addon modals */
  .product-modal-body { max-height: 65vh; overflow-y: auto; }
  .variant-option-row { flex-wrap: wrap; gap: 8px; }
  .addon-item         { flex-wrap: wrap; gap: 6px; }
}

/* ============================================================
   22. TABLES — Responsive override (global)
   ============================================================ */
@media (max-width: 768px) {
  /* Remove stacked table style for tables that have .table-normal class */
  .table-normal thead { display: table-header-group !important; }
  .table-normal tbody tr { display: table-row !important; border: none !important; border-radius: 0 !important; }
  .table-normal tbody td { display: table-cell !important; border-bottom: 1px solid #dee2e6 !important; padding: 8px !important; }
  .table-normal tbody td::before { display: none !important; }

  /* Admin tables in frontend (orders list, etc.) */
  .orders-table,
  .transaction-table { overflow-x: auto; display: block; }
}

/* ============================================================
   23. FORMS — Mobile optimizations
   ============================================================ */
@media (max-width: 576px) {
  .form-group, .mb-3, .mb-4 { margin-bottom: 12px !important; }
  .form-label { font-size: 13px; margin-bottom: 4px; font-weight: 600; }
  .form-control, .form-select { font-size: 14px; padding: 10px 14px; height: auto !important; min-height: 44px; }
  .input-group > .form-control,
  .input-group > .form-select { font-size: 14px; }
  .input-group-text { padding: 10px 12px; font-size: 14px; }
}

/* ============================================================
   24. NAVIGATION & TABS — Mobile
   ============================================================ */
@media (max-width: 576px) {
  .nav-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; scrollbar-width: none; }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .nav-tabs .nav-item { flex-shrink: 0; }
  .nav-tabs .nav-link { white-space: nowrap; padding: 8px 14px; font-size: 13px; }
}

/* ============================================================
   25. PAGINATION — Mobile
   ============================================================ */
@media (max-width: 576px) {
  .pagination { flex-wrap: wrap; gap: 4px; justify-content: center; }
  .page-link  { padding: 6px 10px; font-size: 13px; min-width: 36px; text-align: center; }
}

/* ============================================================
   26. IMAGES — Global responsive safety
   ============================================================ */
.img-fluid, .responsive-img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Prevent oversized images in cards */
.gp-card img,
.product-card img,
.vendor-card img,
.search-result-img img {
  width: 100%;
  object-fit: cover;
}

/* Lazy-loaded images */
img.blur-up { filter: blur(5px); transition: filter 0.4s; }
img.blur-up.lazyloaded { filter: blur(0); }

/* ============================================================
   27. UTILITY HELPERS
   ============================================================ */

/* Horizontal scroll containers (cuisines, categories, chips) */
.h-scroll {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 10px;
  padding-bottom: 4px;
}
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll > * { flex-shrink: 0; }

/* Prevent text overflow on small screens */
.text-truncate-mobile {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 576px) {
  .hide-mobile  { display: none !important; }
  .show-mobile  { display: block !important; }
  .flex-mobile  { display: flex !important; }
}

@media (min-width: 577px) {
  .hide-desktop  { display: none !important; }
  .show-desktop  { display: block !important; }
}

/* Touch-friendly tap targets */
@media (max-width: 768px) {
  .btn { line-height: 1.5; }
}

/* ============================================================
   28. DARK MODE adjustments (mobile)
   ============================================================ */
@media (max-width: 768px) {
  body.dark .gp-card   { background: #1e1e1e; border-color: #333; }
  body.dark .theme-card { background: #1e1e1e; border-color: #333; }
  body.dark .modal-content { background: #1e1e1e; }
  body.dark .modal-header  { border-bottom-color: #333; }
  body.dark .modal-footer  { border-top-color: #333; }
  body.dark .form-control,
  body.dark .form-select   { background: #2a2a2a; border-color: #444; color: #e5e5e5; }
  body.dark .nav-tabs .nav-link { color: #aaa; }
  body.dark .nav-tabs .nav-link.active { color: var(--theme-deafult); }
}

/* ============================================================
   29. PRINT — Hide non-essential items
   ============================================================ */
@media print {
  #mainHeader, .shell-service-nav, .shell-footer,
  #shellDrawer, #shellDrawerOverlay,
  .btn-back, .shell-drawer { display: none !important; }
  body { font-size: 12pt; }
  .container { max-width: 100%; padding: 0; }
}

/* ============================================================
   30. ACCESSIBILITY — Focus visible on mobile
   ============================================================ */
@media (max-width: 768px) {
  :focus-visible {
    outline: 2px solid var(--theme-deafult, #c41d49);
    outline-offset: 2px;
  }
}
