/* ============================================================
   ANNADATHA BAZAR – MOBILE APP CSS  v2.0
   For PWA / TWA mobile & tablet layout (max-width: 1023px)
   Desktop layout (1024px+) is UNTOUCHED
   ============================================================ */

/* ---- Google Font for App ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --app-green:       #4caf50;
    --app-green-dark:  #2e7d32;
    --app-green-light: #e8f5e9;
    --app-orange:      #ff9800;
    --app-orange-light:#fff3e0;
    --app-blue:        #2196f3;
    --app-purple:      #9c27b0;
    --app-red:         #f44336;
    --app-teal:        #009688;
    --app-bg:          #f4f6f4;
    --app-card-bg:     #ffffff;
    --app-text:        #1a1a1a;
    --app-text-muted:  #6b7280;
    --app-border:      #e5e7eb;
    --app-radius:      14px;
    --app-radius-sm:   8px;
    --bottom-nav-h:    78px;
    /* Space below fixed bottom nav (scroll end + visual breathing room) */
    --bottom-nav-gap:  10px;
    --top-bar-h:       60px;
    --app-shadow:      0 2px 16px rgba(0,0,0,0.08);
    --app-shadow-lg:   0 8px 32px rgba(0,0,0,0.12);
    /* Safe area insets for PWA/TWA full-screen mode */
    --safe-top:    env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left:   env(safe-area-inset-left, 0px);
    --safe-right:  env(safe-area-inset-right, 0px);
}

/* ============================================================
   PWA GLOBAL: Native feel (applies on all viewport sizes)
   ============================================================ */

/* Prevent iOS "rubber-banding" on the page root */
html {
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Remove tap highlights globally for native feel */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Smooth scrolling for all scroll containers */
.app-horizontal-scroll,
.category-chips,
.app-filter-row,
.app-stats-row,
.mobile-bottom-nav__services-list {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

/* ============================================================
   PWA STANDALONE MODE — extra top padding for notched devices
   (triggered when app runs in standalone/fullscreen from home screen)
   ============================================================ */
@media (display-mode: standalone) {
    body {
        /* Add notch safe area to top */
        padding-top: var(--safe-top);
    }
    /* Ensure top bar accounts for notch in standalone */
    .app-top-bar {
        padding-top: calc(var(--safe-top) + 8px) !important;
        min-height: calc(var(--top-bar-h) + var(--safe-top)) !important;
    }
    .app-screen {
        padding-top: calc(var(--top-bar-h) + var(--safe-top)) !important;
    }
    /* Bottom nav with full safe area for home indicator */
    .bottom-nav,
    .mobile-bottom-nav {
        padding-bottom: calc(var(--safe-bottom) + 6px) !important;
        min-height: calc(var(--bottom-nav-h) + var(--safe-bottom)) !important;
    }
    /* Ensure body scrolls don't go under home indicator */
    .page-wrapper {
        padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 10px) !important;
    }
}

/* ============================================================
   TWA STANDALONE: Hide address bar space on Android TWA
   ============================================================ */
@media (display-mode: standalone), (display-mode: fullscreen) {
    /* Remove any extra pseudo-browser chrome spacing */
    .main-header {
        top: env(safe-area-inset-top, 0px) !important;
    }
}

/* ============================================================
   ONLY APPLY ON MOBILE + TABLET (max 1023px)
   ============================================================ */

@media (max-width: 1023px) {

/* ---- Reset & Base ---- */
* { box-sizing: border-box; }

body.app-mode {
    font-family: 'Inter', 'DM Sans', sans-serif;
    background: var(--app-bg);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* ---- Hide Desktop Elements in App Mode ---- */
body.app-mode .main-header,
body.app-mode .stricky-header,
body.app-mode .mobile-nav__wrapper,
body.app-mode .page-header,
body.app-mode .preloader,
body.app-mode .custom-cursor__cursor,
body.app-mode .custom-cursor__cursor-two {
    display: none !important;
}

/* Bottom inset: single place (avoid body + .page-wrapper + .app-screen stacking) */
body.app-mode {
    padding-bottom: 0 !important;
}

/* No top bar on landing/login/etc. — avoid empty gap when .main-header is hidden */
body.app-mode .page-wrapper {
    /* padding-top: 0 !important; */
    padding-bottom: calc(var(--bottom-nav-h) + var(--bottom-nav-gap)) !important;
}

/* .app-screen adds its own bottom pad — don’t double with .page-wrapper */
body.app-mode .page-wrapper:has(.app-screen) {
    padding-bottom: 0 !important;
}

/* Reserve space only when a fixed .app-top-bar is in the page (include notch / safe area) */
body.app-mode .page-wrapper:has(.app-top-bar) {
    padding-top: calc(var(--top-bar-h) + env(safe-area-inset-top, 0px)) !important;
}


/* ---- Hide Footer on App Mode ---- */
body.app-mode footer,
body.app-mode .site-footer,
body.app-mode .footer-one,
body.app-mode .footer__bottom {
    display: none !important;
}

/* ---- Show Desktop-Only / Hide on Mobile ---- */
.desktop-only {
    display: none !important;
}

/* ============================================================
   APP TOP BAR
   ============================================================ */
.app-top-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    min-height: calc(var(--top-bar-h) + env(safe-area-inset-top, 0px));
    height: auto;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: env(safe-area-inset-top, 0px) 16px 0;
    z-index: 1000;
    box-shadow: 0 1px 0 var(--app-border);
}

.app-top-bar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.app-top-bar__logo img {
    height: 36px;
    width: 36px;
    border-radius: 8px;
    object-fit: cover;
}

/* Wide brand mark (logos/Alogo.png) — home top bar (text removed; logo only) */
.app-top-bar__logo img.app-top-bar__mark {
    width: auto;
    max-width: min(200px, 55vw);
    height: 40px;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
}

.app-top-bar__logo-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--app-green-dark);
    line-height: 1.1;
}

