/* ============================================================
   قسم العميل - تصميم عصري (بدون GPS)
   ============================================================ */

/* ==================== الخلفية العامة ==================== */
#customerPage {
    background: linear-gradient(180deg, #fff8f3 0%, #f5f7fa 100%) !important;
    min-height: 100vh;
}

/* ==================== شريط البحث والموقع ==================== */
.customer-hero {
    background: linear-gradient(135deg, #ff6b35 0%, #ff9f1c 100%);
    padding: 20px 5% 30px;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.25);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.customer-hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.customer-hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.customer-hero > * {
    position: relative;
    z-index: 1;
}

.customer-greeting {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 4px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.customer-greeting-sub {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    margin-bottom: 16px;
}

/* ==================== شريط البحث ==================== */
.customer-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 16px;
    padding: 6px 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
}

.customer-search-bar:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}

.customer-search-bar .search-icon {
    font-size: 18px;
    opacity: 0.5;
}

.customer-search-bar input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 0;
    font-size: 15px;
    font-family: inherit;
    background: transparent;
    color: #2d3436;
}

.customer-search-bar input::placeholder {
    color: #b2bec3;
}

/* ==================== زر الموقع ==================== */
.customer-location-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.customer-location-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* ==================== شرائح التصنيفات ==================== */
.customer-categories-wrapper {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 5% 20px !important;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.customer-categories-wrapper::-webkit-scrollbar {
    display: none;
}

#customerCategories {
    display: inline-flex !important;
    gap: 10px !important;
}

#customerCategories .btn {
    padding: 10px 20px !important;
    border-radius: 50px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    white-space: nowrap;
    border: 2px solid transparent !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: #fff !important;
    color: #636e72 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

#customerCategories .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12) !important;
    color: #ff6b35 !important;
}

#customerCategories .btn.btn-primary {
    background: linear-gradient(135deg, #ff6b35, #ff9f1c) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.35) !important;
    transform: translateY(-2px);
}

/* ==================== قسم المطاعم ==================== */
.orders-section {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 5% 24px !important;
}

.orders-section h2 {
    background: transparent !important;
    color: #2d3436 !important;
    padding: 0 !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    margin-bottom: 16px !important;
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.orders-section h2::before {
    content: '🔥';
    font-size: 22px;
}

.orders-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 18px !important;
}

/* ==================== بطاقة المطعم ==================== */
.restaurant-card {
    background: #fff !important;
    border-radius: 20px !important;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06) !important;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(0,0,0,0.03);
    animation: customerCardIn 0.5s ease-out both;
}

@keyframes customerCardIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.restaurant-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(255, 107, 53, 0.15) !important;
    border-color: rgba(255, 107, 53, 0.2);
}

.restaurant-card-cover {
    height: 160px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    position: relative;
    overflow: hidden;
    font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', 'Cairo', sans-serif;
    line-height: 1;
    text-align: center;
}

.restaurant-card-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.15) 100%);
}

.restaurant-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    color: #f59e0b;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.restaurant-card-delivery {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    color: #00b894;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 4px;
}

.restaurant-card-info {
    padding: 16px;
}

.restaurant-card-info h3 {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 800;
    color: #2d3436;
    display: flex;
    align-items: center;
    gap: 6px;
}

.restaurant-card-info .cuisine {
    color: #636e72;
    font-size: 13px;
    margin: 0 0 12px;
}

.restaurant-card-info .fee {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px dashed #eef0f3;
}

.restaurant-card-info .fee span {
    font-size: 12px;
    color: #636e72;
    font-weight: 600;
}

.restaurant-card-info .fee .fee-value {
    color: #ff6b35;
    font-weight: 800;
    font-size: 14px;
}

.restaurant-card-view-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #ff6b35, #ff9f1c);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.restaurant-card-view-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

/* ==================== مودال القائمة ==================== */
.menu-restaurant-header {
    background: linear-gradient(135deg, #ff6b35, #ff9f1c);
    color: #fff;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

.menu-restaurant-header .emoji {
    font-size: 48px;
    margin-bottom: 8px;
    display: block;
    font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', 'Cairo', sans-serif;
}

.menu-restaurant-header h3 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 800;
}

.menu-restaurant-header p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

/* ============================================================
   ✅ شبكة الأصناف (عرضية)
   ============================================================ */
#customerMenuItems {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

#customerMenuItems .menu-restaurant-header {
    grid-column: 1 / -1;
    margin-bottom: 8px;
}

#customerMenuItems > .btn-primary {
    grid-column: 1 / -1;
    margin-top: 8px !important;
}

#customerMenuItems .empty-state {
    grid-column: 1 / -1;
}

/* ==================== بطاقة الطبق ==================== */
.menu-item-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: #fff;
    border-radius: 16px;
    border: 2px solid #f8f9fb;
    overflow: hidden;
    transition: all 0.3s ease;
    height: fit-content;
}

.menu-item-card:hover {
    border-color: #ffecd2;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.12);
    transform: translateY(-4px);
}

