/* =====================================================================================
   /quickorder - Aasaan Mart multi-vendor Quick Order page (listing/tradex_orders_add_mart.jsp)

   This page has ONE fixed design, owned by Aasaan (it is not an organisation storefront, so
   there is no theme picker and no per-org palette). It is deliberately independent of the
   /store/{org} page and store-themes.css - do not link or share styles between the two.

   Layout: shared top bar -> hero search band -> sticky vendor rail + product grid ->
   footer. Cart, requirement and contact details live in a slide-in drawer (#checkoutSidebar),
   opened from the top-bar cart button or the floating cart bar.
   ===================================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --vd-topbar-h: 64px;

    /* Indigo - same as the shared Aasaan Mart navbar Login button */
    --accent: #5b5ef4;
    --accent-dark: #4749c8;
    --accent-light: #8b8ef8;
    --accent-bg: #f0f0fe;
    --accent-border: #c7c8fb;
    --accent-glow: rgba(91, 94, 244, 0.16);

    --surface: #ffffff;
    --surface-warm: #faf7f4;
    --page-bg: #f7f4f0;
    --border: #e7e1d9;
    --border-light: #f0ebe4;
    --text-primary: #1f1b16;
    --text-secondary: #5f5850;
    --text-muted: #9a9087;
    --danger: #c0392b;
    --success: #1f8a4c;
    --success-dark: #176b3a;
    --success-bg: #effaf3;

    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 3px rgba(31, 27, 22, 0.05), 0 1px 2px rgba(31, 27, 22, 0.04);
    --shadow-md: 0 6px 20px rgba(31, 27, 22, 0.07), 0 1px 3px rgba(31, 27, 22, 0.05);
    --shadow-lg: 0 18px 50px rgba(31, 27, 22, 0.14), 0 3px 8px rgba(31, 27, 22, 0.06);

    /* Wide page: on big screens use the side space instead of leaving empty margins. */
    --qo-max: 1840px;
    --qo-pad: 32px;
    --qo-rail-w: 420px;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background: var(--page-bg) !important;
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

@keyframes qoFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes qoRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes qoBump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes qoShimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d8d1c8; border-radius: 4px; }

/* ===== FULL PAGE OVERRIDES - kill ERP shell remnants from head.jsp ===== */
html, body { margin: 0 !important; padding: 0 !important; width: 100% !important; }
/* The WINDOW must be the page scroller (infinite product loading, the sticky vendor rail and
   scroll-to-catalogue all rely on it). head.jsp gives html/body height:100%; with overflow-x
   hidden on both, <body> silently became its own scroll box and window.scrollY stayed 0.
   So: auto heights, horizontal overflow hidden on <html> only, and "clip" (which does not
   create a scroll container) on <body>. */
html { height: auto !important; overflow-x: hidden; }
body { height: auto !important; min-height: 100vh; overflow-x: clip !important; overflow-y: visible !important; }
body { padding-left: 0 !important; margin-left: 0 !important; padding-top: var(--vd-topbar-h) !important; }
.app-content, .content-wrapper, .content-body,
.container-fluid, .vertical-menu-modern,
.main-panel, .wrapper, #main-panel { padding: 0 !important; margin: 0 !important; }
.form-section { display: none !important; }
/* The ERP's own footer bar (common-secure/footer.jsp) - this page has its own footer */
footer.footer.footer-static { display: none !important; }
.card { background: transparent !important; border: none !important; box-shadow: none !important; border-radius: 0 !important; }
.card-body, .card-block { padding: 0 !important; }
.card-title { display: none !important; }
form .form-group { margin-bottom: 0 !important; }
a, a:hover { text-decoration: none; }

/* =====================================================================================
   TOP BAR (shared Aasaan Mart nav) + cart button
   ===================================================================================== */
