:root {
    --primary: #bdda3a;
    --primary-dark: #077a33;
    --primary-light: #e8f7ee;
    --orange: #f57c00;
    --orange-light: #fff3e0;
    --bg: #fff;
    --card: #fff;
    --text: #1b1b1b;
    --text2: #555;
    --text3: #888;
    --border: #eee;
    --white: #fff;
    --dark: #000;
    --font: 'DM Sans', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { font-family: var(--font); background: var(--bg); color: var(--text); padding-bottom: 130px; overflow-x: hidden; }
img { display: block; max-width: 100%; }
button { font-family: var(--font); cursor: pointer; border: none; }
a { text-decoration: none; }

/* =========================================
   PRODUCT CARD DISCOUNT BADGE
   ========================================= */
.pcard-discount-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 1px 5px;
    border-radius: 3px;
    margin-top: 2px;
}

/* App Top Header */
.app-header { background: var(--primary); color: #000; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.app-header .logo { font-size: 1.2rem; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.app-header .loc { font-size: 0.8rem; opacity: 0.9; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.app-header .loc b { display: block; font-size: 0.88rem; opacity: 1; }

/* =========================================
   COMBINED STICKY HEADER BLOCK
   ========================================= */
.main-sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--primary); /* Keeps the solid green background seamless */
}
/* =========================================
   SEARCH BAR MATCH HEADER COLOR
   ========================================= */
.search-wrap { 
    background: var(--primary); 
    padding: 0 16px 12px 16px; /* Extends the green block down a bit */
}
.search-box { 
    background: #ffffff; 
    border-radius: 10px; 
    padding: 10px 14px; 
    gap: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05); /* Subtle shadow on the white box */
}
.search-box input { 
    border: none; 
    outline: none; 
    background: none; 
    flex: 1; 
    font-size: 0.9rem; 
    font-family: var(--font); 
    color: var(--text);
    width: 80%;
}

/* =========================================
   HERO IMAGE SLIDER
   ========================================= */
.hero-slider { 
    padding: 0 16px; 
    background: linear-gradient(to bottom, var(--primary) 50%, var(--bg) 50%); 
    /* Background removed so it sits on the normal app background */
}
.slider-container { 
    position: relative; 
    border-radius: 12px; 
    overflow: hidden; 
    height: 140px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}
.slider-track { 
    display: flex; 
    height: 100%; 
    transition: transform 0.5s ease-in-out; 
}
.slider-slide { 
    min-width: 100%; 
    height: 100%; 
}
.slider-slide img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}
.slider-dots { 
    position: absolute; 
    bottom: 10px; 
    left: 50%; 
    transform: translateX(-50%); 
    display: flex; 
    gap: 6px; 
}
.slider-dot { 
    width: 8px; 
    height: 8px; 
    border-radius: 50%; 
    background: rgba(255,255,255,0.5); 
    cursor: pointer; 
    transition: 0.3s; 
    border: none; 
}
.slider-dot.active { 
    background: #fff; 
    width: 20px; 
    border-radius: 4px; 
}
.pt0
{
    padding-top: 0 !important;
}

/* Category Scroll */
.cat-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 14px 16px 10px 16px; scrollbar-width: none; background: var(--card); margin-bottom: 2px; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; width: 70px; text-align: center; }
.cat-chip .icon-box { width: 56px; height: auto; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; transition: 0.2s; }
.cat-chip.active .icon-box { border-color: var(--primary); }
.cat-chip span { font-size: 0.7rem; font-weight: 600; color: var(--text2); padding: 0 10px; }
.cat-chip.active span { color: var(--primary); }

/* Product Grid */
.section-head { padding: 16px 16px 8px; display: flex; justify-content: space-between; align-items: center; }
.section-head h3 { font-size: 1rem; font-weight: 700; }
.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 16px 16px; }
@media(min-width: 768px) { .pgrid { grid-template-columns: repeat(5, 1fr); } }

