/* =============================================================================
   Apna Sehar design system
   Mobile first. Breakpoints: tablet >= 768px, desktop >= 992px, wide >= 1200px.
   Phones and tablets (< 992px) use the touch layout: compact header + bottom nav.
   ============================================================================= */

:root {
    /* Brand (from the logo: navy skyline, sunset orange, gold ring) */
    --navy-900: #0f2140;
    --navy-800: #162b50;
    --navy-700: #1e3a6b;
    --navy-600: #29508f;
    --navy-100: #e7edf7;
    --navy-50: #f2f5fb;
    --orange-700: #c2410c;
    --orange-600: #e3581a;
    --orange-500: #f26b21;
    --orange-100: #ffe8d9;
    --orange-50: #fff5ee;
    --gold-500: #d9a33b;

    /* Feedback */
    --green-700: #15803d;
    --green-600: #16a34a;
    --green-100: #dcfce7;
    --red-600: #dc2626;
    --red-100: #fee2e2;
    --amber-600: #d97706;
    --amber-100: #fef3c7;

    /* Neutrals */
    --ink: #1a2233;
    --ink-2: #4b5567;
    --ink-3: #7a8497;
    --line: #e6e9ef;
    --line-2: #f0f2f6;
    --bg: #f5f6f9;
    --surface: #ffffff;

    /* Shape & depth */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
    --shadow: 0 2px 10px rgba(16, 24, 40, .07);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);

    /* Layout */
    --header-h: 112px;           /* mobile header (bar + search) */
    --bottom-nav-h: 64px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --content-max: 1240px;
    --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;

    /* Bootstrap hooks */
    --bs-body-font-family: var(--font);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--bg);
    --bs-primary: var(--orange-500);
    --bs-primary-rgb: 242, 107, 33;
    --bs-link-color: var(--navy-600);
    --bs-link-color-rgb: 41, 80, 143;
    --bs-link-hover-color: var(--navy-800);
    --bs-border-color: var(--line);
    --bs-border-radius: var(--radius);
    --bs-focus-ring-color: rgba(242, 107, 33, .25);
}

/* -----------------------------------------------------------------------------
   Base
   ----------------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Never scroll sideways on phones (clip, unlike hidden, keeps position: sticky working) */
html, body.app { overflow-x: clip; }
body.app {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg) !important;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    /* room for the bottom nav on touch layouts */
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
    min-height: 100vh;
}
@media (min-width: 992px) {
    body.app { padding-bottom: 0; font-size: 15.5px; }
}
/* Leave room for a sticky action bar when the page has one */
@media (max-width: 767.98px) {
    body.app:has(.sticky-cta) { padding-bottom: calc(var(--bottom-nav-h) + 76px + var(--safe-bottom)); }
}
@media (min-width: 768px) and (max-width: 991.98px) {
    body.app:has(.sticky-cta:not(.d-md-none)) { padding-bottom: calc(var(--bottom-nav-h) + 80px + var(--safe-bottom)); }
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--navy-800); font-weight: 600; letter-spacing: -.01em; }
a { color: var(--navy-600); text-decoration: none; }
a:hover { color: var(--navy-800); }
img { max-width: 100%; }
.text-muted { color: var(--ink-3) !important; }
.text-ink-2 { color: var(--ink-2); }
.fw-semibold { font-weight: 600 !important; }
.small, small { font-size: .85em; }