.vd-topbar { background: var(--surface); border-bottom: 1px solid var(--border-light); padding: 12px 48px; position: fixed; top: 0; left: 0; right: 0; width: 100%; z-index: 50; }
.vd-topbar .inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vd-topbar-logo { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.vd-topbar-logo img { height: 28px; display: block; }
.vd-topbar-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.vd-topbar-brand-name { font-size: 17px; font-weight: 800; color: var(--text-primary); }
.vd-topbar-brand-sub { font-size: 9.5px; font-weight: 600; color: var(--text-muted); letter-spacing: .4px; text-transform: uppercase; }
.vd-topbar-links { display: flex; align-items: center; gap: 6px; }
.vd-topbar-links a {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700;
    color: var(--text-secondary); padding: 9px 14px; border-radius: var(--radius-sm); transition: all .15s; white-space: nowrap;
}
.vd-topbar-links a:hover { background: var(--accent-bg); color: var(--accent); }
.vd-topbar-links a.vd-topbar-mart { color: #e8590c; }
.vd-topbar-links a.vd-topbar-mart:hover { background: #fff1e6; color: #e8590c; }
/* Login: the shared Aasaan Mart navbar indigo (same as /aasaanmart and /store) */
.vd-topbar-links a.vd-topbar-login { background: var(--accent); color: #fff; padding: 9px 20px; }
.vd-topbar-links a.vd-topbar-login:hover { background: var(--accent-dark); color: #fff; }
.vd-login-wrap { position: relative; }
.vd-login-dropdown {
    display: none; position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--surface); border: 1px solid var(--border-light); border-radius: 12px;
    box-shadow: var(--shadow-lg); width: 210px; padding: 8px; z-index: 20; text-align: left;
}
.vd-login-dropdown.open { display: block; }
.vd-login-option {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13px; font-weight: 600;
    color: var(--text-primary) !important; border-radius: 8px; cursor: pointer;
}
.vd-login-option i { color: var(--accent); width: 14px; }
.vd-login-option:hover { background: var(--accent-bg) !important; color: var(--accent) !important; }
.vd-login-option-sub { display: block; font-size: 10.5px; font-weight: 500; color: var(--text-muted); }
.vd-topbar-profile {
    display: inline-flex; align-items: center; gap: 8px; background: var(--accent-bg) !important;
    border: 1px solid var(--accent-border); border-radius: 999px !important; padding: 6px 8px 6px 14px !important;
    font-size: 12.5px; font-weight: 700; color: var(--accent) !important;
}
.vd-topbar-profile .avatar {
    width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800;
}
.vd-topbar-profile .name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.qo-cart-btn {
    position: relative; display: inline-flex; align-items: center; gap: 8px;
    height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer;
    border: 1.5px solid var(--border); background: var(--surface); color: var(--text-primary);
    font: 700 12.5px 'Plus Jakarta Sans', sans-serif; transition: border-color .15s, color .15s, background .15s;
}
.qo-cart-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.qo-cart-btn i { font-size: 14px; }
.qo-cart-badge {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff;
    font: 800 11px/20px 'Plus Jakarta Sans', sans-serif; text-align: center;
}
.qo-cart-badge.is-empty { background: #e9e3dc; color: var(--text-muted); }
.qo-cart-badge.bump { animation: qoBump .35s ease; }

@media (max-width: 760px) { .vd-topbar-brand-sub { display: none; } .vd-topbar-links > a > span, .qo-cart-btn .qo-cart-label { display: none; } }
@media (max-width: 480px) {
    .vd-topbar { padding: 10px 12px; }
    .vd-topbar .inner { flex-wrap: nowrap; gap: 6px; }
    .vd-topbar-logo { gap: 5px; flex-shrink: 0; }
    .vd-topbar-logo img { height: 20px; }
    .vd-topbar-brand-name { font-size: 14px; }
    .vd-topbar-links { gap: 2px; flex-shrink: 0; }
    .vd-topbar-links a { padding: 7px 8px; font-size: 12px; }
    .vd-topbar-links a.vd-topbar-login { padding: 7px 12px; }
    .vd-topbar-profile .name { max-width: 54px; }
    .qo-cart-btn { padding: 0 10px; height: 34px; }
}

/* =====================================================================================
   HERO SEARCH BAND
   (no overflow:hidden anywhere up the tree - the search-suggest dropdown hangs below the input)
   ===================================================================================== */
.qo-hero {
    position: relative;
    background:
        radial-gradient(900px 260px at 85% -40%, rgba(91, 94, 244, 0.14), transparent 70%),
        radial-gradient(700px 240px at 0% 120%, rgba(139, 142, 248, 0.12), transparent 70%),
        linear-gradient(180deg, #f4f4ff 0%, #fcfcff 100%);
    border-bottom: 1px solid var(--border-light);
}
.qo-hero-inner { max-width: var(--qo-max); margin: 0 auto; padding: 30px var(--qo-pad) 22px; }
.qo-hero-text { max-width: 760px; margin-bottom: 18px; }
.qo-eyebrow {
    display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--accent-border); color: var(--accent-dark);
    font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.qo-hero h1 {
    margin: 12px 0 6px; font-size: clamp(24px, 3.2vw, 36px); line-height: 1.15; font-weight: 800;
    letter-spacing: -0.02em; color: var(--text-primary);
}
.qo-hero h1 em { font-style: normal; color: var(--accent); }
.qo-hero p.qo-lead { font-size: 15px; line-height: 1.55; color: var(--text-secondary); }

/* The big search bar: [search .......][state][city][Search] in one white pill */
.qo-searchbar {
    display: flex; align-items: stretch; gap: 0; background: var(--surface);
    border: 1.5px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-md);
    padding: 6px; transition: border-color .2s, box-shadow .2s;
}
.qo-searchbar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow), var(--shadow-md); }
.item-search-wrap { display: flex; flex: 1; min-width: 0; position: relative; align-items: center; }
.item-search-wrap .qo-search-icon { position: absolute; left: 16px; color: var(--text-muted); font-size: 15px; pointer-events: none; }
.item-search-wrap input[type="text"] {
    flex: 1; width: 100%; height: 50px; padding: 0 40px 0 44px; border: 0; background: transparent;
    color: var(--text-primary); font: 500 15.5px 'Plus Jakarta Sans', sans-serif; outline: none;
}
.item-search-wrap input::placeholder { color: var(--text-muted); font-weight: 400; }
.item-search-wrap .clear-btn {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; border: none; border-radius: 50%; background: transparent; color: var(--text-muted);
    font-size: 14px; cursor: pointer; display: none; align-items: center; justify-content: center;
}
.item-search-wrap .clear-btn:hover { color: var(--danger); background: #fdecea; }

.location-filter-wrap { display: flex; align-items: center; gap: 0; flex-shrink: 0; border-left: 1px solid var(--border-light); padding-left: 4px; }
.location-filter-wrap .qo-loc-icon { color: var(--accent); font-size: 13px; margin: 0 2px 0 10px; }
.location-filter-wrap .select2-container { width: 150px !important; min-width: 150px !important; max-width: 150px !important; }
.location-filter-wrap .select2-container--default .select2-selection--single {
    height: 50px !important; border: 0 !important; background: transparent !important; border-radius: 10px !important;
    display: flex !important; align-items: center !important; position: relative;
}
.location-filter-wrap .select2-container--default .select2-selection--single:hover { background: var(--surface-warm) !important; }
.location-filter-wrap .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: normal !important; font-size: 13px !important; font-weight: 600; color: var(--text-secondary) !important; padding-left: 10px !important;
}
.location-filter-wrap .select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--text-secondary) !important; }
.location-filter-wrap .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important; top: 0 !important; display: flex !important; align-items: center !important;
}
.location-filter-wrap .qo-loc-sep { width: 1px; height: 26px; background: var(--border-light); margin: 0 2px; }

