/* ==========================================================================
   ALLAGADDA VARI VINDU - CORE DESIGN SYSTEM
   Authentic Rayalaseema Culinary Experience
   ========================================================================== */

:root {
    --avv-primary: #8B0000;         /* Deep Maroon */
    --avv-primary-hover: #700000;
    --avv-secondary: #E65100;       /* Warm Saffron / Orange */
    --avv-secondary-hover: #BF360C;
    --avv-accent: #2E7D32;          /* Veg Green */
    --avv-accent-nonveg: #C62828;   /* Non-veg Red */
    --avv-bg: #FFFDF9;              /* Warm Cream */
    --avv-card-bg: #FFFFFF;
    --avv-text-main: #1F2937;
    --avv-text-muted: #6B7280;
    --avv-border: #F3E8E2;
    --avv-shadow: 0 4px 20px rgba(139, 0, 0, 0.08);
    --avv-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --avv-radius-sm: 8px;
    --avv-radius: 16px;
    --avv-radius-pill: 9999px;
    --avv-font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --bottom-nav-height: 64px;
}

body {
    font-family: var(--avv-font-main);
    background-color: var(--avv-bg);
    color: var(--avv-text-main);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-primary-avv {
    color: var(--avv-primary) !important;
}

.text-secondary-avv {
    color: var(--avv-secondary) !important;
}

.bg-primary-avv {
    background-color: var(--avv-primary) !important;
    color: #FFFFFF;
}

.bg-secondary-avv {
    background-color: var(--avv-secondary) !important;
    color: #FFFFFF;
}

/* Glassmorphism Header */
.avv-header {
    background: rgba(255, 253, 249, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--avv-border);
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* Swiggy/Zomato style Food Cards */
.dish-card {
    background: var(--avv-card-bg);
    border: 1px solid var(--avv-border);
    border-radius: var(--avv-radius);
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.dish-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--avv-shadow-lg);
    border-color: rgba(139, 0, 0, 0.2);
}

.dish-card-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.66%; /* 3:2 Aspect Ratio */
    overflow: hidden;
    background-color: #F8F4F0;
}

.dish-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.dish-card:hover .dish-card-img {
    transform: scale(1.05);
}

.dish-badge-bestseller {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #FF6F00, #E65100);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--avv-radius-pill);
    box-shadow: 0 2px 8px rgba(230, 81, 0, 0.4);
    z-index: 2;
}

.dish-badge-veg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--avv-accent);
    border-radius: 4px;
    padding: 2px;
}

.dish-badge-veg::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--avv-accent);
    border-radius: 50%;
}

.dish-badge-nonveg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--avv-accent-nonveg);
    border-radius: 4px;
    padding: 2px;
}

.dish-badge-nonveg::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--avv-accent-nonveg);
    border-radius: 50%;
}

/* Wishlist Button */
.btn-wishlist {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
    transition: transform 0.2s, color 0.2s;
    z-index: 2;
}

.btn-wishlist:hover {
    transform: scale(1.1);
}

.btn-wishlist.active {
    color: #DC2626;
    background: #FFFFFF;
}

/* Add to Cart Button */
.btn-add-cart {
    background-color: #FFFFFF;
    color: var(--avv-primary);
    border: 1.5px solid var(--avv-primary);
    font-weight: 700;
    border-radius: var(--avv-radius-pill);
    padding: 6px 18px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.btn-add-cart:hover {
    background-color: var(--avv-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.25);
}

/* Category Pill Badges */
.category-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--avv-text-main);
    transition: transform 0.2s;
    min-width: 85px;
}

.category-pill:hover {
    transform: translateY(-3px);
    color: var(--avv-primary);
}

.category-icon-box {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--avv-secondary);
    border: 2px solid #FFFFFF;
    box-shadow: 0 4px 10px rgba(230, 81, 0, 0.15);
    margin-bottom: 8px;
    overflow: hidden;
}

