/* Modern Food Delivery App Design - Persian/RTL */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-orange: #FF8A00;
    --primary-blue: #4A90E2;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --border-color: #E8ECEF;
    --success-green: #27AE60;
    --danger-red: #E74C3C;
    --star-yellow: #F39C12;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    direction: rtl;
    padding-top: 80px;
}

/* Mobile-First Design: Limit width on desktop */
@media (min-width: 769px) {
    body:not(.tv-mode) {
        background-color: #e0e0e0;
        min-height: 100vh;
    }

    /* Wrapper for all non-fixed content */
    body:not(.tv-mode)>*:not(.menu-header):not(.bottom-nav):not(.cart-sidebar):not(.auth-modal) {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
        background-color: var(--bg-light);
    }

    /* Fixed elements need special handling */
    body:not(.tv-mode) .menu-header,
    body:not(.tv-mode) .bottom-nav,
    body:not(.tv-mode) .cart-sidebar,
    body:not(.tv-mode) .auth-modal {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
        max-width: 600px;
        width: 100%;
    }

    body:not(.tv-mode) .auth-modal {
        transform: translateX(-50%) !important;
    }

    body:not(.tv-mode) .auth-modal.active .auth-container {
        left: 0;
        right: 0;
        max-width: 600px;
        margin: 0 auto;
    }

    /* Add shadow to simulate mobile device */
    body:not(.tv-mode) .menu-header {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Ensure container respects mobile width on desktop */
@media (min-width: 769px) {
    .container {
        max-width: 600px;
    }
}

/* ==================== HEADER ==================== */
.menu-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
}

.header-logo {
    height: 45px;
    width: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.header-search {
    flex: 1;
    max-width: 500px;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
}

.header-search i {
    color: var(--text-light);
    margin-left: 0.5rem;
}

.header-search input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.header-search input::placeholder {
    color: var(--text-light);
}

.cart-button {
    position: relative;
    background: var(--primary-orange);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.cart-button:hover {
    transform: scale(1.05);
}

.cart-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: var(--danger-red);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== HERO BANNER ==================== */
.hero-banner {
    width: 100%;

    overflow: hidden;
}

.banner-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.banner-image {
    width: 90%;
    margin: auto;
    margin-top: 30px;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 500px;
}

@media (max-width: 768px) {
    .banner-image {
        max-height: 250px;
        border-radius: 0;
    }
}

/* ==================== SECTION HEADERS ==================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.see-all {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.see-all:hover {
    color: #E67A00;
}

/* ==================== FOOD CATEGORIES ==================== */
.food-categories {
    padding: 2rem 0;
    background: var(--bg-white);
}

.categories-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-orange) var(--bg-light);
}

.categories-scroll::-webkit-scrollbar {
    height: 6px;
}

.categories-scroll::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 3px;
}

.categories-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 3px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    min-width: 80px;
    transition: transform 0.2s;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFE5CC 0%, #FFD4A8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

.category-item:hover .category-circle {
    box-shadow: var(--shadow-md);
}

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

.category-circle i {
    font-size: 1.75rem;
    color: var(--primary-orange);
}

.category-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    text-align: center;
}

/* ==================== SPECIAL OFFERS SLIDER ==================== */
.special-offers-section {
    padding: 2rem 0;

}

.slider-controls {
    display: flex;
    gap: 0.5rem;
}

.slider-btn {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-dark);
}

.slider-btn:hover {
    background: var(--primary-orange);
    color: white;
    border-color: var(--primary-orange);
    transform: scale(1.1);
}

.slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slider-btn:disabled:hover {
    background: var(--bg-white);
    color: var(--text-dark);
    border-color: var(--border-color);
    transform: none;
}

.special-offers-slider-container {
    position: relative;
    overflow: hidden;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.special-offers-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 1rem 0;
}

.special-offers-slider::-webkit-scrollbar {
    display: none;
}

.offer-card {
    flex: 0 0 280px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.offer-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.offer-image {
    width: 100%;
    height: 180px;
    position: relative;
    overflow: hidden;
}

.offer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.offer-card:hover .offer-image img {
    transform: scale(1.1);
}

.offer-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FFE5CC 0%, #FFD4A8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.offer-placeholder i {
    font-size: 3rem;
    color: var(--primary-orange);
}