.qo-search-go {
    flex-shrink: 0; margin-left: 6px; height: 50px; padding: 0 26px; border: 0; border-radius: 12px;
    background: var(--accent); color: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
    font: 700 14.5px 'Plus Jakarta Sans', sans-serif; transition: background .15s, transform .15s;
}
.qo-search-go:hover { background: var(--accent-dark); }
.qo-search-go:active { transform: scale(.98); }

.qo-geo-slot:empty { display: none; }
.qo-geo-slot { margin-top: 8px; }

/* Distance chips (rendered by aasaanmart_distance_filter.js) - recoloured to the page accent */
.qo-distance { margin-top: 12px; }
.qo-distance:empty { display: none; }
.qo-distance .adf-bar.adf-light .adf-chip:hover { border-color: var(--accent-light); color: var(--accent); }

/* How it works - one slim line */
.qo-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 16px; list-style: none; }
.qo-steps li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.qo-steps li b {
    width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--accent-border);
    color: var(--accent); font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.qo-steps li + li::before { content: "\f054"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900; font-size: 9px; color: #d6cbc0; margin-right: 12px; }

/* =====================================================================================
   BODY: VENDOR RAIL + CATALOGUE
   ===================================================================================== */
/* Desktop: the rail + catalogue block is exactly one screen tall, and the vendor list and the
   product grid each scroll on their own. The wheel over products scrolls products, over vendors
   scrolls vendors, anywhere else (hero, side margins, footer) scrolls the page. On tablet/phone
   (<= 900px, see the media query) everything goes back to a single page scroll. */
#formDiv { max-width: var(--qo-max); margin: 0 auto; padding: 16px var(--qo-pad) 24px; }
.qo-body {
    display: grid; grid-template-columns: var(--qo-rail-w) minmax(0, 1fr); gap: 24px; align-items: stretch;
    height: calc(100vh - var(--vd-topbar-h) - 32px); min-height: 460px;
}

/* ---- vendor rail ---- */
.qo-rail {
    display: flex; flex-direction: column; min-height: 0;
    background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.qo-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 16px 12px; border-bottom: 1px solid var(--border-light); }
.qo-rail-title { font-size: 14px; font-weight: 800; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.qo-rail-title i { color: var(--accent); }
.qo-rail-hint { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.vendor-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; background: var(--surface-warm); border-radius: 0 0 var(--radius) var(--radius); }

/* Vendor card: avatar | name / category / address / stars / GSTIN + product count */
.vendor-card {
    position: relative; display: flex; align-items: flex-start; gap: 14px;
    background: var(--surface); border: 1.5px solid var(--border-light); border-radius: 14px; padding: 14px 16px;
    margin-bottom: 10px; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
    animation: qoFadeIn .25s ease-out;
}
.vendor-card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.vendor-card.selected { background: var(--accent-bg); border-color: var(--accent); box-shadow: 0 6px 18px var(--accent-glow); }
.vendor-card.selected::before {
    content: ""; position: absolute; left: -1.5px; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent);
}
.vendor-card .qo-vc-avatar {
    flex: none; width: 46px; height: 46px; border-radius: 13px; color: #fff;
    background: linear-gradient(135deg, var(--accent-light), var(--accent-dark));
    display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800;
    box-shadow: 0 4px 10px var(--accent-glow);
}
.vendor-card.selected .qo-vc-avatar { box-shadow: 0 0 0 3px #fff, 0 4px 10px var(--accent-glow); }
.qo-vc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.vendor-card-name { font-size: 15px; font-weight: 800; color: var(--text-primary); line-height: 1.3; overflow-wrap: anywhere; }
.vendor-card-category {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
    font-size: 11.5px; font-weight: 700; color: var(--accent-dark);
    background: var(--accent-bg); border: 1px solid var(--accent-border); border-radius: 999px; padding: 3px 10px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vendor-card.selected .vendor-card-category { background: #fff; }
.vendor-card-category i { font-size: 9.5px; }
.vendor-card-address { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; line-height: 1.45; color: var(--text-secondary); }
.vendor-card-address i { flex: none; margin-top: 3px; font-size: 11px; color: var(--accent); }
.vendor-card-address span { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.vendor-card-rating { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); }
.vendor-card-rating .vc-stars { color: #f5a623; letter-spacing: 1.5px; font-size: 13.5px; }
.vendor-card-rating strong { font-weight: 800; color: var(--text-primary); }
.qo-vc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.vendor-card-foot { display: flex; margin-top: 3px; }
.vendor-card-tag {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--success-bg); border: 1px solid #bfe6cd; color: var(--success-dark);
    font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .02em;
}
.vendor-card-tag i { font-size: 10px; }
.vendor-card-count {
    flex: none; margin-top: 1px; padding: 2px 8px; border-radius: 999px; background: var(--surface-warm); border: 1px solid var(--border-light);
    font-size: 11px; font-weight: 700; color: var(--text-muted); white-space: nowrap;
}
.vendor-card.selected .vendor-card-count { background: #fff; }
#vendorListEmpty, #vendorListLoading, #vendorListPlaceholder { font-size: 13px; color: var(--text-muted); text-align: center; padding: 36px 12px; line-height: 1.7; }
#vendorListLoading i { color: var(--accent); }

/* ---- catalogue ---- */
.qo-catalog { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.qo-catalog-head { flex: none; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 12px; }
.qo-catalog-title { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; color: var(--text-primary); line-height: 1.25; }
.qo-catalog-sub { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

/* Selected vendor strip - "Ordering from X" */
.selected-vendor-badge {
    display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border-radius: 14px;
    background: var(--surface); border: 1.5px solid var(--accent-border); box-shadow: var(--shadow-sm);
    animation: qoRise .25s ease-out;
}
.qo-sv-avatar {
    width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; color: #fff; font-size: 16px; font-weight: 800;
    background: linear-gradient(135deg, var(--accent-light), var(--accent-dark)); display: flex; align-items: center; justify-content: center;
}
.qo-sv-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.qo-sv-text small { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.qo-sv-text strong { font-size: 14px; font-weight: 800; color: var(--text-primary); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit-store-btn {
    display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: 4px;
    background: var(--accent-bg); color: var(--accent-dark); border: 1px solid var(--accent-border); border-radius: 10px;
    padding: 8px 12px; font-size: 12px; font-weight: 700; transition: background .15s, color .15s;
}
.visit-store-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.visit-store-btn i { font-size: 10px; }

/* ---- product grid ---- */
/* The product scroll box. The padding (cancelled by negative margins) leaves room for the card
   hover lift and shadow, so they aren't clipped at the box edges. */
.items-grid-wrap {
    flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
    padding: 6px 8px 24px 6px; margin: -6px -8px 0 -6px;
    container-type: inline-size; container-name: qoitems;
}
#itemGrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: start; }
@container qoitems (min-width: 1100px) { #itemGrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@container qoitems (min-width: 1360px) { #itemGrid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@container qoitems (max-width: 819.98px) { #itemGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container qoitems (max-width: 559.98px) { #itemGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

#itemGridEmpty, #itemGridPlaceholder, #itemGridLoadingMore {
    font-size: 13.5px; color: var(--text-muted); text-align: center; padding: 60px 20px; grid-column: 1 / -1; line-height: 1.7;
}
#itemGridLoadingMore { padding: 18px 0; }
#itemGridEmpty { background: var(--surface); border: 1.5px dashed var(--border); border-radius: var(--radius); }
#itemGridEmpty::before { content: "\f002"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900; display: block; font-size: 26px; color: #d6cbc0; margin-bottom: 8px; }
/* First-page loading: a skeleton grid instead of a spinner line */
#itemGridLoading { grid-column: 1 / -1; display: contents; font-size: 0; color: transparent; }
#itemGridLoading i { display: none; }
.qo-skel {
    border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-light); padding: 10px; overflow: hidden;
}
.qo-skel span {
    display: block; border-radius: 8px; margin-bottom: 10px;
    background: linear-gradient(90deg, #f3eee8 0px, #faf7f3 120px, #f3eee8 240px) #f3eee8; background-size: 800px 100%;
    animation: qoShimmer 1.2s linear infinite;
}
.qo-skel span:nth-child(1) { aspect-ratio: 1 / 1; }
.qo-skel span:nth-child(2) { height: 13px; width: 85%; }
.qo-skel span:nth-child(3) { height: 13px; width: 50%; }
.qo-skel span:nth-child(4) { height: 36px; margin: 6px 0 0; }

.prod-card {
    position: relative; z-index: 1; display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius);
    padding: 10px; text-align: left; cursor: pointer; box-shadow: var(--shadow-sm);
    transition: border-color .18s, box-shadow .18s, transform .18s; animation: qoRise .25s ease-out;
}
.prod-card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-md); transform: translateY(-3px); z-index: 3; }
.prod-card.in-cart { border-color: var(--success); box-shadow: 0 0 0 1px var(--success), var(--shadow-sm); }
.prod-card.in-cart::after {
    content: "\f00c"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900;
    position: absolute; top: 16px; right: 16px; z-index: 4; width: 24px; height: 24px; border-radius: 50%;
    background: var(--success); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
.prod-img-wrap {
    width: 100%; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px; overflow: hidden; border-radius: 11px; background: var(--surface-warm); position: relative;
}
.prod-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.prod-card:hover .prod-img { transform: scale(1.04); }
.prod-img-wrap.prod-carousel { cursor: zoom-in; }
.prod-img-wrap.prod-carousel .prod-img-slide {
    position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
    object-fit: cover; opacity: 0; transition: opacity .45s ease; pointer-events: none;
}
.prod-img-wrap.prod-carousel .prod-img-slide.active { opacity: 1; pointer-events: auto; }
.prod-img-wrap.prod-img-clickable { cursor: zoom-in; }
.prod-carousel-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 26px; height: 26px; border-radius: 50%; border: none;
    background: rgba(255, 255, 255, .9); color: var(--text-primary); font-size: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: .85; transition: opacity .15s;
}
.prod-carousel-nav:hover { opacity: 1; }
.prod-carousel-prev { left: 6px; }
.prod-carousel-next { right: 6px; }
.prod-carousel-dots { position: absolute; bottom: 8px; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; gap: 5px; }
.prod-carousel-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); cursor: pointer; transition: transform .15s, background .15s; }
.prod-carousel-dot.active { background: #fff; transform: scale(1.35); }
/* No-photo placeholder: the orange Aasaan Mart logo */
.prod-logo-fb { width: 40%; height: 40%; object-fit: contain; display: block; opacity: .55; }

.prod-card .prod-name {
    padding: 0 4px; font-size: 13.5px; font-weight: 700; color: var(--text-primary); line-height: 1.35; height: 2.7em; margin-bottom: 4px;
    overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.prod-vendor-name {
    padding: 0 4px; font-size: 11.5px; font-weight: 600; color: var(--accent-dark); margin-bottom: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prod-vendor-name::before { content: "\f54e"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900; font-size: 9.5px; margin-right: 5px; opacity: .8; }
.prod-card .prod-desc {
    padding: 0 4px; font-size: 11.5px; line-height: 1.4; color: var(--text-muted); margin-bottom: 8px; height: 2.8em;
    overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.prod-card .prod-price {
    padding: 0 4px; margin-top: auto; margin-bottom: 10px; min-height: 20px; line-height: 20px; overflow-wrap: anywhere;
    font-size: 15px; font-weight: 800; color: var(--text-primary);
}
.prod-card .prod-price-na { font-size: 12px; font-weight: 600; color: var(--text-muted); }

/* Card action: full-width Add button, or a qty stepper once the item is in the cart */
.qo-card-action { height: 38px; }
.prod-card .prod-add-btn {
    width: 100%; height: 38px; border: 1.5px solid var(--accent); border-radius: 10px; background: var(--surface); color: var(--accent);
    font: 700 13px 'Plus Jakarta Sans', sans-serif; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px;
    transition: background .15s, color .15s;
}
.prod-card:hover .prod-add-btn, .prod-card .prod-add-btn:hover { background: var(--accent); color: #fff; }
.qo-stepper {
    display: flex; align-items: center; justify-content: space-between; height: 38px; border-radius: 10px;
    background: var(--success); color: #fff; overflow: hidden; cursor: default;
}
.qo-step-btn {
    width: 40px; height: 100%; border: 0; background: transparent; color: #fff; cursor: pointer; font-size: 12px;
    display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.qo-step-btn:hover { background: var(--success-dark); }
.qo-step-qty { font-size: 14px; font-weight: 800; }
.qo-step-qty small { font-size: 10.5px; font-weight: 600; opacity: .85; margin-left: 3px; }

/* =====================================================================================
   CHECKOUT DRAWER (#checkoutSidebar)
   ===================================================================================== */
.qo-drawer-overlay {
    position: fixed; inset: 0; z-index: 1190; background: rgba(24, 18, 12, .45); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .28s ease;
}
.qo-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1200; width: min(480px, 100vw);
    display: flex; flex-direction: column; background: var(--surface); box-shadow: -12px 0 40px rgba(24, 18, 12, .18);
    transform: translateX(105%); visibility: hidden;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .3s;
}
html.qo-drawer-open .qo-drawer { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
html.qo-drawer-open .qo-drawer-overlay { opacity: 1; pointer-events: auto; }
html.qo-drawer-open { overflow: hidden !important; }

.qo-drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border-light); }
.qo-drawer-head .qo-dh-icon {
    width: 38px; height: 38px; border-radius: 11px; background: var(--accent-bg); color: var(--accent);
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.qo-drawer-head .qo-dh-text { flex: 1; min-width: 0; }
.qo-drawer-head .qo-dh-title { font-size: 17px; font-weight: 800; color: var(--text-primary); }
.qo-drawer-head .qo-dh-sub { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qo-drawer-close {
    width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface-warm); color: var(--text-secondary);
    font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s;
}
.qo-drawer-close:hover { background: #fdecea; color: var(--danger); }

.right-col-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 24px; }
.qo-section-title {
    display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
    font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-secondary);
}
.qo-section-title i { color: var(--accent); font-size: 12px; }
.qo-section-title #cartCount { color: var(--accent); font-weight: 700; letter-spacing: 0; text-transform: none; }
.qo-section + .qo-section { margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--border); }

.cart-item-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center;
    padding: 12px 0; border-bottom: 1px solid var(--border-light); font-size: 13px; animation: qoFadeIn .2s ease-out;
}
.cart-item-row:first-child { padding-top: 2px; }
.cart-item-top { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 8px; }
.cart-item-bottom { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cart-item-name {
    flex: 1; min-width: 0; font-weight: 700; color: var(--text-primary); line-height: 1.35; overflow-wrap: anywhere;
    overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.cart-item-total { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.cart-item-amount { font-weight: 800; color: var(--text-primary); white-space: nowrap; }
.cart-item-price { font-size: 11px; color: var(--text-muted); }
.cart-qty-ctrl { display: inline-flex; align-items: center; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.cart-qty-btn {
    width: 30px; height: 30px; border: 0; background: var(--surface); font-size: 15px; line-height: 1; cursor: pointer;
    color: var(--text-secondary); display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s;
}
.cart-qty-btn:hover { background: var(--accent-bg); color: var(--accent); }
.cart-qty-input {
    width: 42px; height: 30px; text-align: center; border: 0; border-left: 1px solid var(--border-light); border-right: 1px solid var(--border-light);
    font: 700 13px 'Plus Jakarta Sans', sans-serif; background: var(--surface); color: var(--text-primary); outline: none;
}
.cart-remove-btn {
    width: 26px; height: 26px; flex-shrink: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted);
    font-size: 12px; cursor: pointer; transition: background .15s, color .15s;
}
.cart-remove-btn:hover { background: #fdecea; color: var(--danger); }
#cartSummary { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--surface-warm); font-size: 13px; }
.cart-sum-row { display: flex; justify-content: space-between; gap: 10px; color: var(--text-secondary); padding: 3px 0; }
.cart-sum-row.cart-sum-total { margin-top: 6px; padding-top: 9px; border-top: 1px dashed var(--border); font-size: 15.5px; font-weight: 800; color: var(--text-primary); }
.cart-sum-note { margin-top: 6px; font-size: 11px; color: var(--text-muted); }
#cartEmpty {
    font-size: 13px; color: var(--text-muted); text-align: center; padding: 28px 16px; line-height: 1.6;
    border: 1.5px dashed var(--border); border-radius: 12px; background: var(--surface-warm);
}
#cartEmpty::before { content: "\f291"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900; display: block; font-size: 24px; color: #d6cbc0; margin-bottom: 6px; }
#validationError { color: var(--danger) !important; font-size: 13px; display: block; margin-top: 8px; }
#validationError:empty { display: none; }

.requirement-section textarea {
    width: 100%; background: var(--surface-warm) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-sm) !important;
    color: var(--text-primary) !important; padding: 12px !important; font: 14px 'Plus Jakarta Sans', sans-serif !important; resize: vertical;
}
.requirement-section textarea:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-glow) !important; outline: none !important; }
.requirement-section #charCount { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 5px; text-align: right; }

.qo-details-sub { font-size: 12.5px; color: var(--text-muted); margin: -4px 0 14px; }
.field-group { margin-bottom: 13px; }
.field-group .labelSmall, .field-group .control-label, .field-group .control-lable {
    font-size: 12.5px !important; color: var(--text-secondary) !important; margin-bottom: 6px !important; display: block !important; font-weight: 600 !important;
}
.field-group.required .labelSmall::after { content: " *"; color: var(--danger); }
.field-group input[type="text"], .field-group input.form-control, .field-group .smallColoumn {
    width: 100% !important; height: 42px !important; padding: 0 13px !important; border-radius: var(--radius-sm) !important;
    background: var(--surface-warm) !important; border: 1px solid var(--border) !important; color: var(--text-primary) !important;
    font: 14px 'Plus Jakarta Sans', sans-serif !important; transition: border-color .2s, box-shadow .2s;
}
.field-group input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-glow) !important; outline: none !important; background: var(--surface) !important; }
.field-group input::placeholder { color: var(--text-muted) !important; }
.field-group input.qo-invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(192, 57, 43, .12) !important; }
.field-group .select2-container.qo-invalid .select2-selection--single {
    border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(192, 57, 43, .12) !important;
}
.field-group .error { color: var(--danger) !important; font-size: 12px; margin-top: 4px; }
.field-group .select2-container--default .select2-selection--single {
    background: var(--surface-warm) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-sm) !important;
    height: 42px !important; padding: 0 12px !important;
}
.field-group .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text-primary) !important; line-height: 42px !important; padding-left: 0 !important; }
.field-group .select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px !important; }
.field-row { display: flex; gap: 10px; }
.field-row .field-group { flex: 1; min-width: 0; }
.field-row .field-group .select2-container { max-width: 100%; }
.field-row .field-group .select2-selection__rendered { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.right-col-footer { flex-shrink: 0; padding: 14px 22px 18px; border-top: 1px solid var(--border-light); background: var(--surface); box-shadow: 0 -8px 20px rgba(24, 18, 12, .04); }
.qo-foot-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.qo-foot-total span { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.qo-foot-total strong { font-size: 19px; font-weight: 800; color: var(--text-primary); }
.submit-btn {
    width: 100%; height: 50px; border: none; border-radius: 13px; background: var(--accent); color: #fff; cursor: pointer;
    font: 700 15.5px 'Plus Jakarta Sans', sans-serif; display: flex; align-items: center; justify-content: center; gap: 9px;
    box-shadow: 0 6px 18px var(--accent-glow); transition: background .15s, transform .15s;
}
.submit-btn:hover { background: var(--accent-dark); }
.submit-btn:active { transform: scale(.99); }
.submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
/* Pay Later + Pay Now side by side, when the selected vendor takes online payments. */
.pay-btn-row { display: flex; gap: 10px; }
.pay-btn-row .submit-btn { flex: 1; min-width: 0; padding-left: 10px; padding-right: 10px; }
.submit-btn.submit-btn-secondary { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); box-shadow: none; }
.submit-btn.submit-btn-secondary:hover { background: var(--accent-bg); box-shadow: 0 4px 14px var(--accent-glow); }
.gstin-badge { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 10px; }
.gstin-badge i { color: var(--success); margin-right: 4px; }

/* Select2 dropdowns must open above the drawer (Select2 appends them to <body> at z-index 1051),
   and SweetAlert popups (z-index 1060) above both - e.g. the "Check Form!" warning. */
body > .select2-container--open { z-index: 1300 !important; }
.swal2-container { z-index: 10100 !important; }
.select2-dropdown { background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-sm) !important; box-shadow: var(--shadow-lg) !important; overflow: hidden; }
.select2-results__option { color: var(--text-primary) !important; padding: 10px 14px !important; font-size: 13.5px !important; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--accent-bg) !important; color: var(--accent-dark) !important; }
.select2-search__field { background: var(--surface-warm) !important; border: 1px solid var(--border) !important; border-radius: 6px !important; font-family: 'Plus Jakarta Sans', sans-serif !important; }
/* Select2 4.0.2 allowClear "x": pin it left of the arrow so it never touches the text */
.select2-container--default .select2-selection--single .select2-selection__rendered { flex: 1 1 auto; min-width: 0; }
.select2-container--default .select2-selection--single .select2-selection__rendered:has(.select2-selection__clear) { padding-right: 44px !important; }
.select2-container--default .select2-selection--single .select2-selection__clear {
    float: none !important; position: absolute !important; top: 50%; right: 24px; transform: translateY(-50%);
    margin: 0 !important; padding: 0 4px; font-size: 16px; font-weight: 600; line-height: 1; color: #b3a99f;
}
.select2-container--default .select2-selection--single .select2-selection__clear:hover { color: var(--danger); }