/* Product Card */
.pcard { background: var(--card); border-radius: 12px; overflow: hidden; position: relative; display: flex; flex-direction: column; height: 100%; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.pcard-img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f9f9f9; }
.pcard-body { padding: 10px 10px 0 10px; display: flex; flex-direction: column; flex: 1; }
.pcard-wt { font-size: 0.7rem; color: var(--text3); margin-bottom: 2px; text-transform: capitalize; }
.pcard-name { font-size: 0.82rem; font-weight: 600; line-height: 1.25; margin-bottom: auto; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 0; padding: 0 10px 10px 10px; }
.pcard-price { font-size: 0.95rem; font-weight: 800; }
.pcard-mrp { font-size: 0.72rem; color: var(--text3); text-decoration: line-through; margin-left: 4px; font-weight: 400; }

/* Zepto Style Add Button */
.add-btn { height: 32px; min-width: 32px; border-radius: 8px; font-weight: 700; font-size: 0.82rem; display: flex; align-items: center; justify-content: center; transition: 0.15s; }
.add-btn.add { background: var(--primary); color: var(--white); padding: 0 16px; }
.add-btn.ctrl { background: var(--primary); color: #fff; overflow: hidden; }
.add-btn.ctrl button { background: none; border: none; color: #fff; width: 32px; height: 32px; font-size: 1rem; display: flex; align-items: center; justify-content: center; padding: 0; }
.add-btn.ctrl .qt { width: 28px; text-align: center; font-size: 0.88rem; font-weight: 700; }

/* Sticky Bottom Cart Bar */
.cart-bar { position: fixed; bottom: 55px; left: 0; right: 0; background: var(--primary); color: #000; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; z-index: 200; box-shadow: 0 -4px 12px rgba(0,0,0,0.15); animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.cart-bar-left { display: flex; align-items: center; gap: 12px; }
.cart-bar-badge { background: var(--orange); color: #fff; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; }
.cart-bar-label { font-size: 0.85rem; font-weight: 600; display: block; }
.cart-bar-total { font-size: 0.75rem; opacity: 0.9; }
.cart-bar-btn { background: #fff; color: var(--primary); padding: 10px 20px; border-radius: 10px; font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; gap: 6px; }

/* Bottom Navigation */
/* =========================================
   PREMIUM BOTTOM NAVIGATION (Raised Center)
   ========================================= */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: flex-end; /* Aligns items to bottom so center can pop up */
    padding: 8px 0 12px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
    z-index: 201;
    border-top: 1px solid var(--border);
    padding-bottom: 4px;
}

.bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text3);
    text-decoration: none;
    transition: color 0.2s ease;
    width: 20%; /* Equal width for 5 items */
    padding-bottom: 4px;
}

.bnav-item i {
    font-size: 1.15rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.bnav-item:active i {
    transform: scale(0.9); /* Bounce effect on tap */
}

/* Active state for normal items */
.bnav-item.active {
    color: var(--primary);
}

/* ----- THE MAGIC CENTER RAISED ITEM ----- */
.bnav-center {
    position: relative;
    margin-bottom: 14px; /* Pushes it up above the line */
    color: #ffffff !important; /* Force white text */
}

/* The Green Circle Background */
.bnav-center::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    background: var(--primary);
    border-radius: 50%;
    /*box-shadow: 0 4px 12px rgba(13, 140, 62, 0.4); */
    border: 4px solid #ffffff;
    z-index: -1;
    transition: transform 0.2s ease;
}

.bnav-center:active::before {
    transform: translateX(-50%) scale(0.92);
}

.bnav-center i {
    font-size: 1.4rem; /* Larger icon */
    color: #ffffff !important;
    z-index: 1;
    position: relative;
}

/* Auth / OTP Screen */
.auth-page { display: flex; flex-direction: column; height: 100vh; background: #fff; }
.auth-header { background: var(--primary); color: #fff; padding: 16px; font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: 12px; }
.auth-body { flex: 1; padding: 32px 24px; display: flex; flex-direction: column; justify-content: center; }
.auth-body h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.auth-body p { color: var(--text3); font-size: 0.9rem; margin-bottom: 24px; }
.otp-inputs { display: flex; gap: 12px; justify-content: center; margin-bottom: 24px; }
.otp-inputs input { width: 56px; height: 56px; border: 2px solid var(--border); border-radius: 12px; text-align: center; font-size: 1.5rem; font-weight: 800; outline: none; font-family: var(--font); }
.otp-inputs input:focus { border-color: var(--primary); }
.phone-input-wrap { display: flex; gap: 8px; margin-bottom: 20px; }
.phone-input-wrap span { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; display: flex; align-items: center; font-weight: 700; font-size: 0.95rem; color: var(--text); }
.phone-input-wrap input { flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 14px; font-size: 1rem; outline: none; font-family: var(--font); }
.phone-input-wrap input:focus, .otp-inputs input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.btn-full { width: 100%; padding: 14px; border-radius: 10px; font-weight: 700; font-size: 0.95rem; border: none; }
.btn-primary-full { background: var(--primary); color: #fff; }
.btn-primary-full:active { background: var(--primary-dark); }
.error-msg { color: var(--red); font-size: 0.82rem; text-align: center; margin-top: -10px; margin-bottom: 15px; display: none; }

/* Checkout Page */
.co-header { background: var(--primary); color: #fff; padding: 14px 16px; font-weight: 700; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 50; }
.co-header a { color: #fff; font-size: 1.1rem; }
.type-card { background: var(--card); border: 2px solid var(--border); border-radius: 12px; padding: 16px; margin: 0 16px 12px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: 0.2s; }
.type-card.active { border-color: var(--primary); background: var(--primary-light); }
.type-card .tc-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; background: var(--bg); color: var(--text3); }
.type-card.active .tc-icon { background: var(--primary); color: #fff; }
.type-card h5 { font-size: 0.92rem; font-weight: 700; margin-bottom: 2px; }
.type-card p { font-size: 0.75rem; color: var(--text3); margin: 0; }
.type-card .tc-check { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: #fff; }
.type-card.active .tc-check { background: var(--primary); border-color: var(--primary); }

.co-section { background: var(--card); margin: 0 16px 12px; border-radius: 12px; padding: 16px; }
.co-section h5 { font-size: 0.88rem; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.co-section h5 i { color: var(--primary); }
.co-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.co-item:last-child { border-bottom: none; }
.co-item img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.co-item-info { flex: 1; }
.co-item-name { font-size: 0.82rem; font-weight: 600; }
.co-item-wt { font-size: 0.7rem; color: var(--text3); }
.co-item-price { font-size: 0.88rem; font-weight: 700; }

.co-sticky { position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); padding: 12px 16px; box-shadow: 0 -4px 10px rgba(0,0,0,0.1); z-index: 300; }
.co-total-row { display: flex; justify-content: space-between; font-size: 0.95rem; font-weight: 800; margin-bottom: 12px; }
.place-order-btn { width: 100%; padding: 14px; background: var(--primary); color: #fff; border: none; border-radius: 10px; font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; gap: 8px; }
.place-order-btn:active { background: var(--primary-dark); }

/* Calendar */
.cal-box { background: var(--card); border-radius: 12px; overflow: hidden; margin: 0 16px 12px; }
.cal-head { background: var(--primary); color: #fff; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; }
.cal-head button { background: rgba(255,255,255,0.15); border: none; color: #fff; width: 32px; height: 32px; border-radius: 50%; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); padding: 10px; gap: 4px; }
.cal-dn { text-align: center; font-size: 0.7rem; font-weight: 700; color: var(--text3); padding: 8px 0; }
.cal-d { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 0.82rem; font-weight: 500; cursor: pointer; border: 2px solid transparent; position: relative; }
.cal-d:hover:not(.dis) { background: var(--primary-light); }
.cal-d.sel { background: var(--primary); color: #000; border-color: var(--primary-dark); }
.cal-d.has::after { content:''; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); position: absolute; bottom: 4px; }
.cal-d.sel.has::after { background: #fff; }
.cal-d.today { border-color: var(--orange); }
.cal-d.dis { color: var(--border); cursor: default; }
.cal-d.emp { cursor: default; }

/* Success */
.success-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 80vh; padding: 40px 20px; text-align: center; }
.success-icon { width: 80px; height: 80px; background: var(--primary-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--primary); margin-bottom: 20px; animation: popIn 0.5s ease; }
@keyframes popIn { 0%{transform:scale(0)} 50%{transform:scale(1.2)} 100%{transform:scale(1)} }

/* My Orders */
.oc { background: var(--card); margin: 10px 16px; border-radius: 12px; overflow: hidden; }
.oc-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }
.oc-num { font-size: 0.85rem; font-weight: 700; }
.oc-badge { font-size: 0.65rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; }
.oc-badge.sub { background: var(--primary-light); color: var(--primary); }
.oc-badge.one { background: var(--orange-light); color: var(--orange); }
.oc-body { padding: 12px 16px; }
.oc-row { display: flex; justify-content: space-between; font-size: 0.82rem; padding: 4px 0; }
.oc-foot { padding: 10px 16px; background: var(--bg); display: flex; justify-content: space-between; align-items: center; }
.oc-total { font-weight: 800; }
/* =========================================
   APP LOADER / SPLASH SCREEN
   ========================================= */
#appLoader {
    position: fixed; inset: 0; background: #bdda3a; z-index: 999999;
    display: none; /* Hidden by default, JS turns it on during navigation */
    flex-direction: column; align-items: center; justify-content: center;
    transition: opacity 0.3s ease;
}
#appLoader.show { display: flex; }
#appLoader.hide { opacity: 0; pointer-events: none; }
.loader-mono {
    width: 120px; height: 120px; /*border-radius: 20px;*/
    display: flex; align-items: center; justify-content: center;
    animation: loaderPulse 1.2s infinite ease-in-out;
    /*box-shadow: 0 10px 30px rgba(13, 140, 62, 0.3);*/
}
@keyframes loaderPulse { 
    0% { transform: scale(0.95); } 
    50% { transform: scale(1.05); } 
    100% { transform: scale(0.95); } 
}
.loader-brand { font-family: var(--font); font-size: 1.5rem; font-weight: 800; margin-top: 16px; color: var(--text); }
.loader-sub { font-size: 0.85rem; color: var(--text3); margin-top: 6px; }

/* =========================================
   CHECKOUT CART EDITING & SCHEDULE UI
   ========================================= */
.co-item-controls { display: flex; align-items: center; gap: 4px; }
.co-item-controls .c-ctrl-btn {
    width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border);
    background: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; color: var(--text); cursor: pointer;
}
.co-item-controls .c-ctrl-btn:active { background: var(--bg); }
.co-item-controls .c-qt { font-size: 0.85rem; font-weight: 700; width: 28px; text-align: center; }

/* Schedule Panel (Hidden by default) */
#schedulePanel { display: none; }
#oneTimePanel { display: block; }

.sched-item-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid var(--border);
}
.sched-item-row:last-child { border-bottom: none; }
.sched-date-badge {
    font-size: 0.7rem; font-weight: 700; color: var(--primary); 
    background: var(--primary-light); padding: 4px 10px; border-radius: 6px;
    margin-bottom: 8px; display: inline-block;
}
.sched-remove { background: none; border: none; color: var(--text3); cursor: pointer; padding: 4px; font-size: 0.85rem; }
.sched-remove:hover { color: var(--red); }

.cal-box { margin: 0 0 16px 0; }
.schedule-actions { padding: 16px; }
.cat-chip { text-decoration: none; color: inherit; }



/* =========================================
   ADMIN PANEL STYLES
   ========================================= */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
    padding-top: 0;
}

.admin-sidebar {
    width: 260px;
    background: #fff;
    border-right: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

.admin-sidebar h6 {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text3);
    padding: 15px 20px 5px;
    letter-spacing: 1px;
    margin: 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: var(--text2);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: 0.2s;
    border-left: 3px solid transparent;
}

.admin-nav-link:hover {
    background: var(--bg);
    color: var(--text);
}

.admin-nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 700;
}

.admin-nav-link i {
    width: 20px;
    text-align: center;
}

.admin-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.admin-mobile-nav {
    display: none;
    background: #fff;
    padding: 10px 16px;
    gap: 10px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.admin-mobile-nav a {
    text-decoration: none;
    color: var(--text2);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 6px;
}

.admin-mobile-nav a.active {
    background: var(--primary);
    color: #fff;
}

/* Stat Cards */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text3);
    font-weight: 600;
}

/* Admin Tables */
.admin-table-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}

.admin-table-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-table-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.admin-table-wrapper .table {
    margin: 0;
    font-size: 0.88rem;
}

.admin-table-wrapper .table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text3);
    font-weight: 700;
    border-bottom-width: 1px;
    padding: 12px 16px;
}

.admin-table-wrapper .table td {
    padding: 12px 16px;
    vertical-align: middle;
}

/* Badges & Status */
.order-type-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}
.badge-subscription { background: var(--primary-light); color: var(--primary); }
.badge-one-time { background: var(--orange-light); color: var(--orange); }