.category-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Floating Cart Bar (Bottom Bar) */
.floating-cart-bar {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 520px;
    background: linear-gradient(135deg, var(--avv-primary), #600000);
    color: #FFFFFF;
    border-radius: 16px;
    padding: 12px 18px;
    box-shadow: 0 10px 25px rgba(139, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1025;
    animation: slideUpCart 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpCart {
    from { transform: translate(-50%, 40px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* Customer Mobile Bottom Navigation */
.customer-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: #FFFFFF;
    border-top: 1px solid var(--avv-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1030;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--avv-text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    transition: color 0.2s;
    position: relative;
}

.bottom-nav-item i {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.bottom-nav-item.active {
    color: var(--avv-primary);
}

.nav-badge-count {
    position: absolute;
    top: -4px;
    right: -8px;
    background-color: var(--avv-secondary);
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 99px;
}

/* Hero Carousel */
.hero-banner-card {
    border-radius: var(--avv-radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--avv-shadow);
    background: linear-gradient(135deg, #7F1D1D, #991B1B);
    color: #FFFFFF;
    min-height: 180px;
    display: flex;
    align-items: center;
    padding: 24px;
}

/* Admin Sidebar Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: #111827;
    color: #F3F4F6;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.admin-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #1F2937;
    background: #0B0F19;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #9CA3AF;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.admin-nav-item:hover, .admin-nav-item.active {
    color: #FFFFFF;
    background: #1F2937;
    border-left-color: var(--avv-secondary);
}

.admin-content {
    flex-grow: 1;
    background: #F9FAFB;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Delivery Partner App */
.delivery-shell {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    background: #F9FAFB;
    padding-bottom: 80px;
}

.delivery-task-card {
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
}

.duty-switch-btn {
    border-radius: var(--avv-radius-pill);
    padding: 6px 16px;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Status Badges */
.badge-order-placed { background-color: #DBEAFE; color: #1E40AF; }
.badge-order-confirmed { background-color: #E0E7FF; color: #3730A3; }
.badge-order-preparing { background-color: #FEF3C7; color: #92400E; }
.badge-order-ready { background-color: #D1FAE5; color: #065F46; }
.badge-order-out { background-color: #FCE7F3; color: #9D174D; }
.badge-order-delivered { background-color: #DCFCE7; color: #166534; }
.badge-order-cancelled { background-color: #FEE2E2; color: #991B1B; }

/* Desktop Adjustment */
@media (min-width: 768px) {
    .customer-bottom-nav {
        display: none;
    }
    .floating-cart-bar {
        bottom: 24px;
    }
    body {
        padding-bottom: 0 !important;
    }
}

@media (max-width: 767px) {
    body {
        padding-bottom: calc(var(--bottom-nav-height) + 16px);
    }
    .admin-sidebar {
        display: none; /* Mobile admin drawer or responsive */
    }
}

/* ==========================================================================
   DELIVERY PARTNER MAPS & GPS NAVIGATION STYLES
   ========================================================================== */
.delivery-map-card {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.delivery-map-view {
    width: 100%;
    height: 330px;
    z-index: 1;
    background: #f1f5f9;
}

@media (min-width: 768px) {
    .delivery-map-view {
        height: 380px;
    }
}

.map-floating-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 1000;
    pointer-events: none;
}

.map-floating-overlay > * {
    pointer-events: auto;
}

.map-floating-bottom {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 1000;
    pointer-events: none;
}

.map-floating-bottom > * {
    pointer-events: auto;
}

/* Leaflet Custom Marker Icons */
.map-marker-pin {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    position: relative;
    transition: transform 0.2s ease;
}

.map-marker-pin.restaurant {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
}

.map-marker-pin.customer {
    background: linear-gradient(135deg, #15803d, #16a34a);
}

.map-marker-pin.rider {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.map-marker-pin.rider::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(37, 99, 235, 0.6);
    animation: rider-pulse 2s infinite ease-out;
}

@keyframes rider-pulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

.leaflet-popup-content-wrapper {
    border-radius: 14px !important;
    padding: 4px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
    font-family: var(--avv-font-main) !important;
}

.leaflet-popup-content {
    margin: 8px 12px !important;
    font-size: 0.85rem;
    line-height: 1.35;
}

