/* Doha Market Mobile-First Modern Stylesheet: GreenCart Inspired Organic UI */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    --primary: #143e28;
    /* Deep rich forest green (GreenCart signature) */
    --primary-accent: #16a34a;
    /* Fresh vibrant leaf green */
    --primary-dark: #0c2719;
    --primary-light: #e8f5ec;
    /* Delicate organic sage/mint */
    --accent-meat: #dc2626;
    /* Warm terracotta red for meat */
    --accent-oil: #d97706;
    /* Golden amber for oil */
    --bg-main: #f5f7f5;
    /* Clean natural off-white canvas */
    --card-bg: #ffffff;
    --text-main: #111e16;
    /* Clean deep charcoal for high readability */
    --text-muted: #5f7166;
    /* Elegant organic secondary text */
    --border-color: #edf2ee;
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --shadow-sm: 0 2px 8px rgba(20, 62, 40, 0.04);
    --shadow-md: 0 6px 18px rgba(20, 62, 40, 0.06);
    --shadow-lg: 0 14px 28px rgba(20, 62, 40, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    line-height: 1.5;
    padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px));
    /* space for mobile bottom bar + safe area */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior-y: contain;
}

/* Mobile App Shell / Container */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: #ffffff;
    box-shadow: 0 0 35px rgba(20, 62, 40, 0.06);
    position: relative;
}

@media (min-width: 768px) {
    .app-container {
        max-width: 600px;
        margin: 20px auto;
        border-radius: var(--radius-lg);
        min-height: calc(100vh - 40px);
        overflow: hidden;
    }
}

/* App Header - Clean White Minimalist Organic Style */
.app-header {
    background: #ffffff;
    color: var(--text-main);
    padding: 14px 16px 12px 16px;
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(20, 62, 40, 0.02);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--text-main);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 2px 6px rgba(20, 62, 40, 0.08);
}

.logo-title {
    font-size: 1.12rem;
    font-weight: 900;
    line-height: 1.1;
    color: var(--primary);
    letter-spacing: -0.3px;
}

.logo-sub {
    font-size: 0.65rem;
    color: var(--primary-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    background: #f4f6f4;
    border: 1px solid #e2ebe4;
    border-radius: 50%;
    color: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    transition: all 0.2s ease;
}

.icon-btn:hover,
.icon-btn:active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: #a7f3d0;
}

.badge-counter {
    position: absolute;
    top: -3px;
    inset-inline-start: -3px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

/* Pill Search Bar */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 40px;
    border-radius: 9999px;
    border: 1.5px solid #e7ebe8;
    background: #f4f6f4;
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    background: #ffffff;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.search-icon {
    position: absolute;
    inset-inline-start: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    font-size: 0.9rem;
    pointer-events: none;
}