.menu-item-icon {
    width: 100%;
    height: 140px;
    border-radius: 0;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    flex-shrink: 0;
    overflow: hidden;
    padding: 0;
    font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', 'Cairo', sans-serif;
}

.menu-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-item-details {
    flex: 1;
    min-width: 0;
    padding: 12px 14px 8px;
}

.menu-item-details h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #2d3436;
    line-height: 1.3;
}

.menu-item-details .desc {
    font-size: 12px;
    color: #636e72;
    margin: 0 0 8px;
    line-height: 1.4;
    min-height: 34px;
}

.menu-item-details .price {
    font-size: 16px;
    font-weight: 800;
    color: #ff6b35;
    display: block;
    margin-bottom: 6px;
}

.menu-item-note-input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #f0f2f5;
    border-radius: 10px;
    font-size: 12px;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.menu-item-note-input:focus {
    border-color: #ff6b35;
    background: #fff8f3;
}

.menu-item-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px 14px;
}

.menu-item-add-btn {
    width: 100%;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6b35, #ff9f1c);
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
    font-family: inherit;
}

.menu-item-add-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.menu-item-add-btn::after {
    content: ' إضافة للسلة';
    font-size: 13px;
}

/* ==================== سلة الطلبات ==================== */
#customerCartItems {
    background: #fafbfc !important;
    border-radius: 16px !important;
    padding: 16px !important;
    max-height: 400px;
    overflow-y: auto;
}

#customerCartItems h3 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #2d3436;
}

.cart-item-row {
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    border: 1px solid #f0f2f5;
}

.cart-item-qty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fb;
    padding: 4px 8px;
    border-radius: 20px;
}

.cart-item-qty button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ff6b35, #ff9f1c);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    font-family: inherit;
}

.cart-item-qty button:hover {
    transform: scale(1.15);
}

.cart-total-section {
    background: linear-gradient(135deg, #fff5f0, #ffeedf);
    padding: 16px;
    border-radius: 14px;
    margin-top: 12px;
    text-align: center;
}

.cart-total-section h3 {
    margin: 0;
    font-size: 20px;
    color: #2d3436;
}

#customerCartTotal {
    color: #ff6b35 !important;
    font-weight: 800 !important;
    font-size: 24px !important;
}

/* ==================== زر إتمام الطلب ==================== */
#customerCartModal .btn-success {
    background: linear-gradient(135deg, #00b894, #55efc4) !important;
    padding: 14px !important;
    font-size: 16px !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.3) !important;
    transition: all 0.3s ease !important;
}

#customerCartModal .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 184, 148, 0.4) !important;
}

/* ==================== الفئات الفارغة ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #b2bec3;
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 12px;
    display: block;
    opacity: 0.4;
}

.empty-state p {
    font-size: 15px;
    margin: 0;
}

/* ==================== Skeleton Loaders ==================== */
.restaurant-skeleton {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.restaurant-skeleton .skeleton-cover {
    height: 160px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.restaurant-skeleton .skeleton-line {
    height: 14px;
    margin: 12px 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: 4px;
}

.restaurant-skeleton .skeleton-line.short {
    width: 60%;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   ✅ Responsive
   ============================================================ */

@media (min-width: 1200px) {
    #customerMenuItems {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1199px) and (min-width: 769px) {
    #customerMenuItems {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .orders-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }

    .restaurant-card-cover {
        height: 120px;
        font-size: 48px;
    }

    .restaurant-card-info {
        padding: 12px;
    }

    .restaurant-card-info h3 {
        font-size: 14px;
    }

    .restaurant-card-info .cuisine {
        font-size: 11px;
    }

    .customer-greeting {
        font-size: 18px;
    }

    #customerMenuItems {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .menu-item-icon {
        height: 100px;
        font-size: 36px;
    }

    .menu-item-details {
        padding: 8px 10px 6px;
    }

    .menu-item-details h4 {
        font-size: 13px;
    }

    .menu-item-details .desc {
        font-size: 11px;
        min-height: 28px;
    }

    .menu-item-details .price {
        font-size: 14px;
    }

    .menu-item-note-input {
        font-size: 11px;
        padding: 6px 8px;
    }

    .menu-item-actions {
        padding: 0 10px 10px;
    }

    .menu-item-add-btn {
        height: 36px;
        font-size: 14px;
    }

    .menu-item-add-btn::after {
        content: '';
    }
}

@media (max-width: 480px) {
    .orders-grid {
        grid-template-columns: 1fr !important;
    }

    .restaurant-card-cover {
        height: 140px;
    }

    #customerMenuItems {
        grid-template-columns: 1fr;
    }
}

/* ==================== أنميشن ظهور العناصر ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.customer-hero {
    animation: fadeInUp 0.5s ease-out;
}

#customerCategories {
    animation: fadeInUp 0.6s ease-out;
}

.orders-section {
    animation: fadeInUp 0.7s ease-out;
}