.offer-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-red);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.offer-info {
    padding: 1.25rem;
}

.offer-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
}

.offer-description {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.offer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.offer-price {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.offer-price .price-old {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.offer-price .price-new {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-orange);
}

.offer-add-btn {
    background: var(--primary-orange);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.offer-add-btn:hover {
    background: #E67A00;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .offer-card {
        flex: 0 0 240px;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
    }
}



/* ==================== MENU SECTION ==================== */
.menu-section {
    padding: 2rem 0;
    background: var(--bg-light);
}

.category-menu-section {
    margin-bottom: 3rem;
}

.category-menu-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-orange);
}

.menu-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.menu-item-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.menu-item-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.item-image {
    width: 100%;
    height: 180px;
    position: relative;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.menu-item-card:hover .item-image img {
    transform: scale(1.05);
}

.item-discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-red);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
}

.item-content {
    padding: 1.25rem;
}

.item-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
}

.item-description {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.item-variations {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.variation-badge {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}

.item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.item-price {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.old-price {
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.new-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-orange);
}

.add-btn {
    background: var(--primary-orange);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.add-btn:hover {
    background: #E67A00;
    transform: scale(1.1);
}

/* ==================== FOOTER ==================== */
.menu-footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.footer-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-content p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.footer-content i {
    margin-left: 0.5rem;
    color: var(--primary-orange);
}

.copyright {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* ==================== BOTTOM NAVIGATION (PWA) ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);

    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: none;
    /* Hidden by default, shown on mobile */
    z-index: 999;
    padding: 0.5rem 0;
}

.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.3s;
    position: relative;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
}

.bottom-nav .nav-item i {
    font-size: 1.4rem;
    transition: all 0.3s;
}

/* SVG Icons in PWA Menu */
.bottom-nav .nav-item .pwa-icon-svg {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: all 0.3s;
}

.bottom-nav .nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
}

.bottom-nav .nav-item.active {
    color: var(--primary-orange, var(--icon-color, #FF8A00));
}

.bottom-nav .nav-item.active i {
    transform: scale(1.1);
}

.bottom-nav .nav-item.active .pwa-icon-svg {
    transform: scale(1.1);
}

.bottom-nav .nav-item:hover {
    color: var(--primary-orange);
}

/* Cart badge in bottom nav */
.nav-cart-badge {
    position: absolute;
    top: 0.3rem;
    right: 50%;
    transform: translateX(50%);
    background: var(--danger-red);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 0.25rem;
}

/* Show bottom nav on all screens (mobile-first design) */
.bottom-nav {
    display: flex;
}

/* Add padding to body to prevent content being hidden behind nav */
body {
    padding-bottom: 70px;
}

/* ==================== AUTH MODAL (OTP) ==================== */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 11000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal.active {
    display: flex;
    opacity: 1;
}

.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.auth-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.2);
}

.auth-modal.active .auth-container {
    transform: translateY(0);
}

.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
}

/* Auth Header */
.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    flex: 1;
    text-align: center;
}

.auth-close,
.auth-back {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 1.25rem;
    transition: all 0.2s;
}

.auth-close:hover,
.auth-back:hover {
    background: var(--bg-light);
}

.auth-back {
    position: absolute;
    right: 1.5rem;
}

/* Auth Body */
.auth-body {
    padding: 2rem 1.5rem;
}

.auth-description {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-description strong {
    color: var(--primary-orange);
    font-weight: 600;
}

.edit-phone-btn {
    background: transparent;
    border: none;
    color: var(--primary-orange);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    margin-right: 0.5rem;
}

/* Form Elements */
.auth-body .form-group {
    margin-bottom: 1.5rem;
}

.auth-body .form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.auth-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-family: 'Vazirmatn', sans-serif;
    color: var(--text-dark);
    transition: all 0.3s;
    text-align: center;
    letter-spacing: 0.1em;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.1);
}

.auth-input.otp-input {
    font-size: 1.5rem;
    letter-spacing: 0.5em;
    font-weight: 600;
}

.error-message {
    display: block;
    color: var(--danger-red);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    min-height: 1.2rem;
}

/* Timer */
.timer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

#timerDisplay {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-orange);
    font-family: 'Courier New', monospace;
}

.resend-btn {
    background: transparent;
    border: 2px solid var(--primary-orange);
    color: var(--primary-orange);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Vazirmatn', sans-serif;
}