.app-top-bar__logo-sub {
    font-size: 10px;
    color: var(--app-text-muted);
    font-weight: 400;
}

.app-top-bar__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-top-bar__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--app-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
}

.app-top-bar__notification {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--app-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--app-text-muted);
    border: none;
    cursor: pointer;
}

.app-top-bar__back {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--app-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--app-text);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.app-top-bar__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--app-text);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* App Screen Wrapper */
.app-screen {
    min-height: 100vh;
    padding-top: var(--top-bar-h);
    padding-bottom: calc(var(--bottom-nav-h) + var(--bottom-nav-gap));
    background: var(--app-bg);
}

.app-screen--login {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   BOTTOM NAVIGATION (app shell)
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: var(--bottom-nav-h);
    height: auto;
    background: linear-gradient(180deg, #f6faf6 0%, #ffffff 38%, #f9fbf9 100%);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2px;
    padding: 8px 8px 6px;
    padding-bottom: calc(var(--bottom-nav-gap) + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(46, 125, 50, 0.14);
    z-index: 1000;
    box-shadow:
        0 -8px 28px rgba(46, 125, 50, 0.07),
        0 -1px 0 rgba(255, 255, 255, 0.95) inset;
}

.bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    text-decoration: none;
    color: var(--app-text-muted);
    font-size: 0;
    padding: 6px 5px 3px;
    min-height: 52px;
    border-radius: 14px;
    transition: background 0.22s ease, color 0.22s ease;
    cursor: pointer;
    border: none;
    background: none;
    flex: 1;
    min-width: 0;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav__icon-slot {
    width: 50px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.04);
    transition: background 0.22s ease, box-shadow 0.22s ease, transform 0.2s ease;
}

.bottom-nav__icon-slot i {
    font-size: 19px;
    font-weight: 900;
    color: #6b7280;
    transition: transform 0.2s ease, color 0.2s ease;
}

.bottom-nav__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--app-text-muted);
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bottom-nav__item.active .bottom-nav__label {
    color: var(--app-green-dark);
    font-weight: 700;
}

