/* ===================================================================
   نظام إدارة المطعم - الأنماط الرئيسية
   =================================================================== */

:root {
    --primary: #c9a961;
    --primary-dark: #a88a4a;
    --primary-light: #e5c989;
    --secondary: #2c1810;
    --accent: #e74c3c;
    --bg: #fafafa;
    --text: #2c1810;
    --text-light: #6c757d;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    margin: 0;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ============== Header ============== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 700;
    font-size: 24px;
    color: var(--secondary) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand .logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.nav-link {
    font-weight: 600;
    color: var(--secondary) !important;
    padding: 8px 18px !important;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary) !important;
    background: rgba(201, 169, 97, 0.1);
}

.nav-link.active {
    color: var(--primary) !important;
}

.cart-btn {
    background: var(--primary);
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 30px !important;
    position: relative;
}

.cart-btn:hover {
    background: var(--primary-dark);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(201, 169, 97, 0.4);
}

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

/* ============== Hero ============== */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary) 0%, #1a0f08 100%);
    color: white;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(201, 169, 97, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(201, 169, 97, 0.2) 0%, transparent 50%);
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a961' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 80px 20px;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(201, 169, 97, 0.2);
    border: 1px solid var(--primary);
    border-radius: 30px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 25px;
    font-size: 14px;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: clamp(16px, 2vw, 20px);
    opacity: 0.9;
    margin-bottom: 35px;
    max-width: 600px;
    margin-inline: auto;
}

.btn-luxury {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(201, 169, 97, 0.4);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-luxury:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(201, 169, 97, 0.5);
    color: white;
}

.btn-outline-luxury {
    background: transparent;
    color: white;
    border: 2px solid var(--primary);
    padding: 13px 38px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-luxury:hover {
    background: var(--primary);
    color: white;
}

/* ============== Section ============== */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title .badge-line {
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 14px;
    display: block;
    margin-bottom: 12px;
}

.section-title h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: var(--secondary);
    margin: 0;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    margin: 20px auto 0;
    border-radius: 2px;
}

/* ============== Categories Tabs ============== */
.category-tabs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 20px 0;
    margin-bottom: 40px;
    justify-content: center;
    flex-wrap: wrap;
    scrollbar-width: thin;
}

.category-tab {
    padding: 12px 28px;
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    background: white;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-size: 15px;
}

.category-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(201, 169, 97, 0.3);
}

/* ============== Product Card ============== */
.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

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

.product-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: var(--gray-100);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.product-fav {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    color: #999;
}

.product-fav:hover, .product-fav.active {
    background: var(--accent);
    color: white;
}

.product-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--secondary);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
    color: #ffc107;
    font-size: 14px;
}

.product-rating .count {
    color: var(--text-light);
    margin-right: 5px;
}

.product-desc {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-allergens {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.allergen-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #fff3cd;
    color: #856404;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--gray-200);
    margin-top: auto;
}

.product-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.product-price .old {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 8px;
}

.btn-add {
    background: var(--primary);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.btn-add:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(201, 169, 97, 0.4);
}

.btn-add.added {
    background: #28a745;
}

/* ============== Features ============== */
.feature-card {
    text-align: center;
    padding: 35px 25px;
    background: white;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    height: 100%;
    border: 2px solid transparent;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--secondary);
}

.feature-card p {
    color: var(--text-light);
    font-size: 14px;
}

/* ============== Branches ============== */
.branch-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.branch-image {
    height: 200px;
    background: linear-gradient(135deg, var(--secondary), #1a0f08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 60px;
    position: relative;
}

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

.branch-body {
    padding: 25px;
}

.branch-body h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--secondary);
}

.branch-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-size: 14px;
}

.branch-info i {
    color: var(--primary);
    width: 20px;
}

/* ============== Reviews ============== */
.review-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    height: 100%;
    border-right: 4px solid var(--primary);
}

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

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.review-author-name {
    font-weight: 700;
    color: var(--secondary);
    margin: 0;
}

.review-date {
    font-size: 12px;
    color: var(--text-light);
}

.review-stars {
    color: #ffc107;
}

/* ============== Footer ============== */
.site-footer {
    background: linear-gradient(135deg, var(--secondary) 0%, #1a0f08 100%);
    color: white;
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-brand {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.site-footer h5 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.site-footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}

.site-footer a {
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
}

.site-footer a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.social-link {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
    color: white !important;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 40px;
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

/* ============== Cart Sidebar ============== */
.cart-sidebar {
    position: fixed;
    top: 0;
    left: -450px;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: white;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    z-index: 9999;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    left: 0;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-header {
    padding: 25px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 { margin: 0; font-size: 22px; }

.cart-close {
    background: var(--gray-100);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.cart-close:hover { background: var(--gray-200); }

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--gray-200);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 700;
    margin: 0 0 4px;
    font-size: 15px;
}

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

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover { background: var(--primary); color: white; }

.qty-display {
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.btn-remove {
    background: transparent;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 5px;
    margin-right: auto;
}

.cart-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-100);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 700;
}

.cart-total .amount {
    color: var(--primary);
    font-size: 22px;
}

/* ============== View-Only Mode ============== */
.view-only-banner {
    background: linear-gradient(135deg, var(--accent), #c0392b);
    color: white;
    text-align: center;
    padding: 12px;
    font-weight: 600;
    font-size: 14px;
}

/* ============== Animations ============== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ============== Responsive ============== */
@media (max-width: 768px) {
    .section { padding: 50px 0; }
    .hero { min-height: 70vh; }
    .product-image { height: 200px; }
    .navbar-brand { font-size: 18px; }
    .navbar-brand .logo-icon { width: 38px; height: 38px; font-size: 18px; }
}

/* ============== Toast ============== */
.toast-container {
    position: fixed;
    top: 90px;
    left: 20px;
    z-index: 10000;
}

.custom-toast {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    border-right: 4px solid var(--primary);
    animation: slideInRight 0.3s ease-out;
    min-width: 280px;
}

@keyframes slideInRight {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.custom-toast.success { border-color: #28a745; }
.custom-toast.error { border-color: var(--accent); }

/* ============== Utilities ============== */
.text-primary-color { color: var(--primary) !important; }
.bg-primary-color { background-color: var(--primary) !important; }

/* صورة افتراضية */
.placeholder-img {
    background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 48px;
}