:focus-visible { outline: 3px solid rgba(242, 107, 33, .45); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.page { max-width: var(--content-max); margin: 0 auto; padding: 12px 12px 24px; }
@media (min-width: 768px) { .page { padding: 20px 20px 32px; } }
@media (min-width: 992px) { .page { padding: 24px 24px 48px; } }
.page-home-hero { padding-top: 10px; }
.page-narrow { max-width: 760px; }
.page-medium { max-width: 980px; }

.page-title {
    font-size: 1.25rem; font-weight: 600; color: var(--navy-800);
    margin: 4px 0 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
@media (min-width: 768px) { .page-title { font-size: 1.5rem; } }
.page-title .count { font-size: .85rem; font-weight: 500; color: var(--ink-3); }

/* -----------------------------------------------------------------------------
   Buttons (primary = orange call to action)
   ----------------------------------------------------------------------------- */
.btn {
    --bs-btn-font-weight: 600;
    --bs-btn-border-radius: var(--radius);
    --bs-btn-padding-y: .6rem;
    --bs-btn-padding-x: 1.1rem;
    --bs-btn-font-size: .95rem;
    min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .08s;
}
.btn:active { transform: scale(.98); }
.btn-sm { --bs-btn-padding-y: .35rem; --bs-btn-padding-x: .75rem; --bs-btn-font-size: .85rem; --bs-btn-border-radius: 10px; min-height: 34px; }
.btn-lg { --bs-btn-padding-y: .8rem; --bs-btn-font-size: 1.05rem; min-height: 52px; }
.btn-primary {
    --bs-btn-bg: var(--orange-500); --bs-btn-border-color: var(--orange-500); --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--orange-600); --bs-btn-hover-border-color: var(--orange-600); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--orange-700); --bs-btn-active-border-color: var(--orange-700);
    --bs-btn-disabled-bg: #f6b48f; --bs-btn-disabled-border-color: #f6b48f; --bs-btn-disabled-color: #fff;
    box-shadow: 0 4px 14px rgba(242, 107, 33, .28);
}
.btn-navy, .btn-dark {
    --bs-btn-bg: var(--navy-700); --bs-btn-border-color: var(--navy-700); --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--navy-800); --bs-btn-hover-border-color: var(--navy-800); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--navy-900); --bs-btn-active-border-color: var(--navy-900);
}
.btn-info, .btn-soft {
    --bs-btn-bg: var(--navy-50); --bs-btn-border-color: var(--navy-100); --bs-btn-color: var(--navy-700);
    --bs-btn-hover-bg: var(--navy-100); --bs-btn-hover-border-color: var(--navy-100); --bs-btn-hover-color: var(--navy-800);
    --bs-btn-active-bg: var(--navy-100); --bs-btn-active-color: var(--navy-800);
}
.btn-success {
    --bs-btn-bg: var(--green-600); --bs-btn-border-color: var(--green-600);
    --bs-btn-hover-bg: var(--green-700); --bs-btn-hover-border-color: var(--green-700);
}
.btn-danger {
    --bs-btn-bg: var(--red-600); --bs-btn-border-color: var(--red-600);
    --bs-btn-hover-bg: #b91c1c; --bs-btn-hover-border-color: #b91c1c;
}
.btn-outline-primary {
    --bs-btn-color: var(--orange-600); --bs-btn-border-color: var(--orange-500);
    --bs-btn-hover-bg: var(--orange-500); --bs-btn-hover-border-color: var(--orange-500); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--orange-600); --bs-btn-active-border-color: var(--orange-600);
}
.btn-outline-secondary, .btn-light {
    --bs-btn-color: var(--ink-2); --bs-btn-border-color: var(--line); --bs-btn-bg: var(--surface);
    --bs-btn-hover-bg: var(--line-2); --bs-btn-hover-border-color: var(--line); --bs-btn-hover-color: var(--ink);
}
.btn-outline-danger { --bs-btn-color: var(--red-600); --bs-btn-border-color: #f3b4b4; --bs-btn-hover-bg: var(--red-600); --bs-btn-hover-border-color: var(--red-600); }
.btn-link { --bs-btn-color: var(--navy-600); --bs-btn-hover-color: var(--navy-800); min-height: 0; text-decoration: none; font-weight: 600; }
.btn-icon {
    width: 44px; height: 44px; padding: 0; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.btn-block { width: 100%; }

/* -----------------------------------------------------------------------------
   Forms (16px text on phones prevents iOS zoom)
   ----------------------------------------------------------------------------- */
.form-control, .form-select {
    min-height: 48px; font-size: 16px; border-radius: var(--radius);
    border-color: var(--line); background-color: var(--surface); color: var(--ink);
}
.form-control::placeholder { color: #a3abba; }
.form-control:focus, .form-select:focus {
    border-color: var(--orange-500); box-shadow: 0 0 0 .22rem rgba(242, 107, 33, .15);
}
.form-control-sm, .form-select-sm { min-height: 38px; font-size: 14px; }
textarea.form-control { min-height: 96px; }
.form-label { font-weight: 500; color: var(--ink-2); font-size: .9rem; margin-bottom: .3rem; }
.input-group-text { background: var(--navy-50); border-color: var(--line); color: var(--navy-700); font-weight: 500; }
.input-group > .form-control:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.form-check-input { width: 1.2em; height: 1.2em; }
.form-check-input:checked { background-color: var(--orange-500); border-color: var(--orange-500); }
.input-error, .form-control.is-invalid { border-color: var(--red-600) !important; }
.field-hint { font-size: .8rem; color: var(--ink-3); margin-top: .25rem; }

/* -----------------------------------------------------------------------------
   Cards & surfaces
   ----------------------------------------------------------------------------- */
.surface {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.surface-pad { padding: 14px; }
@media (min-width: 768px) { .surface-pad { padding: 20px; } }
.card { border-color: var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-header { background: var(--surface); border-bottom-color: var(--line-2); font-weight: 600; color: var(--navy-800); }

.section { margin: 18px 0; }
@media (min-width: 768px) { .section { margin: 26px 0; } }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-head h2 { font-size: 1.05rem; margin: 0; }
@media (min-width: 768px) { .section-head h2 { font-size: 1.25rem; } }
.section-head .see-all { font-size: .85rem; font-weight: 600; color: var(--orange-600); white-space: nowrap; }

/* Key/value rows used in summaries */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; color: var(--ink-2); }
.kv strong, .kv .v { color: var(--ink); font-weight: 500; text-align: right; }
.kv.total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; font-size: 1.05rem; color: var(--ink); font-weight: 600; }
.kv.total .v { font-weight: 700; color: var(--navy-800); }

/* Pills / badges */
.pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
    font-size: .78rem; font-weight: 600; line-height: 1.3; white-space: nowrap;
}
.pill-orange { background: var(--orange-100); color: var(--orange-700); }
.pill-green { background: var(--green-100); color: var(--green-700); }
.pill-red { background: var(--red-100); color: var(--red-600); }
.pill-amber { background: var(--amber-100); color: #92400e; }
.pill-navy { background: var(--navy-100); color: var(--navy-700); }
.pill-gray { background: var(--line-2); color: var(--ink-2); }
.badge { font-weight: 600; }

/* Empty states */
.empty-state { text-align: center; padding: 40px 16px; }
.empty-state .icon {
    width: 84px; height: 84px; border-radius: 50%; background: var(--orange-50); color: var(--orange-500);
    display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 14px;
}
.empty-state h3 { font-size: 1.1rem; margin-bottom: 6px; }
.empty-state p { color: var(--ink-3); max-width: 360px; margin: 0 auto 18px; }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #eceff4 25%, #f6f7fa 37%, #eceff4 63%);
    background-size: 400% 100%; animation: skeleton 1.3s ease infinite; border-radius: var(--radius-sm);
}
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* -----------------------------------------------------------------------------
   Header
   ----------------------------------------------------------------------------- */
.app-header {
    position: sticky; top: 0; z-index: 1030;
    background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-700) 100%);
    color: #fff; box-shadow: 0 2px 12px rgba(15, 33, 64, .25);
}
.app-header a { color: #fff; }
.app-header .bar {
    max-width: var(--content-max); margin: 0 auto; padding: 8px 12px;
    display: flex; align-items: center; gap: 8px; min-height: 56px;
}
@media (min-width: 768px) { .app-header .bar { padding: 8px 20px; } }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; white-space: nowrap; flex: 0 0 auto; }
/* Fixed size: a long location name must never squeeze the round logo */
.brand img { width: 34px; height: 34px; min-width: 34px; flex: 0 0 34px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--gold-500); background: #111; }
.brand .brand-name span { color: var(--orange-500); }
.hdr-icon-btn {
    position: relative; width: 42px; height: 42px; border-radius: 12px; border: 0;
    background: rgba(255, 255, 255, .08); color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem; flex: 0 0 auto; transition: background .15s;
}
.hdr-icon-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.hdr-icon-btn .count-badge, .bnav .count-badge {
    position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    background: var(--orange-500); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center;
    box-shadow: 0 0 0 2px var(--navy-700);
}
.count-badge.is-empty { display: none; }