.bottom-nav__item.active .bottom-nav__icon-slot {
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.22) 0%, rgba(46, 125, 50, 0.14) 100%);
    box-shadow:
        0 2px 10px rgba(46, 125, 50, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.bottom-nav__item.active .bottom-nav__icon-slot i {
    color: var(--app-green-dark);
    transform: scale(1.08);
}

.bottom-nav__item:active .bottom-nav__icon-slot {
    transform: scale(0.96);
}

/* Sell column + FAB */
.bottom-nav__sell-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
    padding-bottom: 1px;
}

.bottom-nav__sell-label {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--app-text-muted);
    line-height: 1.2;
}

.bottom-nav__fab {
    position: relative;
    width: 54px;
    height: 54px;
    margin-top: -22px;
    margin-bottom: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #66bb6a 0%, var(--app-green) 40%, var(--app-green-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    text-decoration: none;
    flex-shrink: 0;
    box-shadow:
        0 6px 20px rgba(46, 125, 50, 0.45),
        0 0 0 3px rgba(255, 255, 255, 0.95),
        0 0 0 5px rgba(76, 175, 80, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bottom-nav__fab-ring {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(76, 175, 80, 0.35);
    pointer-events: none;
    animation: bottom-nav-fab-glow 2.8s ease-in-out infinite;
}

@keyframes bottom-nav-fab-glow {
    0%, 100% { opacity: 0.65; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
    .bottom-nav__fab-ring {
        animation: none;
        opacity: 0.85;
    }
}

.bottom-nav__fab:hover,
.bottom-nav__fab:active {
    transform: scale(1.06);
    color: #fff;
    box-shadow:
        0 8px 26px rgba(46, 125, 50, 0.5),
        0 0 0 3px rgba(255, 255, 255, 0.98),
        0 0 0 6px rgba(76, 175, 80, 0.28);
}

/* Footer guest nav: hide when this page already has the app bottom bar (avoids double stack) */
body.app-mode:has(#bottom-nav) .mobile-bottom-nav-wrap {
    display: none !important;
}

/* ============================================================
   MOBILE LOGIN SCREEN
   ============================================================ */
.mobile-login {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(160deg, #1b5e20 0%, #2e7d32 35%, #4caf50 70%, #81c784 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative blobs */
.mobile-login::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    pointer-events: none;
}

.mobile-login::after {
    content: '';
    position: absolute;
    bottom: 30%; left: -60px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}

.mobile-login__hero {
    flex: 0 0 auto;
    padding: 60px 32px 40px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.mobile-login__logo {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    object-fit: cover;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.mobile-login__app-name {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
}

.mobile-login__tagline {
    font-size: 14px;
    color: rgba(255,255,255,0.82);
    margin: 0;
    font-weight: 400;
}

/* White card at bottom */
.mobile-login__card {
    flex: 1 1 auto;
    background: #fff;
    border-radius: 30px 30px 0 0;
    padding: 36px 28px 40px;
    position: relative;
    z-index: 1;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.12);
}

.mobile-login__heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--app-text);
    margin: 0 0 6px;
}

.mobile-login__subheading {
    font-size: 14px;
    color: var(--app-text-muted);
    margin: 0 0 28px;
}

/* Input fields */
.app-input-group {
    margin-bottom: 16px;
}

.app-input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--app-text);
    margin-bottom: 8px;
}

.app-input-wrap {
    position: relative;
}

.app-input-wrap i.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--app-text-muted);
    font-size: 15px;
    pointer-events: none;
}

.app-input {
    width: 100%;
    height: 52px;
    background: var(--app-bg);
    border: 1.5px solid var(--app-border);
    border-radius: 12px;
    padding: 0 16px 0 44px;
    font-size: 15px;
    color: var(--app-text);
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.app-input:focus {
    border-color: var(--app-green);
    box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
    background: #fff;
}

.app-input-wrap .toggle-pw {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--app-text-muted);
    font-size: 15px;
    cursor: pointer;
    padding: 4px;
}