/* =====================================================================================
   FLOATING CART BAR (shown once the cart has items)
   ===================================================================================== */
.qo-cartbar {
    position: fixed; left: 50%; bottom: 20px; z-index: 1100; transform: translate(-50%, 140%);
    display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 20px; border: 0; border-radius: 999px; cursor: pointer;
    background: #1f1b16; color: #fff; box-shadow: 0 14px 34px rgba(24, 18, 12, .32);
    font-family: 'Plus Jakarta Sans', sans-serif; transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.qo-cartbar.show { transform: translate(-50%, 0); }
html.qo-drawer-open .qo-cartbar { transform: translate(-50%, 140%); }
.qo-cartbar-info { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.qo-cartbar-info small { font-size: 11px; font-weight: 600; color: #c9bfb4; }
.qo-cartbar-info strong { font-size: 15px; font-weight: 800; }
.qo-cartbar-cta { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--accent); font-size: 13.5px; font-weight: 700; }
.qo-cartbar:hover .qo-cartbar-cta { background: var(--accent-dark); }

/* =====================================================================================
   FOOTER
   ===================================================================================== */
/* Light footer - no black slab */
.qo-footer { position: relative; margin-top: 24px; background: linear-gradient(180deg, #f7f7ff 0%, #eef0ff 100%); border-top: 1px solid #e3e4fb; color: var(--text-secondary); }
.qo-footer-wrap { max-width: var(--qo-max); margin: 0 auto; padding: 0 var(--qo-pad); }
/* the ERP theme centres text inside <footer> on small screens - keep ours left-aligned */
.qo-footer, .qo-footer * { text-align: left !important; }

/* Columns: brand | explore | buyers | sellers */
.qo-footer-cols { display: grid; grid-template-columns: minmax(280px, 1.6fr) repeat(3, minmax(150px, 1fr)); gap: 32px 40px; padding: 40px 0 30px; }
.qo-footer-logo { display: inline-flex; align-items: center; gap: 9px; }
.qo-footer-logo img { height: 30px; display: block; }
.qo-footer-logo span { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.qo-footer-brand p { margin: 12px 0 16px; max-width: 400px; font-size: 13px; line-height: 1.65; color: var(--text-secondary); }
.qo-footer-trust { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.qo-footer-trust li {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
    background: #fff; border: 1px solid #e3e4fb; font-size: 11.5px; font-weight: 700; color: var(--text-secondary);
}
.qo-footer-trust li i { color: var(--accent); font-size: 11px; }
.qo-footer-col h4 { margin: 4px 0 14px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-primary); }
.qo-footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.qo-footer-col a { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--text-secondary); transition: color .15s, transform .15s; }
.qo-footer-col a i { width: 14px; text-align: center; font-size: 11.5px; color: #a3a5d6; transition: color .15s; }
.qo-footer-col a:hover { color: var(--accent); transform: translateX(2px); }
.qo-footer-col a:hover i { color: var(--accent); }

/* "Why order here" strip */
.qo-footer-feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; list-style: none; padding: 22px 0; border-top: 1px solid #e3e4fb; }
.qo-footer-feats li { display: flex; align-items: center; gap: 12px; }
.qo-ff-icon {
    flex: none; width: 42px; height: 42px; border-radius: 12px; background: #fff; color: var(--accent);
    border: 1px solid #e3e4fb; box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.qo-footer-feats strong { display: block; font-size: 13px; font-weight: 800; color: var(--text-primary); }
.qo-footer-feats small { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

.qo-footer-bottom { background: rgba(91, 94, 244, .06); border-top: 1px solid #e3e4fb; }
.qo-footer-bottom .qo-footer-wrap {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px;
    padding-top: 14px; padding-bottom: 16px; font-size: 12px; color: var(--text-muted);
}
.qo-footer-bottom a { color: var(--accent-dark); font-weight: 800; }

@media (max-width: 1180px) {
    .qo-footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .qo-footer-brand { grid-column: 1 / -1; }
    .qo-footer-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =====================================================================================
   PRODUCT LIGHTBOX
   ===================================================================================== */
.prod-lb-overlay { display: none; position: fixed; inset: 0; z-index: 10050; background: rgba(24, 18, 12, .75); align-items: center; justify-content: center; padding: 20px; }
.prod-lb-overlay.show { display: flex; }
.prod-lb-dialog {
    position: relative; background: #fff; border-radius: 16px; max-width: min(920px, 96vw); max-height: 90vh; width: 100%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35); display: flex; flex-direction: column; overflow: hidden;
}
.prod-lb-stage { position: relative; display: flex; align-items: center; justify-content: center; width: min(52vh, 480px); aspect-ratio: 1 / 1; margin: 0 auto; padding: 16px 48px; background: var(--surface-warm); }
.prod-lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; border-radius: 8px; }
.prod-lb-stage.prod-lb-stage-video { width: min(800px, 86vw); aspect-ratio: 16 / 9; padding: 0; }
.prod-lb-stage iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; display: block; }
.prod-lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: none; z-index: 2;
    background: rgba(255, 255, 255, .95); color: var(--accent); font-size: 16px; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    display: flex; align-items: center; justify-content: center;
}
.prod-lb-prev { left: 10px; }
.prod-lb-next { right: 10px; }
.prod-lb-nav[disabled] { opacity: .35; cursor: default; }
.prod-lb-info { padding: 14px 20px; border-top: 1px solid var(--border-light); max-height: 25vh; overflow-y: auto; }
.prod-lb-name { font-size: 15px; font-weight: 800; color: var(--text-primary); margin-bottom: 6px; }
.prod-lb-description { font-size: 13px; line-height: 1.55; color: var(--text-secondary); white-space: pre-wrap; word-break: break-word; }
.prod-lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border-light); }
.prod-lb-counter { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.prod-lb-close { border: none; background: var(--surface-warm); color: var(--text-primary); border-radius: 8px; padding: 7px 14px; font: 700 12px 'Plus Jakarta Sans', sans-serif; cursor: pointer; }
.prod-lb-close:hover { background: var(--border-light); }

/* =====================================================================================
   RESPONSIVE
   ===================================================================================== */
@media (max-width: 1400px) { :root { --qo-rail-w: 370px; } }
@media (max-width: 1180px) {
    :root { --qo-rail-w: 320px; }
    .qo-body { gap: 20px; }
}

/* Tablet / phone: vendor rail becomes a sideways-scrolling row of chips above the products */
@media (max-width: 900px) {
    :root { --qo-pad: 16px; }
    .vd-topbar { padding: 10px 16px; }
    .qo-hero-inner { padding-top: 22px; padding-bottom: 18px; }
    .qo-searchbar { flex-wrap: wrap; padding: 6px; }
    .item-search-wrap { flex: 1 1 100%; }
    .location-filter-wrap { flex: 1 1 auto; border-left: 0; border-top: 1px solid var(--border-light); padding: 4px 0 0; }
    .location-filter-wrap .select2-container { flex: 1; width: auto !important; min-width: 0 !important; max-width: none !important; }
    .location-filter-wrap .select2-container--default .select2-selection--single { height: 44px !important; }
    .qo-search-go { height: 44px; margin-top: 4px; padding: 0 20px; }
    .qo-steps { display: none; }

    #formDiv { padding-top: 16px; padding-bottom: 40px; }
    .qo-body { grid-template-columns: minmax(0, 1fr); gap: 14px; height: auto; min-height: 0; align-items: start; }
    .qo-catalog { display: block; }
    .items-grid-wrap { overflow: visible; padding: 0; margin: 0; }
    .qo-rail { background: transparent; border: 0; box-shadow: none; }
    .qo-rail-head { padding: 0 2px 8px; border: 0; }
    .vendor-list { display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 10px; background: transparent; scroll-snap-type: x proximity; scrollbar-width: thin; }
    .vendor-card { flex: 0 0 300px; max-width: 85vw; margin: 0; scroll-snap-align: start; }
    #vendorListEmpty, #vendorListLoading, #vendorListPlaceholder, #vendorListLoadingMore { flex: 1 0 100%; padding: 16px 12px !important; }
    .qo-catalog-head { margin-bottom: 14px; }
    .qo-catalog-title { font-size: 18px; }
    .selected-vendor-badge { width: 100%; }
    .qo-sv-text { flex: 1; }
    .qo-sv-text strong { max-width: none; }
}
@media (max-width: 600px) {
    .qo-hero p.qo-lead { font-size: 13.5px; }
    .location-filter-wrap .qo-loc-icon { display: none; }
    .qo-search-go { flex: 1 1 100%; justify-content: center; }
    .prod-card { padding: 8px; border-radius: 13px; }
    .prod-card .prod-desc { display: none; }
    .prod-card .prod-name { font-size: 12.5px; }
    .prod-card .prod-add-btn { font-size: 12px; }
    .qo-step-btn { width: 34px; }
    .field-row { flex-direction: column; gap: 0; }
    .qo-cartbar { left: 12px; right: 12px; bottom: 12px; transform: translateY(140%); justify-content: space-between; }
    .qo-cartbar.show { transform: none; }
    html.qo-drawer-open .qo-cartbar { transform: translateY(140%); }
    .qo-footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
    .qo-footer-feats { grid-template-columns: minmax(0, 1fr); }
    .qo-footer-bottom .qo-footer-wrap { flex-direction: column; align-items: flex-start; }
    body { padding-bottom: 76px !important; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