/* Location chip */
.loc-chip {
    display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto;
    background: none; border: 0; color: #fff; text-align: left; padding: 2px 4px; border-radius: 10px;
}
.loc-chip .loc-icon {
    width: 32px; height: 32px; border-radius: 10px; flex: 0 0 auto;
    background: linear-gradient(135deg, var(--orange-500), #ff9a4d); display: inline-flex; align-items: center; justify-content: center;
}
.loc-chip .loc-text { min-width: 0; line-height: 1.2; }
.loc-chip .loc-label { font-size: .7rem; opacity: .75; display: block; }
.loc-chip .loc-value { font-size: .88rem; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.loc-chip .loc-value span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-chip:hover { background: rgba(255, 255, 255, .06); }

/* Search */
.search-row { max-width: var(--content-max); margin: 0 auto; padding: 0 12px 10px; }
@media (min-width: 768px) { .search-row { padding: 0 20px 12px; } }
.search-box { position: relative; display: flex; align-items: center; width: 100%; }
.search-box .fa-magnifying-glass, .search-box .fa-search {
    position: absolute; left: 14px; color: var(--ink-3); pointer-events: none;
}
.search-box input {
    width: 100%; height: 46px; border-radius: 12px; border: 0; padding: 0 44px 0 42px;
    font-size: 16px; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04);
}
.search-box input:focus { outline: none; box-shadow: 0 0 0 3px rgba(242, 107, 33, .45); }
.search-box .search-go {
    position: absolute; right: 5px; height: 36px; width: 36px; border-radius: 9px; border: 0;
    background: var(--orange-500); color: #fff; display: inline-flex; align-items: center; justify-content: center;
}

/* Desktop header */
.app-header .hdr-desktop { display: none; }
@media (min-width: 992px) {
    .app-header .hdr-touch { display: none; }
    .app-header .hdr-desktop { display: flex; }
    .app-header .bar { gap: 18px; min-height: 68px; }
    .hdr-desktop .search-box { max-width: 560px; flex: 1 1 auto; }
    .hdr-desktop .loc-chip { flex: 0 0 auto; min-width: 150px; max-width: 220px; }
    .hdr-desktop .search-box { min-width: 200px; }
    /* Logo and Categories keep their width; the search box gives way instead */
    .hdr-desktop .brand { flex: 0 0 auto; margin-right: 10px; }
    .hdr-nav { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
    .hdr-nav > a, .hdr-nav > .dropdown > button {
        color: rgba(255, 255, 255, .9); font-weight: 500; font-size: .92rem; padding: 8px 12px; border-radius: 10px;
        background: none; border: 0; display: inline-flex; align-items: center; gap: 6px;
    }
    .hdr-nav > a:hover, .hdr-nav > .dropdown > button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
    .hdr-account { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 12px;
        background: rgba(255, 255, 255, .08); border: 0; color: #fff; font-weight: 500; font-size: .92rem; }
    .hdr-account:hover { background: rgba(255, 255, 255, .16); }
    /* Log in / Sign up and the account button keep their width and stay on one line */
    .hdr-auth { flex: 0 0 auto; }
    .hdr-auth .btn { min-height: 40px; white-space: nowrap; }
    .hdr-desktop .hdr-account, .hdr-desktop .dropdown:has(.hdr-account) { flex: 0 0 auto; }
}

/* Category mega-menu (desktop) */
.mega-menu { width: min(760px, 90vw); padding: 16px; border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.mega-menu .mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 22px; }
.mega-menu h6 { font-size: .9rem; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.mega-menu h6 img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.mega-menu a { display: block; color: var(--ink-2); font-size: .88rem; padding: 3px 0; }
.mega-menu a:hover { color: var(--orange-600); }
.dropdown-menu { border-radius: var(--radius); border-color: var(--line); box-shadow: var(--shadow-lg); padding: 6px; }
.dropdown-item { border-radius: 8px; padding: 8px 12px; font-size: .92rem; }
.dropdown-item:active { background: var(--orange-500); }
/* Menus opened from the header sit on white: undo the header's white link colour */
.app-header .dropdown-menu .dropdown-item { color: var(--ink); }
.app-header .dropdown-menu .dropdown-item:hover, .app-header .dropdown-menu .dropdown-item:focus { color: var(--navy-800); background: var(--navy-50); }
.app-header .dropdown-menu .dropdown-item:active { color: #fff; background: var(--orange-500); }
.app-header .dropdown-menu .dropdown-item.text-danger { color: var(--red-600); }
.app-header .dropdown-menu .dropdown-item.text-danger:hover { background: var(--red-100); }

/* -----------------------------------------------------------------------------
   Bottom navigation (phones & tablets)
   ----------------------------------------------------------------------------- */
.bnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
    height: calc(var(--bottom-nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
    background: rgba(255, 255, 255, .97); backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--line); display: flex; box-shadow: 0 -4px 18px rgba(16, 24, 40, .06);
}
.bnav a, .bnav button {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--ink-3); font-size: .72rem; font-weight: 500; background: none; border: 0; position: relative;
}
.bnav i { font-size: 1.25rem; }
.bnav .active, .bnav a:hover { color: var(--orange-600); }
.bnav .active::before {
    content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--orange-500);
}
.bnav .icon-wrap { position: relative; display: inline-flex; }
.bnav .count-badge { top: -6px; right: -12px; box-shadow: 0 0 0 2px #fff; }
@media (min-width: 992px) { .bnav { display: none; } }

/* Sticky call-to-action bar (above bottom nav on touch layouts) */
.sticky-cta {
    position: fixed; left: 0; right: 0; z-index: 1035;
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16, 24, 40, .08);
    padding: 10px 12px; display: flex; align-items: center; gap: 12px;
}
.sticky-cta .cta-info { min-width: 0; flex: 1 1 auto; line-height: 1.2; }
.sticky-cta .cta-info .amt { font-size: 1.12rem; font-weight: 700; color: var(--ink); }
.sticky-cta .cta-info .sub { font-size: .75rem; color: var(--ink-3); }
.sticky-cta .btn { flex: 0 0 auto; min-width: 150px; }
@media (min-width: 768px) { .sticky-cta { padding: 12px 20px; } .sticky-cta .btn { min-width: 220px; } }
@media (min-width: 992px) {
    .sticky-cta.desktop-inline {
        position: static; box-shadow: none; border: 0; padding: 0; background: transparent; margin-top: 12px;
    }
    .sticky-cta.desktop-inline .cta-info { display: none; }
    .sticky-cta.desktop-inline .btn { width: 100%; }
}

/* -----------------------------------------------------------------------------
   Side drawers (menu / explore) and modals
   ----------------------------------------------------------------------------- */
.drawer {
    position: fixed; top: 0; bottom: 0; z-index: 1060; width: min(340px, 88vw); background: #fff;
    display: flex; flex-direction: column; transition: transform .25s ease; box-shadow: var(--shadow-lg);
}
.drawer.drawer-right { right: 0; transform: translateX(105%); }
.drawer.drawer-left { left: 0; transform: translateX(-105%); }
.drawer.show { transform: none; }
.drawer-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px;
    background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); color: #fff;
}
.drawer-head .who { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.drawer-head .avatar {
    width: 42px; height: 42px; border-radius: 50%; background: var(--orange-500); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem;
}
.drawer-head .hello { font-size: .75rem; opacity: .8; font-weight: 400; display: block; }
.drawer-head .btn-close-drawer { background: rgba(255, 255, 255, .14); border: 0; color: #fff; width: 38px; height: 38px; border-radius: 10px; }
.drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 8px; padding-bottom: calc(16px + var(--safe-bottom)); }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list a, .menu-list button {
    display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; color: var(--ink);
    font-weight: 500; width: 100%; background: none; border: 0; text-align: left;
}
.menu-list a:hover, .menu-list button:hover { background: var(--line-2); }
.menu-list .mi-icon {
    width: 36px; height: 36px; border-radius: 10px; background: var(--navy-50); color: var(--navy-700);
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.menu-list .mi-end { margin-left: auto; color: var(--ink-3); }
.menu-divider { height: 1px; background: var(--line); margin: 8px 12px; }
.drawer-overlay {
    position: fixed; inset: 0; z-index: 1055; background: rgba(15, 23, 42, .45); opacity: 0; visibility: hidden; transition: opacity .2s;
}
.drawer-overlay.show { opacity: 1; visibility: visible; }
body.drawer-open { overflow: hidden; }

/* Layering for drawers, pinned by id so older stylesheets cannot override it:
   bottom nav 1040 < overlay 1055 < drawer 1060 < modals (Bootstrap 1055+ / backdrop) */
#mainSidebarOverlay, #exploreOverlay {
    position: fixed; inset: 0; width: auto; height: auto; z-index: 1055;
    background: rgba(15, 23, 42, .45); backdrop-filter: none; -webkit-backdrop-filter: none;
    display: block; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s, visibility .2s;
}
#mainSidebarOverlay.show, #exploreOverlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
#mainSidebar, #exploreSidebar { z-index: 1060; }

/* Explore drawer: category accordion */
.cat-acc .cat-row {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 12px; background: none; border: 0; text-align: left;
    color: var(--ink); font-weight: 500;
}
.cat-acc .cat-row:hover { background: var(--line-2); }
.cat-acc .cat-row img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; background: var(--line-2); }
.cat-acc .cat-row .chev { margin-left: auto; color: var(--ink-3); transition: transform .2s; }
.cat-acc .cat-row[aria-expanded="true"] .chev { transform: rotate(180deg); }
.cat-acc .sub-list { padding: 0 8px 8px 64px; display: flex; flex-wrap: wrap; gap: 8px; }
.cat-acc .sub-list a {
    padding: 7px 12px; border-radius: 999px; background: var(--navy-50); color: var(--navy-700); font-size: .82rem; font-weight: 500;
}
.cat-acc .sub-list a:hover { background: var(--orange-100); color: var(--orange-700); }

/* Modals: bottom sheets on phones, centred dialogs on larger screens */
.modal-content { border: 0; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 0; padding: 18px 20px 4px; }
.modal-title { font-weight: 600; color: var(--navy-800); font-size: 1.15rem; }
.modal-body { padding: 12px 20px 20px; }
.modal-footer { border-top: 1px solid var(--line-2); padding: 12px 20px; }
.modal-backdrop.show { opacity: .45; }
@media (max-width: 575.98px) {
    .modal.sheet .modal-dialog { margin: 0; position: fixed; left: 0; right: 0; bottom: 0; max-width: none; width: 100%; }
    .modal.sheet .modal-content { border-radius: 22px 22px 0 0; padding-bottom: var(--safe-bottom); max-height: 92vh; overflow-y: auto; }
    .modal.sheet.fade .modal-dialog { transform: translateY(100%); transition: transform .25s ease-out; }
    .modal.sheet.show .modal-dialog { transform: none; }
    .modal.sheet .modal-header::before {
        content: ''; position: absolute; top: 8px; left: 50%; width: 42px; height: 4px; margin-left: -21px; border-radius: 4px; background: var(--line);
    }
}
.auth-modal .modal-dialog { max-width: 420px; }
.auth-sub { color: var(--ink-3); font-size: .9rem; margin: -2px 0 16px; }
.auth-switch { text-align: center; color: var(--ink-3); font-size: .92rem; margin-top: 14px; }
.or-divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: .82rem; margin: 14px 0; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.otp-input { letter-spacing: .5em; font-size: 1.3rem !important; text-align: center; font-weight: 600; }
.pw-toggle { border-color: var(--line); background: var(--surface); color: var(--ink-3); }

/* Toasts (top on phones, bottom-right on desktop) */
.toast-host {
    position: fixed; z-index: 2000; left: 12px; right: 12px; top: 12px; display: flex; flex-direction: column; align-items: center; pointer-events: none;
}
.toast-host .toast { pointer-events: auto; width: 100%; max-width: 440px; border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 500; }
@media (min-width: 992px) { .toast-host { top: auto; bottom: 24px; left: auto; right: 24px; align-items: flex-end; } }

/* -----------------------------------------------------------------------------
   Home
   ----------------------------------------------------------------------------- */
.hero { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--navy-800); }
.page-home-hero > .hero:first-child { margin-top: 0; }
.hero .carousel-item img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
@media (min-width: 992px) { .hero .carousel-item img { aspect-ratio: 16 / 5; } }
.hero .carousel-indicators [data-bs-target] { width: 8px; height: 8px; border-radius: 50%; border: 0; }
.welcome-card {
    border-radius: var(--radius-lg); padding: 16px; color: #fff; position: relative; overflow: hidden;
    background: linear-gradient(120deg, var(--navy-800) 0%, var(--navy-600) 55%, #b4531f 100%);
}
.welcome-card h1 { color: #fff; font-size: 1.2rem; margin: 0 0 4px; }
.welcome-card p { margin: 0; opacity: .9; font-size: .9rem; }
.welcome-card .welcome-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.welcome-card .welcome-badges span { background: rgba(255, 255, 255, .14); border-radius: 999px; padding: 5px 10px; font-size: .78rem; font-weight: 500; }
@media (min-width: 768px) { .welcome-card { padding: 22px 26px; } .welcome-card h1 { font-size: 1.5rem; } }

.cat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (min-width: 576px) { .cat-tiles { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 768px) { .cat-tiles { grid-template-columns: repeat(6, 1fr); gap: 14px; } }
@media (min-width: 1200px) { .cat-tiles { grid-template-columns: repeat(8, 1fr); } }
.cat-tile { text-align: center; color: var(--ink); font-size: .78rem; font-weight: 500; line-height: 1.25; }
.cat-tile .img {
    aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--orange-50); margin-bottom: 6px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--line-2); transition: transform .15s;
}
.cat-tile img { width: 100%; height: 100%; object-fit: cover; }
.cat-tile:hover .img { transform: translateY(-2px); }
.cat-tile:hover { color: var(--orange-600); }
@media (min-width: 768px) { .cat-tile { font-size: .88rem; } }

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
    flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
    color: var(--ink-2); font-size: .85rem; font-weight: 500; white-space: nowrap; min-height: 38px;
}
.chip.active, .chip:hover { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }

/* -----------------------------------------------------------------------------
   Product cards & grids
   ----------------------------------------------------------------------------- */
.p-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 576px) { .p-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .p-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1200px) { .p-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; } }
.p-grid.grid-4 { }
@media (min-width: 1200px) { .p-grid.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.h-scroll {
    display: grid; grid-auto-flow: column; grid-auto-columns: 44%; gap: 10px; overflow-x: auto;
    scroll-snap-type: x mandatory; padding: 2px 2px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll > * { scroll-snap-align: start; }
@media (min-width: 576px) { .h-scroll { grid-auto-columns: 30%; } }
@media (min-width: 768px) { .h-scroll { grid-auto-columns: 23%; gap: 14px; } }
@media (min-width: 1200px) { .h-scroll { grid-auto-columns: 18.6%; gap: 16px; } }

.p-card {
    position: relative; display: flex; flex-direction: column; height: 100%;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
    transition: box-shadow .18s, transform .18s;
}
.p-card:hover { box-shadow: var(--shadow); }
@media (hover: hover) { .p-card:hover { transform: translateY(-2px); } }
.p-card .p-img { position: relative; display: block; aspect-ratio: 1; background: #fff; padding: 10px; }
.p-card .p-img img { width: 100%; height: 100%; object-fit: contain; }
.p-card .p-off {
    position: absolute; top: 8px; left: 8px; background: var(--green-600); color: #fff; border-radius: 8px;
    padding: 2px 7px; font-size: .7rem; font-weight: 700; letter-spacing: .02em;
}
.p-card .p-body { padding: 8px 10px 10px; display: flex; flex-direction: column; flex: 1 1 auto; gap: 4px; }
.p-card .p-name {
    color: var(--ink); font-size: .86rem; font-weight: 500; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em;
}
.p-card .p-unit { font-size: .75rem; color: var(--ink-3); }
.p-card .p-store { font-size: .72rem; color: var(--navy-600); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-card .p-store i { font-size: .65rem; margin-right: 2px; }
.p-card .p-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; line-height: 1.2; }
.price .now { font-weight: 700; color: var(--ink); font-size: .98rem; }
.price .mrp { color: var(--ink-3); text-decoration: line-through; font-size: .78rem; }
.price.lg .now { font-size: 1.5rem; }
.price.lg .mrp { font-size: .95rem; }
.p-add {
    flex: 0 0 auto; min-width: 64px; height: 34px; padding: 0 12px; border-radius: 10px;
    border: 1.5px solid var(--orange-500); background: var(--orange-50); color: var(--orange-700);
    font-weight: 700; font-size: .8rem; letter-spacing: .04em; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    transition: background .15s, color .15s;
}
.p-add:hover { background: var(--orange-500); color: #fff; }
.p-add.added { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.p-add[disabled] { opacity: .6; }
@media (min-width: 768px) { .p-card .p-name { font-size: .9rem; } .price .now { font-size: 1.02rem; } }

/* Skeleton card */
.p-skel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; padding: 10px; }
.p-skel .s-img { aspect-ratio: 1; margin-bottom: 10px; }
.p-skel .s-line { height: 12px; margin-bottom: 8px; }

/* -----------------------------------------------------------------------------
   Product listing (filters)
   ----------------------------------------------------------------------------- */
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.list-layout { display: block; }
.filter-panel-wrap .offcanvas-body { padding-bottom: calc(16px + var(--safe-bottom)); }
@media (max-width: 991.98px) {
    .filter-panel-wrap .surface { border: 0; box-shadow: none; padding: 0; }
    .filter-panel-wrap.offcanvas-lg { max-height: 88vh; }
}
@media (min-width: 992px) {
    .list-layout { display: grid; grid-template-columns: 250px 1fr; gap: 22px; align-items: start; }
    .filter-panel-wrap { position: sticky; top: 88px; }
    .filter-panel-wrap .offcanvas-header { display: none; }
    .filter-panel-wrap .offcanvas-body { padding: 0; }
    .filter-toggle { display: none !important; }
}
.pagination { gap: 6px; flex-wrap: wrap; justify-content: center; }
.pagination .page-link { border-radius: 10px !important; border-color: var(--line); color: var(--ink-2); min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; }
.pagination .page-item.active .page-link { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }

/* -----------------------------------------------------------------------------
   Product detail
   ----------------------------------------------------------------------------- */
.pd-layout { display: grid; gap: 14px; }
@media (min-width: 768px) { .pd-layout { grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; } }
@media (min-width: 992px) { .pd-layout { grid-template-columns: 1.05fr 1fr; gap: 36px; } }
.pd-gallery { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); overflow: hidden; }
@media (min-width: 768px) { .pd-gallery { position: sticky; top: 88px; } }
.pd-gallery .carousel-item img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 16px; background: #fff; }
.pd-thumbs { display: flex; gap: 8px; padding: 0 12px 12px; overflow-x: auto; }
.pd-thumbs button { flex: 0 0 60px; height: 60px; border-radius: 10px; border: 2px solid var(--line); padding: 3px; background: #fff; }
.pd-thumbs button.active { border-color: var(--orange-500); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd-title { font-size: 1.15rem; font-weight: 600; color: var(--ink); line-height: 1.35; margin: 0; }
@media (min-width: 768px) { .pd-title { font-size: 1.45rem; } }
.pd-brand { font-size: .82rem; color: var(--navy-600); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pd-save { color: var(--green-700); font-weight: 600; font-size: .88rem; }
.delivery-box { border-radius: var(--radius); padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; }
.delivery-box.ok { background: var(--green-100); color: #14532d; }
.delivery-box.no { background: var(--red-100); color: #7f1d1d; }
.delivery-box.ask { background: var(--navy-50); color: var(--navy-800); cursor: pointer; }
.delivery-box i { font-size: 1.2rem; margin-top: 2px; }
.delivery-box .t { font-weight: 600; }
.delivery-box .s { font-size: .82rem; opacity: .85; }
.qty-stepper {
    display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; height: 48px; overflow: hidden;
}
.qty-stepper button { width: 46px; height: 100%; border: 0; background: var(--line-2); color: var(--ink); font-size: 1rem; }
.qty-stepper button:hover { background: var(--line); }
.qty-stepper input {
    width: 48px; height: 100%; border: 0; text-align: center; font-weight: 600; font-size: 16px; -moz-appearance: textfield; appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper.sm { height: 36px; border-radius: 10px; }
.qty-stepper.sm button { width: 34px; font-size: .85rem; }
.qty-stepper.sm input { width: 38px; font-size: 15px; }
.spec-table { width: 100%; font-size: .9rem; }
.spec-table th { color: var(--ink-3); font-weight: 500; width: 38%; padding: 7px 0; vertical-align: top; }
.spec-table td { color: var(--ink); padding: 7px 0; }
.stars { color: #f5a524; letter-spacing: 1px; }
.review { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.review:last-child { border-bottom: 0; }
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rating-input input { display: none; }
.rating-input label { font-size: 1.7rem; color: #d7dbe3; cursor: pointer; line-height: 1; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: #f5a524; }

/* -----------------------------------------------------------------------------
   Cart & checkout
   ----------------------------------------------------------------------------- */
.two-col { display: grid; gap: 14px; }
@media (min-width: 992px) { .two-col { grid-template-columns: 1fr 360px; gap: 24px; align-items: start; } .two-col .aside { position: sticky; top: 88px; } }
.cart-item { display: grid; grid-template-columns: auto 76px 1fr; gap: 12px; padding: 12px; align-items: start; }
@media (min-width: 768px) { .cart-item { grid-template-columns: auto 96px 1fr; padding: 16px; } }
.cart-item + .cart-item { border-top: 1px solid var(--line-2); }
.cart-item .ci-img { width: 76px; height: 76px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; padding: 4px; }
@media (min-width: 768px) { .cart-item .ci-img { width: 96px; height: 96px; } }
.cart-item .ci-img img { width: 100%; height: 100%; object-fit: contain; }
.cart-item .ci-name { font-weight: 500; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item .ci-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.cart-item.unchecked { opacity: .55; }
.ci-remove { border: 0; background: none; color: var(--ink-3); font-size: .82rem; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; padding: 6px; border-radius: 8px; }
.ci-remove:hover { color: var(--red-600); background: var(--red-100); }
.free-delivery-bar { border-radius: var(--radius); background: var(--orange-50); color: var(--orange-700); padding: 10px 12px; font-size: .85rem; font-weight: 500; }
.free-delivery-bar .track { height: 6px; background: #fff; border-radius: 4px; margin-top: 8px; overflow: hidden; }
.free-delivery-bar .fill { height: 100%; background: var(--orange-500); border-radius: 4px; }
.pay-option {
    display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; background: #fff;
}
.pay-option + .pay-option { margin-top: 10px; }
.pay-option.selected { border-color: var(--orange-500); background: var(--orange-50); }
.pay-option.disabled { opacity: .55; cursor: not-allowed; }
.pay-option .po-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--navy-50); color: var(--navy-700); display: inline-flex; align-items: center; justify-content: center; }
.addr-card { display: flex; gap: 12px; align-items: flex-start; }
.addr-card .ai { width: 40px; height: 40px; border-radius: 12px; background: var(--orange-50); color: var(--orange-600); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }

/* -----------------------------------------------------------------------------
   Orders
   ----------------------------------------------------------------------------- */
.order-card { display: block; color: var(--ink); padding: 14px; }
.order-card + .order-card { margin-top: 10px; }
.order-card:hover { color: var(--ink); box-shadow: var(--shadow); }
.order-card .oc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.order-card .oc-id { font-weight: 600; color: var(--navy-800); }
.order-card .oc-date { font-size: .8rem; color: var(--ink-3); }
.order-card .oc-thumbs { display: flex; gap: 6px; margin: 12px 0; }
.order-card .oc-thumbs img, .order-card .oc-thumbs .more {
    width: 48px; height: 48px; border-radius: 10px; border: 1px solid var(--line-2); object-fit: contain; background: #fff; padding: 3px;
}
.order-card .oc-thumbs .more { display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600; color: var(--ink-2); background: var(--line-2); }
.order-card .oc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .88rem; }
.status-O { background: var(--amber-100); color: #92400e; }
.status-A, .status-P, .status-S { background: var(--navy-100); color: var(--navy-700); }
.status-C { background: var(--green-100); color: var(--green-700); }
.status-D { background: var(--red-100); color: var(--red-600); }

/* Order progress stepper */
.stepper { display: flex; justify-content: space-between; position: relative; margin: 8px 0 4px; }
.stepper::before { content: ''; position: absolute; top: 15px; left: 12%; right: 12%; height: 3px; background: var(--line); border-radius: 3px; }
.stepper .progress-line { position: absolute; top: 15px; left: 12%; height: 3px; background: var(--green-600); border-radius: 3px; transition: width .4s; }
.stepper .step { position: relative; z-index: 1; flex: 1; text-align: center; font-size: .72rem; color: var(--ink-3); font-weight: 500; }
.stepper .dot {
    width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 3px solid var(--line); margin: 0 auto 6px;
    display: flex; align-items: center; justify-content: center; font-size: .75rem; color: var(--ink-3);
}
.stepper .step.done .dot { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.stepper .step.current .dot { border-color: var(--orange-500); color: var(--orange-600); box-shadow: 0 0 0 5px var(--orange-100); }
.stepper .step.done, .stepper .step.current { color: var(--ink); }
@media (min-width: 768px) { .stepper .step { font-size: .82rem; } }
.map-box { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); height: 240px; background: var(--navy-50); }
@media (min-width: 768px) { .map-box { height: 320px; } }
.line-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.line-item + .line-item { border-top: 1px solid var(--line-2); }
.line-item img { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; padding: 3px; flex: 0 0 auto; }
.line-item .li-name { font-weight: 500; font-size: .92rem; color: var(--ink); line-height: 1.3; }
.line-item .li-meta { font-size: .8rem; color: var(--ink-3); }
.line-item .li-amt { margin-left: auto; font-weight: 600; white-space: nowrap; }

/* -----------------------------------------------------------------------------
   Account
   ----------------------------------------------------------------------------- */
.profile-hero { display: flex; align-items: center; gap: 14px; padding: 18px; }
.profile-hero .avatar-lg {
    width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--orange-500), #ff9a4d); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700; flex: 0 0 auto;
}
.field-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.field-row + .field-row { border-top: 1px solid var(--line-2); }
.field-row .fr-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--navy-50); color: var(--navy-700); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.field-row .fr-body { flex: 1 1 auto; min-width: 0; }
.field-row .fr-label { font-size: .75rem; color: var(--ink-3); }
.field-row .fr-value { font-weight: 500; color: var(--ink); word-break: break-word; }

/* -----------------------------------------------------------------------------
   Footer (desktop)
   ----------------------------------------------------------------------------- */
.app-footer { background: var(--navy-900); color: rgba(255, 255, 255, .75); margin-top: 32px; font-size: .88rem; }
.app-footer .inner { max-width: var(--content-max); margin: 0 auto; padding: 28px 20px 20px; display: grid; gap: 22px; }
@media (min-width: 768px) { .app-footer .inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.app-footer h6 { color: #fff; font-size: .95rem; margin-bottom: 10px; }
.app-footer a { color: rgba(255, 255, 255, .75); display: block; padding: 3px 0; }
.app-footer a:hover { color: #fff; }
.app-footer .copy { border-top: 1px solid rgba(255, 255, 255, .1); text-align: center; padding: 14px 20px; font-size: .8rem; }

/* -----------------------------------------------------------------------------
   Location sheet & full-screen spinner
   ----------------------------------------------------------------------------- */
#location-suggestions { position: relative !important; margin-top: 6px; }
#location-suggestions .list-group-item { border-color: var(--line-2); padding: 12px 14px; font-size: .92rem; cursor: pointer; }
#location-suggestions .list-group-item:hover { background: var(--orange-50); }
.loc-option {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: var(--radius); border: 1.5px dashed var(--orange-500);
    background: var(--orange-50); color: var(--orange-700); font-weight: 600; text-align: left;
}
.loc-option i { font-size: 1.2rem; }
#locationMap { border-radius: var(--radius); margin-top: 12px; }
.location-spinner {
    position: fixed; inset: 0; z-index: 4000; background: rgba(255, 255, 255, .85); display: none; align-items: center; justify-content: center;
}
.location-spinner.show { display: flex; }
.location-spinner .spinner-inner {
    width: 72px; height: 72px; border-radius: 50%; background: var(--orange-500); color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 107, 33, .45); } 50% { box-shadow: 0 0 0 18px rgba(242, 107, 33, 0); } }

/* Admin screens: rows placed directly inside a zero-padding container must not stick out */
.container-fluid.px-0 > .row, .container-fluid.px-0 > form > .row { margin-left: 0; margin-right: 0; }
.card-body > .row.flex-column, .card-body > .row.my-4, .card-body > .row.mt-4 { margin-left: 0; margin-right: 0; }
.container-fluid.px-2 > .row { --bs-gutter-x: 1rem; }
@media (min-width: 768px) { .container-fluid.px-md-3 > .row { --bs-gutter-x: 1.5rem; } }

/* Tables (admin / rider screens) scroll sideways on small screens */
.table-responsive { border-radius: var(--radius); }
.table { --bs-table-bg: transparent; font-size: .9rem; }
.table > thead th { background: var(--navy-50); color: var(--navy-800); font-weight: 600; border-bottom-color: var(--line); white-space: nowrap; }

/* Utility */
.gap-2 { gap: .5rem; }
.divider-line { height: 1px; background: var(--line-2); margin: 14px 0; }
.hide-touch { display: none !important; }
@media (min-width: 992px) { .hide-touch { display: revert !important; } .hide-desktop { display: none !important; } }
.clamp-1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.min-w-0 { min-width: 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 500; font-size: .9rem; margin-bottom: 10px; }

/* -----------------------------------------------------------------------------
   Admin screens: header, filters, card lists, forms
   One column on phones, two on tablets, three on desktop
   ----------------------------------------------------------------------------- */
.adm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.adm-head .adm-home {
    width: 40px; height: 40px; border-radius: 12px; background: var(--navy-50); color: var(--navy-700);
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.adm-head h1 { font-size: 1.3rem; margin: 0; flex: 1 1 auto; min-width: 0; }
.adm-head h1 .count { font-size: .85rem; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
@media (min-width: 768px) { .adm-head h1 { font-size: 1.5rem; } }
.adm-head .btn { flex: 0 0 auto; }
@media (max-width: 575.98px) { .adm-head .btn .btn-text { display: none; } }

.adm-filters { margin-bottom: 14px; }
/* Search box with category dropdowns: stacked on phones, one row from tablets up */
.adm-search-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
.adm-search-row .form-select { min-height: 46px; }
@media (min-width: 768px) { .adm-search-row { grid-template-columns: minmax(0, 1fr) 210px auto; } .adm-search-row select[hidden] { display: none; } }
@media (min-width: 768px) { .adm-search-row:has(select[hidden]) { grid-template-columns: minmax(0, 1fr) 210px; } }
.adm-filters .surface { padding: 12px; }
.adm-filters summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--navy-800);
    padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.adm-filters summary::-webkit-details-marker { display: none; }
.adm-filters summary .chev { margin-left: auto; transition: transform .2s; }
.adm-filters[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.adm-filters[open] summary .chev { transform: rotate(180deg); }
.adm-filters[open] .surface { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }

.adm-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px) { .adm-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .adm-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.adm-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; color: var(--ink); min-width: 0; }
.adm-card.is-changed { box-shadow: 0 0 0 2px var(--orange-500); }
.adm-card .ac-head { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.adm-card .ac-thumb {
    width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; object-fit: contain; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 1.3rem;
}
.adm-card .ac-thumb.wide { width: 96px; object-fit: cover; }
.adm-card .ac-title { font-weight: 600; color: var(--navy-800); line-height: 1.3; overflow-wrap: anywhere; }
.adm-card .ac-sub { font-size: .8rem; color: var(--ink-3); overflow-wrap: anywhere; }
.adm-card .ac-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .85rem; color: var(--ink-2); }
.adm-card .ac-meta span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.adm-card .ac-meta i { color: var(--ink-3); width: 14px; text-align: center; }
.adm-card .ac-body { font-size: .9rem; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.adm-card .ac-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-2); }
.adm-card .ac-actions .btn { flex: 1 1 auto; min-height: 40px; }

.adm-form .surface + .surface { margin-top: 14px; }
.adm-form h2 { font-size: 1.05rem; margin-bottom: 12px; }
.adm-form .form-label { font-weight: 500; font-size: .88rem; color: var(--ink-2); margin-bottom: 4px; }
.adm-form .form-control, .adm-form .form-select { min-height: 44px; }
.adm-form textarea.form-control { min-height: 88px; }
.adm-save-bar { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
@media (max-width: 991.98px) {
    .adm-save-bar {
        position: fixed; left: 0; right: 0; z-index: 1035; margin: 0;
        bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
        background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16, 24, 40, .08); padding: 10px 12px;
    }
    .adm-save-bar .btn { flex: 1 1 0; min-height: 46px; }
    body.app:has(.adm-save-bar) { padding-bottom: calc(var(--bottom-nav-h) + 76px + var(--safe-bottom)); }
}
.adm-img-slot { position: relative; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--navy-50); aspect-ratio: 1; overflow: hidden; }
.adm-img-slot img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.adm-img-slot .slot-remove {
    position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; border: 0;
    background: rgba(255, 255, 255, .95); color: var(--red-600); box-shadow: var(--shadow);
}
.adm-img-slot .slot-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-3); font-size: .8rem; gap: 4px; }