/* Primary button */
.app-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, var(--app-green), var(--app-green-dark));
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    font-family: 'Inter', sans-serif;
    margin-top: 8px;
    box-shadow: 0 4px 16px rgba(46,125,50,0.35);
}

.app-btn:hover, .app-btn:active {
    transform: scale(0.98);
    color: #fff;
}

.app-btn--outline {
    background: transparent;
    border: 2px solid var(--app-green-dark);
    color: var(--app-green-dark);
    box-shadow: none;
}

.app-btn--outline:hover {
    background: var(--app-green-light);
    color: var(--app-green-dark);
}

.mobile-login__links {
    text-align: center;
    margin-top: 20px;
}

.mobile-login__links a {
    color: var(--app-text-muted);
    font-size: 13px;
    text-decoration: none;
}

.mobile-login__links a:hover { color: var(--app-green-dark); }

.mobile-login__links .register-link {
    display: block;
    margin-top: 14px;
    font-size: 14px;
    color: var(--app-text-muted);
}

.mobile-login__links .register-link a {
    color: var(--app-green-dark);
    font-weight: 700;
}

/* ============================================================
   HOME SCREEN
   ============================================================ */
.app-home {
    padding: 0;
}

/* Greeting banner */
.app-greeting {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 60%, #388e3c 100%);
    padding: 20px 20px 40px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.app-greeting::after {
    content: '';
    position: absolute;
    bottom: -30px; right: -30px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
}

.app-greeting__text {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin: 0 0 2px;
}

.app-greeting__name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.app-greeting__sub {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

/* Search bar */
.app-search-bar {
    margin: -22px 16px 0;
    position: relative;
    z-index: 10;
}

.app-search-input {
    width: 100%;
    height: 48px;
    background: #fff;
    border: none;
    border-radius: 12px;
    padding: 0 48px 0 44px;
    font-size: 14px;
    color: var(--app-text);
    box-shadow: var(--app-shadow-lg);
    outline: none;
    font-family: 'Inter', sans-serif;
}

.app-search-input::placeholder { color: var(--app-text-muted); }

.app-search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--app-green);
    font-size: 15px;
}

/* Section titles */
.app-section {
    padding: 20px 16px 4px;
}

.app-section__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--app-text);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-section__see-all {
    font-size: 13px;
    font-weight: 600;
    color: var(--app-green-dark);
    text-decoration: none;
}

/* ============================================================
   CATEGORY CHIPS
   ============================================================ */
.category-chips {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 16px 12px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-chips::-webkit-scrollbar { display: none; }

.category-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s;
    border: none;
    background: none;
    padding: 0;
}

.category-chip:hover { transform: scale(1.05); }

.category-chip__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-chip:hover .category-chip__icon {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.category-chip.active .category-chip__icon {
    outline: 3px solid rgba(255,255,255,0.6);
    outline-offset: 2px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.category-chip__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--app-text);
    white-space: nowrap;
}

/* ============================================================
   PRODUCT CARDS (Premium Horizontal List)
   ============================================================ */
.product-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.product-card {
    background: #fff;
    border-radius: 16px;
    display: flex;
    flex-direction: row;
    padding: 10px;
    text-decoration: none !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid var(--app-border);
    transition: transform 0.2s;
    overflow: hidden;
}

.product-card:active {
    transform: scale(0.97);
    background: #fcfcfc;
}

.product-card__img-container {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--app-bg);
}

.product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: var(--app-green-light);
}