.order-status {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}
.status-pending { background: #fff3cd; color: #856404; }
.status-confirmed { background: #d1ecf1; color: #0c5460; }
.status-processing { background: #cce5ff; color: #004085; }
.status-delivered { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }
.status-scheduled { background: #e2e3e5; color: #383d41; }
.status-dispatched { background: #cce5ff; color: #004085; }

.stock-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}
.stock-in { background: #d4edda; color: #155724; }
.stock-low { background: #fff3cd; color: #856404; }
.stock-out { background: #f8d7da; color: #721c24; }

/* Admin Action Buttons */
.btn-sm-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: 0.2s;
    text-decoration: none;
}
.btn-edit { background: #e2e3e5; color: var(--text); }
.btn-edit:hover { background: #cce5ff; color: #004085; }
.btn-delete { background: #f8d7da; color: #721c24; }
.btn-delete:hover { background: #f5c6cb; }

/* Forms & Cards */
.checkout-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn-primary-custom {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
    text-decoration: none;
}
.btn-primary-custom:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* Responsive Admin */
@media (max-width: 992px) {
    .admin-sidebar {
        display: none;
    }
    .admin-mobile-nav {
        display: flex;
    }
    .admin-content {
        padding: 16px;
    }
}

/* Veg / Non-Veg Indicator Dots */
.food-type-dot {
    width: 14px; height: 14px; border: 2px solid;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 2px; margin-right: 5px; vertical-align: middle; flex-shrink: 0;
    position: absolute; right: 10px; top: 10px;
}
.food-type-dot.veg { border-color:green; background-color: #fff; }
.food-type-dot.veg::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: green; }
.food-type-dot.non-veg { border-color: #e53935; background-color: #fff;}
.food-type-dot.non-veg::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #e53935; }
/* ==========================================
   INLINE PRICE ROW & OFF BADGE
   ========================================== */
.pcard-price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap; /* Allows it to squish safely on small screens */
}
.pcard-off-badge {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.3;
}
/* Lock UI when out of delivery zone */
body.not-servicable .cart-bar,
body.not-servicable .bottom-nav { display: none !important; }
body.not-servicable .add-btn { pointer-events: none; opacity: 0.4; }
body.not-servicable .pcard { opacity: 0.5; pointer-events: none; }



/* =========================================
   PREMIUM ADDRESS FORM UI
   ========================================== */
.address-saved-card {
    background: var(--primary-light); border: 1px solid var(--primary); border-radius: 10px;
    padding: 14px; display: flex; justify-content: space-between; align-items: center; cursor: pointer;
}
.address-saved-card:active { background: #d4edda; }
.address-saved-loc { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.address-saved-sub { font-size: 0.78rem; color: var(--text2); margin-top: 2px; }
.address-saved-btn { font-size: 0.8rem; color: var(--primary); font-weight: 700; background: #fff; padding: 6px 12px; border-radius: 6px; border: none; }

.addr-form-group { margin-bottom: 10px; }
.addr-form-label { font-size: 0.75rem; font-weight: 700; color: var(--text2); text-transform: uppercase; margin-bottom: 4px; display: block; }
.addr-form-input { width: 100%; border: 1.5px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 0.9rem; outline: none; transition: 0.2s; }
.addr-form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.addr-form-error { color: #dc3545; font-size: 0.75rem; margin-top: 3px; display: none; animation: shakeX 0.4s ease; }

.addr-tag-row { display: flex; gap: 8px; margin-bottom: 12px; }
.addr-tag { padding: 8px 14px; border-radius: 8px; border: 1.5px solid var(--border); background: #fff; font-size: 0.82rem; font-weight: 600; color: var(--text2); cursor: pointer; transition: 0.2s; }
.addr-tag.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.addr-tag:active { transform: scale(0.95); }

.loc-btn-full { width: 100%; padding: 12px; border-radius: 8px; border: 1.5px dashed var(--border); background: #fff; color: var(--text2); font-weight: 600; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: 0.2s; margin-top: 8px; }
.loc-btn-full:active { background: var(--bg); }
.loc-btn-full.loading { pointer-events: none; opacity: 0.6; }

/* =========================================
   CHECKOUT PAGE SPECIFIC OVERRIDES
   ========================================= */
body.checkout-active { padding-bottom: 0 !important; }
body.checkout-active .bottom-nav,
body.checkout-active .cart-bar { display: none !important; }

/* =========================================
   CUSTOM SCHEDULE DROPDOWN
   ========================================= */
.custom-sched-select { position: relative; margin-bottom: 8px; }
.custom-sched-trigger {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px;
    background: #fff; cursor: pointer; font-size: 0.85rem; min-height: 42px;
}
.custom-sched-trigger i { font-size: 0.75rem; color: var(--text3); }
.custom-sched-list {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border: 1.5px solid var(--border); border-top: none;
    border-radius: 0 0 8px 8px; max-height: 200px; overflow-y: auto; z-index: 999;
    list-style: none; padding: 0; margin: 0; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.custom-sched-list.show { display: block; }
.custom-sched-list li {
    display: flex; align-items: center; gap: 10px; padding: 8px 14px;
    cursor: pointer; font-size: 0.82rem; border-bottom: 1px solid var(--border); transition: 0.2s;
}
.custom-sched-list li:last-child { border-bottom: none; }
.custom-sched-list li:hover { background: var(--bg); }
.custom-sched-list li img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }

/* =========================================
   APP INLINE ERROR MESSAGE
   ========================================= */
.app-error-msg {
    display: none; color: #dc3545; font-size: 0.8rem; margin-top: 4px; 
    animation: shakeX 0.4s ease; /* Uses existing keyframe from this file */
}

/* =========================================
   MAP PICKER UI
   ========================================= */
.input-group-map { display: flex; gap: 8px; }
.input-group-map .addr-form-input { flex: 1; background: #f9f9f9; cursor: pointer; }
.pick-map-btn {
    background: var(--primary); color: #fff; border: none; border-radius: 8px;
    padding: 0 14px; cursor: pointer; font-size: 0.85rem; font-weight: 600; white-space: nowrap;
    display: flex; align-items: center; gap: 6px;
}
.pick-map-btn:active { background: var(--primary-dark); }

.map-modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 10000; justify-content: center; align-items: center;
    flex-direction: column; padding: 20px; box-sizing: border-box;
}
.map-modal-box {
    background: #fff; border-radius: 16px; width: 100%; max-width: 500px; 
    height: 80vh; max-height: 600px; display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.map-modal-header {
    padding: 16px; background: #fff; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.map-modal-header h4 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.map-close-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #666; line-height: 1; }
.map-close-btn:hover { color: #000; }
#locationPickerMap { flex: 1; width: 100%; background: #e5e5e5; }
.map-modal-footer {
    padding: 16px; background: #fff; border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
#mapSelectedAddr { font-size: 0.85rem; color: #555; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#confirmMapBtn {
    background: var(--primary); color: #fff; border: none; padding: 10px 20px;
    border-radius: 8px; font-weight: 700; cursor: pointer; font-family: var(--font);
}
#confirmMapBtn:disabled { opacity: 0.5; cursor: not-allowed; }
#confirmMapBtn:not(:disabled):active { background: var(--primary-dark); }