.resend-btn:hover:not(:disabled) {
    background: var(--primary-orange);
    color: white;
}

.resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Auth Button */
.auth-btn {
    width: 100%;
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s;
    font-family: 'Vazirmatn', sans-serif;
}

.auth-btn:hover:not(:disabled) {
    background: #E67A00;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    font-size: 1.2rem;
}

/* Desktop Styles */
@media (min-width: 769px) {
    .auth-container {
        bottom: auto;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        max-width: 450px;
        border-radius: var(--radius-lg);
        max-height: 85vh;
    }

    .auth-modal.active .auth-container {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ==================== CART SIDEBAR ==================== */
.cart-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-sidebar.active {
    pointer-events: all;
    opacity: 1;
}

.cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}

.cart-container {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 450px;
    max-width: 90%;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

/* Desktop: Adjust cart sidebar for mobile-width layout */
@media (min-width: 769px) {
    .cart-sidebar {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
        max-width: 600px;
        width: 600px;
    }

    .cart-container {
        width: 100%;
        max-width: 100%;
    }
}

.cart-sidebar.active .cart-container {
    transform: translateX(0);
}


/* Cart Header */
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-white);
}

.cart-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-title i {
    color: var(--primary-orange);
}

.cart-close {
    background: var(--bg-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dark);
    font-size: 1.25rem;
}

.cart-close:hover {
    background: var(--border-color);
    transform: rotate(90deg);
}