.product-card__body {
    flex: 1;
    padding-left: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.product-card__name {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card__price {
    font-size: 16px;
    font-weight: 800;
    color: #e65100;
    margin: 0;
}

.product-card__price span {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

.product-card__meta {
    font-size: 11px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
}

.product-card__meta i { 
    font-size: 10px;
    color: var(--app-green);
}

.product-card__call-btn {
    margin-top: 8px;
    background: var(--app-green-light);
    color: var(--app-green-dark);
    padding: 6px 0;
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none !important;
}

/* ============================================================
   FILTER BAR (Market Page)
   ============================================================ */
.app-filter-bar {
    background: #fff;
    padding: 12px 16px;
    border-bottom: 1px solid var(--app-border);
    position: sticky;
    top: var(--top-bar-h);
    z-index: 100;
}

.app-filter-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.app-filter-row::-webkit-scrollbar { display: none; }

.app-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--app-bg);
    border: 1.5px solid var(--app-border);
    color: var(--app-text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 30px;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    transition: all 0.18s;
    flex-shrink: 0;
}

.app-filter-chip:hover,
.app-filter-chip.active {
    background: var(--app-green-dark);
    border-color: var(--app-green-dark);
    color: #fff;
}

.app-filter-chip i { font-size: 12px; }

/* Dropdown filters panel */
.filter-panel {
    background: #fff;
    border-bottom: 1px solid var(--app-border);
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.filter-panel.open {
    max-height: 400px;
    padding: 16px 16px;
}

.filter-panel__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.filter-panel__item label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--app-text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-panel__select,
.filter-panel__input {
    width: 100%;
    height: 44px;
    background: var(--app-bg);
    border: 1.5px solid var(--app-border);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--app-text);
    font-family: 'Inter', sans-serif;
    outline: none;
}

.filter-panel__select:focus,
.filter-panel__input:focus {
    border-color: var(--app-green);
}

.filter-panel__actions {
    display: flex;
    gap: 10px;
}

.filter-panel__apply {
    flex: 1;
    height: 44px;
    background: var(--app-green-dark);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.filter-panel__reset {
    height: 44px;
    padding: 0 16px;
    background: var(--app-bg);
    border: 1.5px solid var(--app-border);
    color: var(--app-text-muted);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

/* ============================================================
   STAT / INFO CARDS
   ============================================================ */
.app-stats-row {
    display: flex;
    gap: 12px;
    padding: 0 16px 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.app-stats-row::-webkit-scrollbar { display: none; }

.app-stat-card {
    flex-shrink: 0;
    width: 130px;
    background: var(--app-card-bg);
    border-radius: 14px;
    padding: 16px 14px;
    box-shadow: var(--app-shadow);
    text-align: center;
    text-decoration: none;
    color: var(--app-text);
}

.app-stat-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 10px;
}

.app-stat-card__label {
    font-size: 12px;
    color: var(--app-text-muted);
    font-weight: 500;
}

.app-stat-card__value {
    font-size: 18px;
    font-weight: 800;
    color: var(--app-text);
}

/* ============================================================
   MORE SHEET (slide-up)
   ============================================================ */
.more-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.more-sheet-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.more-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-radius: 24px 24px 0 0;
    padding: 24px 20px 36px;
    z-index: 2100;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
}

.more-sheet.open { transform: translateY(0); }

.more-sheet__handle {
    width: 36px;
    height: 4px;
    background: var(--app-border);
    border-radius: 2px;
    margin: 0 auto 24px;
}

.more-sheet__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--app-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 14px;
}

.more-sheet__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.more-sheet__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: var(--app-text);
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

.more-sheet__icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.more-sheet__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--app-text);
    text-align: center;
}

