/* ========================================
   Frontend Mobile-First CSS
   ======================================== */

   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Sahel', Tahoma, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

.app-content {
    padding: 0 10px;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

#preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* App Container - Mobile First */
.app-container {
    max-width: 400px;
    margin: 20px auto;
    min-height: calc(100vh - 40px);
    background: var(--bg-primary);
    position: relative;
    padding-bottom: 70px;
    box-shadow: 0 0 30px var(--shadow-color);
    border-radius: 20px;
    overflow: hidden;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px var(--shadow-color);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.app-header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
}

.app-header .logo img {
    height: 32px;
    width: auto;
    border-radius: 6px;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1.5px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
}

.header-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.header-btn-text {
    width: auto;
    padding: 0 12px;
    border-radius: 18px;
    font-size: 12px;
    font-family: inherit;
}

/* Bio Section */
.bio-section {
    padding: 20px 16px;
    text-align: center;
}

.bio-top {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.bio-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
}

.bio-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bio-logo i {
    font-size: 32px;
    color: var(--text-muted);
}

.bio-stats {
    display: flex;
    gap: 24px;
    flex: 1;
    justify-content: center;
}

.bio-stat {
    text-align: center;
}

.bio-stat-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
}

.bio-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.bio-slogan {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

.bio-buttons {
    display: flex;
    gap: 10px;
}

.bio-btn {
    flex: 1;
    padding: 10px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.bio-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Toppings */
.toppings-section {
    position: sticky;
    top: 61px;
    background: var(--bg-primary);
    padding: 10px 0;
    z-index: 50;
    border-bottom: 1px solid var(--border-color);
}

.toppings-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 16px;
    scrollbar-width: none;
}

.toppings-scroll::-webkit-scrollbar {
    display: none;
}

.topping-chip {
    padding: 8px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    background: transparent;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.topping-chip:hover,
.topping-chip.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.topping-chip i {
    font-size: 14px;
}

/* ========================================
   Menu Section - Enhanced Minimal Design
   ======================================== */
.menu-section {
    padding: 16px;
}

.topping-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    margin-top: 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.topping-title:first-child {
    margin-top: 0;
}

.topping-title i {
    font-size: 18px;
    color: var(--accent-color);
}

.topping-title span {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Menu Item Card */
.menu-item {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px var(--shadow-color);
    display: flex;
    gap: 0;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    position: relative;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.06) 0%,
        rgba(212, 175, 55, 0.02) 25%,
        rgba(212, 175, 55, 0.06) 50%,
        rgba(212, 175, 55, 0.02) 75%,
        rgba(212, 175, 55, 0.06) 100%
    );
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    pointer-events: none;
    z-index: 0;
}

[data-theme="dark"] .menu-item::before {
    background: linear-gradient(
        135deg,
        rgba(212, 175, 55, 0.10) 0%,
        rgba(212, 175, 55, 0.04) 25%,
        rgba(212, 175, 55, 0.10) 50%,
        rgba(212, 175, 55, 0.04) 75%,
        rgba(212, 175, 55, 0.10) 100%
    );
    background-size: 200% 200%;
}

.menu-item:hover {
    box-shadow: 0 4px 16px var(--shadow-color);
    transform: translateY(-2px);
}

.menu-item:active {
    transform: scale(0.98);
}

.menu-item > * {
    position: relative;
    z-index: 1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ستون ۱: عکس */
.menu-item-image {
    width: 90px;
    min-height: 90px;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.menu-item:hover .menu-item-image img {
    transform: scale(1.05);
}

.menu-item-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 24px;
}

/* ستون ۲: اطلاعات */
.menu-item-info {
    flex: 1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

/* ✅ عنوان با لیبل */
.menu-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

/* ✅ لیبل با رنگ‌های زیبا */
.menu-item-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 0.3px;
}

/* ✅ متریال‌ها */
.menu-item-materials {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.material-tag {
    display: inline-flex;
    align-items: center;
    padding: 0px 3px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 3px;
    font-size: 9px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.material-tag:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.material-tag::before {
    content: '•';
    margin-left: 2px;
    color: var(--accent-color);
    font-size: 10px;
    font-weight: bold;
}

.material-tag:hover::before {
    color: white;
}

/* ستون ۳: قیمت + دکمه */
.menu-item-actions {
    width: 80px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
}

.menu-item-price {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    text-align: center;
}

.price-original {
    font-size: 10px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.price-current {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-color);
    line-height: 1;
}

.price-currency {
    font-size: 9px;
    color: var(--text-secondary);
    margin-top: 1px;
}

.menu-item-order-btn {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.menu-item-order-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
}

.menu-item-order-btn i {
    font-size: 14px;
}

/* News Section */
.news-section {
    padding: 16px;
    margin-top: 20px;
}

.news-slider {
    position: relative;
    overflow: hidden;
}

.news-track {
    display: flex;
    transition: transform 0.3s ease;
}

.news-card {
    min-width: 100%;
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.news-card-image {
    width: 100%;
    height: 150px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 40px;
}

.news-card-content {
    padding: 12px;
}

.news-card-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.news-card-summary {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-date {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}

.news-nav-btn {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--border-color);
    border-radius: 50%;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.news-nav-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Footer */
.app-footer {
    padding: 20px 16px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

.app-footer p {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.app-footer a {
    color: var(--accent-color);
    text-decoration: none;
}

/* Cart Float Button */
.cart-float {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    z-index: 90;
    transition: transform 0.2s;
}

.cart-float:hover {
    transform: scale(1.1);
}

.cart-float-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    font-weight: bold;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 360px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 16px;
    font-weight: bold;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.modal-body {
    padding: 16px;
}

/* Auth Modal Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

/* Input Group */
.input-group {
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.input-group-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group-wrapper i {
    position: absolute;
    right: 12px;
    color: var(--text-muted);
    font-size: 14px;
}

.input-group-wrapper input {
    width: 100%;
    padding: 10px 40px 10px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    transition: border-color 0.2s;
}

.input-group-wrapper input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 12px 20px;
    border-radius: 24px;
    font-size: 13px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
    max-width: 90%;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Contact Modal */
.contact-list {
    list-style: none;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item i {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 14px;
}

.contact-item-info {
    flex: 1;
}

.contact-item-label {
    font-size: 11px;
    color: var(--text-muted);
}

.contact-item-value {
    font-size: 13px;
    color: var(--text-primary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.social-link {
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.social-link:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.social-link img {
    width: 18px;
    height: 18px;
}

/* Map Buttons */
.map-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.map-btn {
    flex: 1;
    padding: 10px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.map-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.map-btn img {
    width: 16px;
    height: 16px;
}

/* Working Hours */
.working-hours {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.working-hours-title {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.working-hours-list {
    font-size: 11px;
    color: var(--text-secondary);
}

.working-hours-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

/* Responsive */
@media (max-width: 400px) {
    .app-container {
        margin: 0;
        border-radius: 0;
        max-width: 100%;
        min-height: 100vh;
    }
}

/* ========================================
   Cart Modal Styles - Enhanced
   ======================================== */
.cart-items-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.cart-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 11px;
    color: var(--accent-color);
    margin-bottom: 6px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.qty-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.qty-value {
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 14px;
    margin-right: auto;
    transition: opacity 0.2s;
}

.remove-btn:hover {
    opacity: 0.7;
}

.cart-summary {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 12px;
}

.summary-row.total {
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
    padding-top: 10px;
    font-size: 14px;
    font-weight: bold;
    color: var(--accent-color);
}

/* ========================================
   Discount Section - Beautiful Minimal Design
   ======================================== */
.discount-section {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 12px;
}

.discount-section label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.discount-section label i {
    color: var(--accent-color);
    font-size: 14px;
}

.discount-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.discount-input-wrapper input {
    flex: 1;
    padding: 10px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.discount-input-wrapper input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.discount-input-wrapper input::placeholder {
    color: var(--text-muted);
}

.discount-apply-btn {
    padding: 10px 18px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.discount-apply-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.discount-apply-btn:active {
    transform: translateY(0);
}

.discount-message {
    font-size: 11px;
    margin-top: 6px;
    min-height: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.discount-message.success {
    color: var(--success-color);
}

.discount-message.error {
    color: var(--danger-color);
}

/* Payment Section */
.payment-section {
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
}

.payment-methods {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.payment-method {
    flex: 1;
    min-width: 80px;
    padding: 10px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-method:hover {
    border-color: var(--accent-color);
}

.payment-method.selected {
    border-color: var(--accent-color);
    background: rgba(212, 175, 55, 0.1);
}

.payment-method i {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--accent-color);
}

.payment-method span {
    font-size: 11px;
}

.btn-outline {
    border: 1.5px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* ========================================
   Profile Styles
   ======================================== */
.profile-header {
    text-align: center;
    padding: 24px 20px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
}

.profile-avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar i {
    font-size: 36px;
    color: white;
}

.avatar-edit-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid var(--bg-primary);
    font-size: 12px;
    transition: transform 0.2s;
}

.avatar-edit-btn:hover {
    transform: scale(1.1);
}

.profile-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 4px;
}

.profile-username {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.profile-stats-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.profile-stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-stat-item i {
    font-size: 20px;
    color: var(--accent-color);
}

.stat-value {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 4px;
}

.profile-tabs::-webkit-scrollbar {
    display: none;
}

.profile-tab {
    padding: 10px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.profile-tab.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Info Sections */
.info-section {
    margin-bottom: 20px;
}

.info-section-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.info-section-title i {
    color: var(--accent-color);
}

.info-list {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.info-label i {
    color: var(--accent-color);
    font-size: 14px;
}

.info-value-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.info-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: left;
}

.edit-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 12px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.edit-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.locked-badge {
    width: 28px;
    height: 28px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 11px;
}

/* Orders Summary */
.orders-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.summary-item {
    flex: 1;
    background: var(--card-bg);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.summary-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 4px;
}

.summary-label {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Order Card Mini */
.order-card-mini {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 2px 8px var(--shadow-color);
    margin-bottom: 10px;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.order-code {
    font-family: monospace;
    font-size: 12px;
    font-weight: bold;
    color: var(--text-primary);
}

.order-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-bottom: 8px;
}

.order-date {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.order-total {
    font-weight: bold;
    color: var(--accent-color);
}

.order-note {
    margin-top: 8px;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.order-note i {
    color: var(--accent-color);
    margin-top: 2px;
    flex-shrink: 0;
}

.order-payment {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-payment i {
    color: var(--accent-color);
}

/* Referral Styles */
.referral-code-box {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
    color: white;
}

.referral-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.referral-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
}

.copy-btn {
    background: white;
    color: var(--accent-color);
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: transform 0.2s;
}

.copy-btn:hover {
    transform: scale(1.05);
}

.referral-link-box {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.referral-link {
    display: flex;
    gap: 8px;
    align-items: center;
}

.referral-link input {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-family: monospace;
    font-size: 11px;
}

.referral-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.ref-stat-item {
    flex: 1;
    background: var(--card-bg);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.ref-stat-value {
    font-size: 22px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 4px;
}

.ref-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.referrals-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.referral-event-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.event-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.event-icon.register {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
}

.event-icon.order_commission {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-color);
}

.event-info {
    flex: 1;
    min-width: 0;
}

.event-text {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.event-points {
    color: var(--accent-color);
    font-weight: bold;
}

.event-date {
    font-size: 10px;
    color: var(--text-muted);
}

/* Logout Button */
.btn-logout-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1.5px solid var(--danger-color);
    color: var(--danger-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    text-decoration: none;
    margin-top: 20px;
    transition: all 0.2s;
}

.btn-logout-profile:hover {
    background: var(--danger-color);
    color: white;
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
}

.status-pending {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
}

.status-preparing {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.status-completed {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
}

.status-cancelled {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

/* Cart Modal Textarea Fix */
#checkoutForm .input-group {
    margin-bottom: 12px;
}

#checkoutForm .input-group label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

#checkoutForm textarea.form-control {
    width: 100%;
    padding: 10px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 12px;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.2s;
}

#checkoutForm textarea.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Points Log */
.points-log-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.points-log-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.log-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.log-icon.positive {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
}

.log-icon.negative {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

.log-info {
    flex: 1;
    min-width: 0;
}

.log-text {
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.log-date {
    font-size: 10px;
    color: var(--text-muted);
}

.log-points {
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.log-points.positive {
    color: var(--success-color);
}

.log-points.negative {
    color: var(--danger-color);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* ✅ لیبل تخفیف */
.price-discount-badge {
    font-size: 9px;
    color: white;
    background: #e74c3c;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 500;
    margin-top: 2px;
}

/* ✅ دکمه سفارش قفل شده */
.menu-item-order-btn:has(.fa-lock) {
    background: var(--text-muted);
    cursor: not-allowed;
}

.menu-item-order-btn:has(.fa-lock):hover {
    background: var(--text-muted);
    transform: none;
}
/* ✅ حالت disabled برای روش پرداخت */
.payment-method.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.payment-method.disabled:hover {
    border-color: var(--border-color);
}
/* ✅ آیتم اتمام موجودی */
.menu-item.out-of-stock {
    opacity: 0.85;
}

.menu-item.out-of-stock .menu-item-image {
    filter: grayscale(50%) brightness(0.9);
}

/* ✅ Badge اتمام موجودی روی تصویر */
.out-of-stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(231, 76, 60, 0.95);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
    z-index: 2;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ✅ پیام اتمام موجودی به جای قیمت */
.out-of-stock-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 8px;
    color: #e74c3c;
    text-align: center;
}

.out-of-stock-message i {
    font-size: 16px;
}

.out-of-stock-message span {
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

/* Dark mode */
[data-theme="dark"] .out-of-stock-message {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.4);
    color: #ff6b6b;
}

/* ✅ آیتم غیرفعال */
.menu-item.inactive-item {
    opacity: 0.5;
    pointer-events: none;
}

.menu-item.inactive-item .menu-item-image {
    filter: grayscale(100%);
}

/* ========================================
   User Menu Styles
   ======================================== */

/* Wrapper منوی کاربر */
.user-menu-wrapper {
    position: relative;
}

/* دکمه تریگر منو */
.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 4px;
    background: transparent;
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.user-menu-trigger:hover {
    border-color: var(--accent-color);
    background: var(--bg-secondary);
}

/* Wrapper آواتار */
.user-avatar-wrapper {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-color);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.user-avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder آواتار (حرف اول نام) */
.user-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

/* نام کاربر در دکمه */
.user-menu-name {
    font-size: 12px;
    color: var(--text-primary);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* آیکون فلش */
.user-menu-chevron {
    font-size: 10px;
    color: var(--text-secondary);
}

/* منوی کشویی */
.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 5px 20px var(--shadow-color);
    min-width: 220px;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* هدر منوی کشویی */
.user-dropdown-header {
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.user-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.user-dropdown-username {
    font-size: 11px;
    color: var(--text-secondary);
}

/* لینک‌های منو */
.user-dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.user-dropdown-link:last-child {
    border-bottom: none;
}

.user-dropdown-link:hover {
    background: var(--bg-secondary);
    padding-right: 20px;
}

.user-dropdown-link i {
    color: var(--accent-color);
    width: 16px;
    text-align: center;
}

/* لینک خروج (قرمز) */
.user-dropdown-link.logout {
    color: var(--danger-color);
}

.user-dropdown-link.logout i {
    color: var(--danger-color);
}

.user-dropdown-link.logout:hover {
    background: rgba(231, 76, 60, 0.05);
}

/* Responsive */
@media (max-width: 400px) {
    .user-menu-name {
        display: none;
    }
    
    .user-menu-trigger {
        padding: 4px;
    }
    
    .user-dropdown {
        min-width: 180px;
    }
}