.search-filter-icon {
    position: absolute;
    inset-inline-end: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.search-filter-icon:hover {
    color: var(--primary);
}

/* Category Quick Chips */
.categories-slider {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.categories-slider::-webkit-scrollbar {
    display: none;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: 9999px;
    background: #f4f6f4;
    color: #334155;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid #e3ebe5;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-chip:hover {
    background: #e8f5ec;
    color: #143e28;
    border-color: #cde4d3;
}

.category-chip.active {
    background: #143e28;
    color: #ffffff;
    border-color: #143e28;
    box-shadow: 0 4px 12px rgba(20, 62, 40, 0.2);
}

/* Product Card: GreenCart Signature Minimalist Organic Style */
.product-card {
    background: #ffffff;
    border: 1px solid #edf1ee;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 14px rgba(20, 62, 40, 0.04);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.product-card:hover {
    box-shadow: 0 8px 20px rgba(20, 62, 40, 0.07);
}

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

/* Out of Stock Visual States */
.product-card.is-out-of-stock .product-img {
    filter: grayscale(85%);
    opacity: 0.65;
}

.out-of-stock-overlay-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 38, 38, 0.92);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 20px;
    white-space: nowrap;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

.btn-out-of-stock-pill {
    font-size: 0.68rem;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
    padding: 3px 8px;
    border-radius: 9999px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 78%;
    /* Balanced compact aspect ratio */
    background: #f8faf8;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.product-card:hover .product-img {
    transform: scale(1.04);
}

/* Organic Pill Badge */
.product-organic-badge {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 4;
    background: #e8f5ec;
    color: #166534;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.product-discount-badge {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 4;
    background: #dc2626;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

/* Wishlist Heart Button (GreenCart Style) */
.product-wish-btn {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    z-index: 4;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-wish-btn:hover {
    transform: scale(1.12);
    color: #ef4444;
}

.product-wish-btn.active {
    background: #ffffff;
    color: #ef4444;
    transform: scale(1.08);
}

.product-body {
    padding: 10px 10px 12px 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-store-link {
    font-size: 0.65rem;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.product-title {
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
    height: 2.5em;
    /* 2 clean lines aligned across cards */
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-prices {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: auto;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.current-price {
    font-size: 0.98rem;
    font-weight: 900;
    color: var(--primary);
}

.old-price {
    font-size: 0.72rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 600;
}

/* Iconic Quick Add Circle Button (GreenCart Signature) */
.btn-quick-add-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(20, 62, 40, 0.25);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.btn-quick-add-circle:hover {
    background: var(--primary-accent);
    transform: scale(1.1);
}

.btn-quick-add-circle:active {
    transform: scale(0.92);
}

/* Distinct In-Store Only Badge */
.instore-badge {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
    line-height: 1.2;
}

/* Store Paused Banner */
.store-paused-banner {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

/* Stock Info */
.stock-info {
    font-size: 0.72rem;
    font-weight: 600;
    color: #10b981;
    margin-bottom: 6px;
}

.stock-info.low-stock {
    color: #f59e0b;
}

.stock-info.out-stock {
    color: #ef4444;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-primary:hover,
.btn-primary:active {
    background: var(--primary-dark);
}

.btn-disabled {
    background: #cbd5e1 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Mobile Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px)) 4px;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.07);
    z-index: 50;
    border-top: 1px solid var(--border-color);
    max-width: 480px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
}

@media (min-width: 768px) {
    .bottom-nav {
        max-width: 600px;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 8px;
    position: relative;
    transition: color 0.2s;
}

.nav-item i {
    font-size: 1.15rem;
    margin-bottom: 3px;
}

.nav-item.active {
    color: var(--primary);
    font-weight: 800;
}

.nav-item .badge-dot {
    position: absolute;
    top: 2px;
    right: 14px;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 10px;
}

/* Status Badges */
.badge-approved {
    background: #d1fae5;
    color: #065f46;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

.badge-suspended {
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

/* Order Status Chips & Live Approval/Contact Badges */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-preparing {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.status-picked_up {
    background: #ede9fe;
    color: #5b21b6;
    border: 1px solid #ddd6fe;
}

.status-on_the_way {
    background: #ffedd5;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.status-delivered {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-approved-order {
    background: #059669;
    color: #ffffff;
    border: 1px solid #047857;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

.status-contacting {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #4ade80;
    animation: contactPulse 2s infinite;
}

@keyframes contactPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(34, 197, 94, 0);
    }
}

/* Clear Visual Delivery Stages Stepper */
.delivery-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 8px 8px 8px;
    margin: 8px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.delivery-stepper::-webkit-scrollbar {
    display: none;
}

.delivery-stepper .ds-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 52px;
    flex: 1;
    text-align: center;
    position: relative;
}

.delivery-stepper .ds-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 900;
    border: 2px solid #cbd5e1;
    transition: all 0.2s ease;
}

.delivery-stepper .ds-label {
    margin-top: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    color: #64748b;
    line-height: 1.2;
}

.delivery-stepper .ds-step.is-done .ds-dot {
    background: #10b981;
    border-color: #059669;
    color: #ffffff;
}

.delivery-stepper .ds-step.is-done .ds-label {
    color: #047857;
    font-weight: 800;
}

.delivery-stepper .ds-step.is-current .ds-dot {
    background: #f59e0b;
    border-color: #d97706;
    color: #0f172a;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25);
}

.delivery-stepper .ds-step.is-current .ds-label {
    color: #0f172a;
    font-weight: 900;
}

.delivery-stepper .ds-line {
    height: 2px;
    background: #cbd5e1;
    flex: 0.6;
    min-width: 10px;
    margin-top: 12px;
}

.delivery-stepper .ds-line.is-done {
    background: #10b981;
}

.delivery-stepper-dark {
    background: #0f172a;
    border-color: #334155;
}

.delivery-stepper-dark .ds-dot {
    background: #1e293b;
    border-color: #475569;
    color: #94a3b8;
}

.delivery-stepper-dark .ds-label {
    color: #94a3b8;
}

.delivery-stepper-dark .ds-step.is-done .ds-label {
    color: #34d399;
}

.delivery-stepper-dark .ds-step.is-current .ds-label {
    color: #fde047;
}

.delivery-stepper-dark .ds-line {
    background: #334155;
}

.delivery-stage-cancelled {
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.76rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

/* Alert Boxes */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Modal / Bottom Sheet */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: none;
    align-items: flex-end;
}

.modal-overlay.active {
    display: flex;
}

.modal-sheet {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 20px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-color);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
}

.form-text {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Custom Switch for Toggle Online Orders */
.switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(24px);
}



/* ==========================================================
   ENHANCED HIGH-ENGAGEMENT CUSTOMER UI STYLES
   ========================================================== */

/* Stories Circles Slider */
.stories-slider {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 14px 16px 12px 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.stories-slider::-webkit-scrollbar {
    display: none;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    flex-shrink: 0;
    width: 62px;
}

.story-ring {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    padding: 0;
    background: transparent !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.story-item:hover .story-ring {
    transform: translateY(-2px);
}

.story-item:active .story-ring {
    transform: scale(0.92);
}

.story-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #f4f6f4;
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(20, 62, 40, 0.04);
    transition: all 0.2s ease;
}

.story-item:hover .story-avatar {
    box-shadow: 0 6px 16px rgba(20, 62, 40, 0.1);
}

.story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Free Delivery Gamified Progress Bar */
.delivery-goal-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin: 10px 16px 6px 16px;
}

.delivery-goal-title {
    display: flex;
    justify-content: space-between;
    font-size: 0.76rem;
    font-weight: 800;
    color: #065f46;
    margin-bottom: 6px;
}

.goal-bar-bg {
    width: 100%;
    height: 7px;
    background: #d1fae5;
    border-radius: 10px;
    overflow: hidden;
}

.goal-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 10px;
    transition: width 0.4s ease;
}

/* Flash Deals Countdown Banner */
.flash-deal-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: #ffffff;
    margin: 10px 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.15);
}

.flash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.flash-title {
    font-size: 0.95rem;
    font-weight: 900;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.flash-timer {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.74rem;
    font-weight: 800;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 3px 8px;
    border-radius: 6px;
    color: #fde68a;
    font-family: monospace;
}

/* Trust / Social Proof Badges */
.trust-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 16px;
    scrollbar-width: none;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
}

.trust-row::-webkit-scrollbar {
    display: none;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Floating Quick Cart Summary Bar */
.floating-cart-bar {
    position: fixed;
    bottom: 74px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 448px;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
    z-index: 45;
    text-decoration: none;
    animation: slideUpShort 0.3s ease;
}

@keyframes slideUpShort {
    from {
        transform: translate(-50%, 20px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@media (min-width: 768px) {
    .floating-cart-bar {
        max-width: 568px;
    }
}

/* Kilo & Weight Quick Selector Chips */
.kilo-selector-wrap {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 0 6px 0;
    margin: 6px 0 4px 0;
}

.kilo-selector-wrap::-webkit-scrollbar {
    display: none;
}

.kilo-chip {
    padding: 3px 7px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    user-select: none;
}

.kilo-chip:hover {
    border-color: var(--primary);
    background: #ecfdf5;
}

.kilo-chip.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

/* Flexible Half-Kilo Weight & Liter Stepper Component */
.weight-stepper-container {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 8px;
    margin: 6px 0 8px 0;
}

.weight-stepper-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 5px;
}

.btn-step-change {
    background: #f1f5f9;
    border: none;
    color: #0f172a;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 5px 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    min-width: 42px;
}

.btn-step-change:hover:not(:disabled) {
    background: var(--primary);
    color: #ffffff;
}

.btn-step-change:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #f1f5f9;
    color: #94a3b8;
}

.stepper-center-val {
    flex-grow: 1;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 900;
    color: var(--primary);
}

.stepper-qty-unit {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 700;
    margin-right: 2px;
}

.kilo-quick-chips {
    display: flex;
    gap: 3px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px 0;
}

.kilo-quick-chips::-webkit-scrollbar {
    display: none;
}

.quick-chip {
    padding: 2px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #ffffff;
    color: #475569;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.quick-chip:hover {
    border-color: var(--primary);
    background: #ecfdf5;
}

.quick-chip.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Promotional Hero Banners & Discounted Packs Slider (GreenCart Inspired) */
.banner-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 8px 16px 14px 16px;
    scrollbar-width: none;
}

.banner-carousel::-webkit-scrollbar {
    display: none;
}

.banner-hero-card {
    min-width: 300px;
    max-width: 340px;
    flex-shrink: 0;
    scroll-snap-align: start;
    border-radius: 22px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #edf6ef 0%, #e6f2e9 100%);
    border: 1px solid #d7e8db;
    color: var(--text-main);
    box-shadow: 0 4px 16px rgba(20, 62, 40, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.banner-hero-card:active {
    transform: scale(0.98);
}

.banner-hero-content {
    flex: 1 1 58%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 2;
}

.banner-badge {
    display: inline-block;
    background: #ffffff;
    color: #143e28;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 9999px;
    box-shadow: 0 2px 6px rgba(20, 62, 40, 0.05);
    margin-bottom: 7px;
    border: 1px solid #dce8df;
}

.banner-title {
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1.25;
    color: #143e28;
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}

.banner-sub {
    font-size: 0.74rem;
    color: #486252;
    font-weight: 500;
    line-height: 1.35;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.banner-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.banner-price-group {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.banner-price-tag {
    font-size: 1.05rem;
    font-weight: 900;
    color: #143e28;
}

.banner-old-tag {
    font-size: 0.72rem;
    text-decoration: line-through;
    color: #84988b;
}

.banner-cta-btn {
    background: #143e28;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 7px 16px;
    border-radius: 9999px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(20, 62, 40, 0.22);
    transition: all 0.2s ease;
}

.banner-cta-btn:hover {
    background: #16a34a;
    color: #ffffff;
}

.banner-hero-img-box {
    flex: 0 0 38%;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.banner-hero-img {
    width: 100%;
    height: 100%;
    max-height: 110px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(20, 62, 40, 0.08);
}

/* Market Fluctuation Tag */
.market-price-tag {
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #0284c7;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
}

/* ========================================================
   Mobile App (PWA) & Native Mobile Enhancements
======================================================== */
.pwa-install-strip {
    background: #0f172a;
    color: #ffffff;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 2px solid #059669;
    position: sticky;
    top: 0;
    z-index: 60;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.35s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pwa-install-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
}

.pwa-app-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    flex-shrink: 0;
}

.pwa-install-info strong {
    display: block;
    font-size: 0.82rem;
    color: #ffffff;
    font-weight: 800;
}

.pwa-install-info small {
    display: block;
    font-size: 0.68rem;
    color: #94a3b8;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-install-app {
    background: #059669;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.4);
    transition: all 0.2s;
    user-select: none;
}

.btn-install-app:active {
    transform: scale(0.95);
    background: #047857;
}

.btn-dismiss-app {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

/* Touch Active Feedback */
button:active,
.btn-primary:active,
.btn-outline:active,
.kilo-chip:active,
.quick-chip:active,
.icon-btn:active {
    transform: scale(0.96);
    transition: transform 0.08s ease;
}

/* Floating WhatsApp Customer Support Pill for Mobile */
.floating-whatsapp-btn {
    position: fixed;
    bottom: calc(75px + env(safe-area-inset-bottom, 0px));
    left: 14px;
    width: 48px;
    height: 48px;
    background: #25D366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.45);
    z-index: 45;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-whatsapp-btn:active {
    transform: scale(0.92);
}

@media (min-width: 768px) {
    .floating-whatsapp-btn {
        left: calc(50% - 280px);
    }
}

/* ========================================================
   LTR (French) Layout & Directional Overrides
======================================================== */
[dir="ltr"] body {
    direction: ltr;
    text-align: left;
}

[dir="ltr"] .logo-area {
    text-align: left;
}

[dir="ltr"] .search-icon {
    right: auto;
    left: 14px;
}

[dir="ltr"] .search-input {
    padding: 10px 16px 10px 40px;
}

[dir="ltr"] .badge-counter {
    left: auto;
    right: -4px;
}

[dir="ltr"] .stepper-qty-unit {
    margin-right: 0;
    margin-left: 2px;
}

[dir="ltr"] .banner-badge {
    right: auto;
    left: 10px;
}

[dir="ltr"] .banner-old-tag {
    margin-right: 0;
    margin-left: 6px;
}

[dir="ltr"] .floating-whatsapp-btn {
    left: auto;
    right: 14px;
}

@media (min-width: 768px) {
    [dir="ltr"] .floating-whatsapp-btn {
        left: auto;
        right: calc(50% - 280px);
    }
}

[dir="ltr"] .me-1 {
    margin-left: 0;
    margin-right: 0.25rem;
}

[dir="ltr"] .fa-arrow-right,
[dir="ltr"] .fa-chevron-left,
[dir="ltr"] .fa-angle-left {
    transform: scaleX(-1);
}