.more-sheet__logout {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: #fff1f0;
    border: 1.5px solid #ffc9c9;
    border-radius: 12px;
    color: #c62828;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    margin-top: 8px;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.app-toast {
    position: fixed;
    top: calc(var(--top-bar-h) + 12px);
    left: 16px; right: 16px;
    background: #1a1a1a;
    color: #fff;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 5000;
    transform: translateY(-80px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.app-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ============================================================
   LISTING PAGE - MOBILE OVERRIDES
   ============================================================ */
/* Crops / Products listing — mobile compact */
.mobile-listing-header {
    background: linear-gradient(135deg, #1b5e20, #388e3c);
    padding: 20px 16px;
    color: #fff;
}

.mobile-listing-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.mobile-listing-header p {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

.mobile-listing-header .sell-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid rgba(255,255,255,0.4);
    transition: background 0.2s;
}

.mobile-listing-header .sell-btn:hover {
    background: rgba(255,255,255,0.35);
    color: #fff;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.app-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    color: var(--app-text-muted);
}

.app-empty i {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.app-empty h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--app-text);
    margin: 0 0 8px;
}

.app-empty p {
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

/* ============================================================
   APP MODE: PROFILE SPACING + SITE-WIDE .thm-btn
   Theme .thm-btn uses heavy left padding + circular i; normalize for touch.
   ============================================================ */
body.app-mode section.profile-page {
    padding-top: 12px !important;
    padding-bottom: calc(var(--bottom-nav-h) + var(--bottom-nav-gap)) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.app-mode .profile-page .container {
    padding-left: 12px;
    padding-right: 12px;
    max-width: 100%;
}

body.app-mode .profile-sidebar,
body.app-mode .profile-content {
    padding: 16px 14px !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    overflow: visible !important;
}

body.app-mode .profile-page .profile-avatar {
    width: 96px !important;
    height: 96px !important;
    font-size: 40px !important;
    flex-shrink: 0;
}

body.app-mode .profile-page .profile-name {
    font-size: 18px !important;
    margin-bottom: 10px !important;
}

body.app-mode .profile-page .profile-meta {
    font-size: 14px !important;
    justify-content: flex-start !important;
}

body.app-mode .profile-page .profile-nav__link {
    min-height: 50px !important;
    padding: 12px 12px !important;
    font-size: 15px !important;
    border-radius: 14px !important;
}

body.app-mode .profile-page .profile-nav__item {
    margin-bottom: 6px !important;
}

body.app-mode .profile-content > h3 {
    font-size: 18px !important;
    margin-bottom: 14px !important;
    padding-bottom: 10px !important;
}

body.app-mode .profile-page .profile-nav {
    padding-top: 12px !important;
}

body.app-mode .profile-page .profile-nav li {
    margin-bottom: 10px !important;
}

body.app-mode .profile-page .profile-nav a {
    font-size: 15px !important;
}

body.app-mode .profile-page .btn-sm {
    min-height: 40px;
    padding: 8px 12px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

body.app-mode .thm-btn,
body.app-mode a.thm-btn,
body.app-mode button.thm-btn {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: row !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 48px !important;
    padding: 12px 18px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    line-height: 1.25 !important;
    box-sizing: border-box !important;
    text-align: center !important;
    overflow: visible !important;
}

body.app-mode .thm-btn i,
body.app-mode a.thm-btn i,
body.app-mode button.thm-btn i {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    margin-left: 0 !important;
    line-height: 1 !important;
    font-size: 14px !important;
    flex-shrink: 0;
}

/* ============================================================
   TABLET ADJUSTMENTS (768px – 1023px)
   ============================================================ */
@media (min-width: 768px) and (max-width: 1023px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .more-sheet__grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .app-greeting {
        padding: 28px 32px 50px;
    }

    .mobile-login__card {
        max-width: 520px;
        margin: 0 auto;
        border-radius: 24px;
    }

    .mobile-login {
        justify-content: center;
        align-items: center;
        padding: 40px 24px;
    }

    .mobile-login__hero {
        padding: 0 0 24px;
    }

    .category-chip__icon {
        width: 64px;
        height: 64px;
        font-size: 26px;
    }

    .app-top-bar {
        padding: 0 24px;
    }

    .app-section {
        padding: 24px 24px 4px;
    }

    .product-grid {
        padding: 0 24px 24px;
    }

    .category-chips {
        padding: 4px 24px 12px;
    }

    .bottom-nav__item {
        font-size: 12px;
    }

    .bottom-nav__icon-slot i {
        font-size: 20px;
    }

    .bottom-nav__label {
        font-size: 11px;
    }
}

} /* end @media (max-width: 1023px) */

/* ============================================================
   HIDE APP ELEMENTS ON DESKTOP (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
    .app-top-bar,
    .bottom-nav,
    .more-sheet,
    .more-sheet-overlay,
    .app-screen,
    .mobile-login,
    .app-home,
    .app-toast,
    .mobile-listing-header,
    .mobile-only {
        display: none !important;
    }

    .desktop-only {
        display: block !important;
    }
}