/* Cart Items Container */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.cart-item:hover {
    box-shadow: var(--shadow-sm);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.cart-item-variations {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

.cart-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.cart-item-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-orange);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn-small {
    background: var(--primary-orange);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn-small:hover {
    background: #E67A00;
    transform: scale(1.05);
}

.qty-display {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    min-width: 25px;
    text-align: center;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: var(--danger-red);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.1rem;
    transition: all 0.2s;
    align-self: flex-start;
}

.cart-item-remove:hover {
    color: #C0392B;
    transform: scale(1.1);
}

/* Empty Cart State */
.cart-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.cart-empty i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.cart-empty p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.btn-browse {
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Vazirmatn', sans-serif;
}

.btn-browse:hover {
    background: #E67A00;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Cart Footer */
.cart-footer {
    border-top: 2px solid var(--border-color);
    padding: 1.5rem;
    background: var(--bg-light);
}

.cart-summary {
    margin-bottom: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.summary-row.total-row {
    border-top: 2px solid var(--border-color);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.summary-row.total-row span:last-child {
    color: var(--primary-orange);
}

.btn-checkout {
    width: 100%;
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s;
    font-family: 'Vazirmatn', sans-serif;
    margin-bottom: 0.75rem;
}

.btn-checkout:hover {
    background: #E67A00;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-clear-cart {
    width: 100%;
    background: transparent;
    color: var(--danger-red);
    border: 2px solid var(--danger-red);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-family: 'Vazirmatn', sans-serif;
}

.btn-clear-cart:hover {
    background: var(--danger-red);
    color: white;
}

/* Cart Sidebar Responsive */
@media (max-width: 768px) {
    .cart-container {
        width: 100%;
        max-width: 100%;
    }

    /* Remove flex from cart items to allow natural flow */
    .cart-items {
        flex: none;
        overflow-y: visible;
        padding: 0.75rem;
        max-height: none;
    }

    /* Make cart footer scrollable with items */
    .cart-footer {
        padding: 1rem;
        position: relative;
        overflow-y: visible;
    }

    /* Add scrolling to the entire content area */
    .cart-container {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Reduce spacing in cart items */
    .cart-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .cart-item-name {
        font-size: 0.9rem;
    }

    .cart-item-variations {
        font-size: 0.8rem;
    }

    .cart-item-price {
        font-size: 0.9rem;
    }

    /* Optimize quantity controls */
    .qty-btn-small {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }

    .qty-display {
        font-size: 0.9rem;
        min-width: 22px;
    }

    /* Optimize order type section for mobile */
    .order-type-section {
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }

    /* Reduce delivery form padding */
    .delivery-form {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .form-group {
        margin-bottom: 0.75rem;
    }

    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    .form-input,
    .form-textarea {
        padding: 0.65rem;
        font-size: 0.9rem;
    }

    /* Optimize order notes */
    .order-notes-section {
        margin-bottom: 1rem;
    }

    /* Reduce cart summary spacing */
    .cart-summary {
        margin-bottom: 0.75rem;
    }

    .summary-row {
        padding: 0.4rem 0;
        font-size: 0.9rem;
    }

    .summary-row.total-row {
        font-size: 1.1rem;
        padding-top: 0.75rem;
        margin-top: 0.4rem;
    }

    /* Optimize buttons for mobile */
    .btn-checkout {
        padding: 0.85rem;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .btn-clear-cart {
        padding: 0.65rem;
        font-size: 0.9rem;
    }

    /* Ensure empty state is visible */
    .cart-empty {
        padding: 2rem 1rem;
    }

    .cart-empty i {
        font-size: 3rem;
    }

    .cart-empty p {
        font-size: 1rem;
    }

    /* Add padding to bottom of cart footer for safe scrolling */
    .cart-footer {
        padding-bottom: 2rem;
    }
}

/* ==================== ORDER TYPE SELECTION ==================== */
.order-type-section {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 1rem 0;
}

.order-type-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.order-type-card {
    position: relative;
    cursor: pointer;
}

.order-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.order-type-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.3s;
}

.order-type-content i {
    font-size: 1.75rem;
    color: var(--text-light);
    transition: all 0.3s;
}

.order-type-content span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.order-type-card input[type="radio"]:checked+.order-type-content {
    border-color: var(--primary-orange);
    background: rgba(255, 138, 0, 0.05);
}

.order-type-card input[type="radio"]:checked+.order-type-content i {
    color: var(--primary-orange);
}

.order-type-card:hover .order-type-content {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Delivery Form */
.delivery-form {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: 'Vazirmatn', sans-serif;
    color: var(--text-dark);
    transition: all 0.3s;
    background: var(--bg-white);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-light);
}

.form-textarea {
    resize: vertical;
    min-height: 60px;
}

/* Order Notes Section */
.order-notes-section {
    margin-bottom: 1.5rem;
}

/* ==================== DISCOUNT CODE SECTION ==================== */
.discount-code-section {
    margin-bottom: 1.5rem;
}

.discount-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-white);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s;
}

.discount-trigger:hover {
    border-color: var(--primary-orange);
    background: rgba(255, 138, 0, 0.03);
}

.discount-trigger span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

.discount-trigger span i {
    color: var(--primary-orange);
    font-size: 1rem;
}

.discount-arrow {
    color: var(--text-light);
    font-size: 0.875rem;
    transition: transform 0.3s;
}

.discount-arrow.rotated {
    transform: rotate(180deg);
}

.discount-input-wrapper {
    margin-top: 1rem;
    animation: slideDown 0.3s ease;
}

.discount-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.discount-input-group .form-input {
    flex: 1;
}

.btn-apply-discount {
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-family: 'Vazirmatn', sans-serif;
    white-space: nowrap;
}

.btn-apply-discount:hover {
    background: #E67A00;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-apply-discount:active {
    transform: translateY(0);
}

.discount-message {
    font-size: 0.85rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
    display: none;
}

.discount-message.success {
    display: block;
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-green);
    border: 1px solid var(--success-green);
}

.discount-message.error {
    display: block;
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-red);
    border: 1px solid var(--danger-red);
}

/* Responsive Discount Code */
@media (max-width: 768px) {
    .discount-code-section {
        margin-bottom: 1rem;
    }

    .discount-trigger {
        padding: 0.75rem;
    }

    .discount-trigger span {
        font-size: 0.875rem;
    }

    .btn-apply-discount {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}


/* Responsive Order Type */
@media (max-width: 768px) {
    .order-type-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .order-type-content {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0.65rem 0.35rem;
        gap: 0.4rem;
    }

    .order-type-content i {
        font-size: 1.3rem;
    }

    .order-type-content span {
        font-size: 0.8rem;
        text-align: center;
        line-height: 1.2;
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .header-search {
        max-width: 100%;
    }

    .promo-content {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .promo-title {
        font-size: 2rem;
    }

    .promo-image {
        width: 200px;
        height: 150px;
        margin-top: 1rem;
    }

    .recommended-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .restaurant-card {
        flex-direction: column;
    }

    .restaurant-image {
        width: 100%;
        height: 200px;
    }

    .restaurant-header {
        flex-wrap: wrap;
    }

    .menu-items-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .header-content {
        gap: 0.5rem;
    }

    .header-search {
        display: none;
    }

    .promo-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .recommended-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-scroll {
        gap: 1rem;
    }

    .category-circle {
        width: 60px;
        height: 60px;
    }
}

/* ==================== MODAL STYLES ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.modal-container {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-content {
    display: flex;
    flex-direction: column;
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-white);
    z-index: 10;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    flex: 1;
}

.modal-close {
    background: var(--bg-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dark);
    font-size: 1.25rem;
}

.modal-close:hover {
    background: var(--border-color);
    transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
    padding: 1.5rem;
}

.modal-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-discount-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--danger-red);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: var(--shadow-md);
}

.modal-description {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Variations */
.modal-variations {
    margin-bottom: 1.5rem;
}

.variation-group {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.variation-group:last-child {
    margin-bottom: 0;
}

.variation-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.variation-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.required-badge {
    background: var(--danger-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.variation-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.variation-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.variation-option input[type="radio"],
.variation-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-orange);
}

.variation-option label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.75rem;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    transition: all 0.2s;
}

.variation-option input:checked+label {
    border-color: var(--primary-orange);
    background: rgba(255, 138, 0, 0.05);
}

.variation-option label:hover {
    border-color: var(--primary-orange);
}

.option-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
}

.option-price {
    font-size: 0.875rem;
    color: var(--primary-orange);
    font-weight: 600;
}

/* Quantity Control */
.quantity-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.quantity-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.quantity-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.qty-btn {
    background: var(--primary-orange);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #E67A00;
    transform: scale(1.05);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    font-family: 'Vazirmatn', sans-serif;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
    position: sticky;
    bottom: 0;
}

.modal-price-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.modal-price-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.modal-price-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-old-price {
    font-size: 0.95rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.modal-total-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-orange);
}

.modal-add-to-cart {
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-family: 'Vazirmatn', sans-serif;
    white-space: nowrap;
}

.modal-add-to-cart:hover {
    background: #E67A00;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.modal-add-to-cart:active {
    transform: translateY(0);
}

/* Success Toast */
.success-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success-green);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.success-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.success-toast i {
    font-size: 1.25rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

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

/* Modal Responsive */
@media (max-width: 768px) {
    .modal-container {
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .modal-image-container {
        height: 250px;
    }

    .modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-add-to-cart {
        width: 100%;
        justify-content: center;
    }

    .modal-price-section {
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-title {
        font-size: 1.25rem;
    }

    .modal-image-container {
        height: 200px;
    }

    .variation-option label {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    .qty-btn {
        width: 36px;
        height: 36px;
    }

    .qty-input {
        width: 50px;
        height: 36px;
    }
}

/* ==================== CATEGORIES GRID ==================== */
.categories-section {
    padding: 2rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 200px;
    display: block;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    text-decoration: none;
    background: var(--bg-white);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.category-card-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.category-card:hover .category-card-image img {
    transform: scale(1.1);
}

.category-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FFE5CC 0%, #FFD4A8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card-placeholder i {
    font-size: 4rem;
    color: var(--primary-orange);
}

.category-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    pointer-events: none;
}

.category-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.25rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.category-card-count {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .category-card {
        height: 210px;
    }

    .category-card-content {
        padding: 1rem;
    }

    .category-card-title {
        font-size: 1rem;
    }
}

/* ==================== REWARD BADGE ==================== */
.reward-badge {
    position: absolute;
    top: 10px;
    left: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
    z-index: 2;
}

.reward-badge i {
    font-size: 10px;
}

/* ==================== WALLET SECTION IN CART ==================== */
.wallet-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #667eea;
}

.wallet-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #333;
}

.wallet-balance i {
    color: #667eea;
    font-size: 18px;
}

.wallet-balance strong {
    color: #28a745;
    margin-right: auto;
    font-size: 16px;
}

.wallet-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.wallet-checkbox:hover {
    background: rgba(102, 126, 234, 0.1);
}

.wallet-checkbox input[type=checkbox] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.wallet-checkbox span {
    font-weight: 500;
    color: #333;
}

.wallet-row {
    color: #28a745 !important;
    font-weight: 600;
}

.text-success {
    color: #28a745 !important;
}