/* ---------------------------
   0. Local Fonts (@font-face)
--------------------------- */

/* Cairo - Arabic + Latin */
@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('./fonts/cairo-v31-arabic_latin/cairo-v31-arabic_latin-300.woff2') format('woff2');
}

@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./fonts/cairo-v31-arabic_latin/cairo-v31-arabic_latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('./fonts/cairo-v31-arabic_latin/cairo-v31-arabic_latin-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./fonts/cairo-v31-arabic_latin/cairo-v31-arabic_latin-700.woff2') format('woff2');
}

/* Inter - Latin */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./fonts/inter-v20-latin/inter-v20-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('./fonts/inter-v20-latin/inter-v20-latin-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('./fonts/inter-v20-latin/inter-v20-latin-600.woff2') format('woff2');
}

/* Playfair Display - Latin */
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('./fonts/playfair-display-v40-latin/playfair-display-v40-latin-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('./fonts/playfair-display-v40-latin/playfair-display-v40-latin-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./fonts/playfair-display-v40-latin/playfair-display-v40-latin-700.woff2') format('woff2');
}

/* Montserrat - Latin */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./fonts/montserrat-v31-latin/montserrat-v31-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./fonts/montserrat-v31-latin/montserrat-v31-latin-700.woff2') format('woff2');
}

/* ---------------------------
   1. Variables & Theme Setup
--------------------------- */
:root {
    /* Colors - Golden Harvest (Light Mode) */
    --color-bg: #FCFAf7;
    --color-surface: #FFFFFF;
    --color-text-primary: #1E293B;
    --color-text-secondary: #64748B;
    --color-accent: #ea580c;
    /* Vibrant Orange */
    --color-accent-hover: #c2410c;
    /* Darker Orange on Hover */
    --color-accent-soft: #ffedd5;
    /* Light Orange Background */
    --color-border: #E2E8F0;
    --color-gradient-primary: linear-gradient(135deg, #ea580c, #c2410c);
    --color-footer-bg: #1A130F;
    /* Deep Umber for Light Mode */

    /* Decoration */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 12px 32px rgba(180, 83, 9, 0.12);

    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-arabic: 'Cairo', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* RTL Support - Global */
[dir="rtl"] {
    font-family: var(--font-arabic) !important;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] .logo {
    font-family: var(--font-arabic);
}

/* Dark Theme - Night Grills */
[data-theme="dark"] {
    --color-bg: #0F172A;
    --color-surface: #1E293B;
    --color-text-primary: #F8FAFC;
    --color-text-secondary: #94A3B8;
    --color-accent: #F59E0B;
    --color-accent-hover: #D97706;
    --color-accent-soft: rgba(245, 158, 11, 0.1);
    --color-border: #334155;

    --color-footer-bg: #0F172A;
    /* Deep Midnight for Dark Mode */

    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 12px 40px rgba(245, 158, 11, 0.08);
}

/* ---------------------------
   2. Global Reset & Base
--------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    /* Prevent CLS from scrollbar appearance */
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
    -webkit-font-smoothing: antialiased;
    min-height: 100%;
    overflow-x: hidden;
    /* Note: contain:layout removed because it breaks position:fixed for FABs */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------------------------
   3. Navbar
--------------------------- */
/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    /* Default Transparent */
    backdrop-filter: none;
    /* No blur initially */
    border-bottom: 1px solid transparent;
    transition: all var(--transition-smooth);
    color: white;
    /* Default White Text */
}

/* Scrolled State */
.navbar.scrolled {
    background: rgba(252, 250, 247, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    color: var(--color-text-primary);
    /* Switch to dark text */
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(15, 23, 42, 0.9);
    border-bottom-color: var(--color-border);
}

.nav-content {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: inherit;
    /* Inherit from navbar */
    letter-spacing: -0.02em;
}

/* Nav Controls */
.nav-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* Force white controls when navbar is transparent (not scrolled) */
.navbar:not(.scrolled) .lang-btn,
.navbar:not(.scrolled) .icon-btn {
    color: white !important;
    border-color: rgba(255, 255, 255, 0.4);
}

.navbar:not(.scrolled) .lang-btn:hover,
.navbar:not(.scrolled) .icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Language Toggle */
.lang-btn {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
}

[dir="rtl"] .lang-btn {
    font-family: var(--font-body);
}

.lang-btn:hover {
    background-color: var(--color-surface);
    border-color: var(--color-text-primary);
}

/* Theme Toggle */
.icon-btn {
    padding: 8px;
    border-radius: 50%;
    color: var(--color-text-primary);
    transition: background-color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.icon-btn:hover {
    background-color: var(--color-border);
}

.sun-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

/* ---------------------------
   4. Hero Section
--------------------------- */
.hero {
    min-height: 100svh;
    /* Full viewport height (mobile-safe) */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    overflow: hidden;
    padding-top: 0;
    /* Centered content needs no top padding with overlay nav */
}

@media (max-width: 768px) {
    .hero {
        min-height: 100svh;
        /* Ensure full height on mobile too */
    }
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}


/* Abstract Background Pattern (CSS Only) */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
    opacity: 0.08;
    z-index: -1;
    filter: blur(80px);
}

/* Overlay for text readability */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Improved Gradient: Clear top, Darker bottom */
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(0, 0, 0, 0.2) 40%,
            rgba(0, 0, 0, 0.7) 100%);
    z-index: 0;
    will-change: opacity;
}


.hero-content {
    z-index: 1;
    max-width: 800px;
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    color: white;
    /* Force white text over image */
}

/* Enforce white text for hero elements over dark overlay */
.hero h1,
.hero p,
.hero .subtitle {
    color: white;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.subtitle {
    display: inline-block;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 16px;
    font-weight: 600;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 24px;
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.hero-actions-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.hero-main-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    /* Fixed height for consistency */
    padding: 0 32px;
    border-radius: 50px;
    font-weight: 700;
    transition: all var(--transition-smooth);
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

/* Primary CTA: Solid, Accent Color */
.btn-primary,
.primary-btn {
    background-color: var(--color-accent);
    color: white;
    box-shadow: 0 4px 12px rgba(200, 121, 65, 0.3);
}

.btn-primary:hover,
.primary-btn:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(200, 121, 65, 0.4);
}

/* Secondary CTA: Outline, White */
.btn-secondary,
.outline-btn {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
}

.btn-secondary:hover,
.outline-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-2px);
}

/* Tertiary CTA: Text Link */
.btn-link {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    /* Reduced padding */
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 4px;
    margin-top: -4px;
    /* Pull tighter to group */
    border-radius: 8px;
    /* So hover effect looks good */
}

.btn-link:hover {
    color: white;
    text-decoration-thickness: 2px;
}

.arrow-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    margin-inline-start: 6px;
}

.btn-link:hover .arrow-icon {
    transform: translateX(-4px);
    /* RTL moves left */
}

[dir="ltr"] .btn-link:hover .arrow-icon {
    transform: translateX(4px);
    /* LTR moves right */
}

/* ---------------------------
   5. Menu Section
--------------------------- */
.menu-section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--color-text-primary);
}

.section-header p {
    color: var(--color-text-secondary);
}

.divider {
    width: 60px;
    height: 3px;
    background-color: var(--color-accent);
    margin: 20px auto;
}

/* Filter Controls */
.categories-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
    min-height: 44px;
    /* Prevent CLS when buttons load dynamically */
}

.category-btn {
    padding: 10px 24px;
    border: 1px solid var(--color-border);
    border-radius: 50px;
    color: var(--color-text-secondary);
    background-color: transparent;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

/* Reduced spacing for mobile menu */
@media (max-width: 768px) {
    .menu-section {
        padding: 40px 0;
        /* Reduced from 100px */
    }

    .section-header {
        margin-bottom: 32px;
    }
}



.category-btn:hover,
.category-btn.active {
    background-color: var(--color-text-primary);
    color: var(--color-bg);
    /* Inverse logic */
    border-color: var(--color-text-primary);
}

[data-theme="dark"] .category-btn.active {
    color: var(--color-bg);
    background-color: var(--color-text-primary);
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
    min-height: 800px;
    contain: layout style;
    transition: opacity 0.3s ease;
}

/* Loading state - hide content until ready */
.menu-grid.loading {
    opacity: 0.5;
}

.menu-grid.loaded {
    opacity: 1;
}

@media (max-width: 640px) {
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
}

.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.load-more-btn {
    color: var(--color-text-primary);
    border-color: var(--color-border);
    min-width: 200px;
}

.load-more-btn.hidden {
    display: none;
}

.load-more-btn:hover {
    background-color: var(--color-text-primary);
    color: var(--color-bg);
}

/* Menu Item Card */
.menu-item {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 380px;
    /* Fixed minimum height for CLS prevention */
}

.menu-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-accent);
}

.item-img-container {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
    background-color: var(--color-bg);
}


.item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.menu-item:hover .item-img {
    transform: scale(1.05);
}

.item-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
    width: 100%;
}


.item-name {
    font-size: 1.1rem;
    line-height: 1.3;
    margin: 0;
    flex: 1;
}

.item-description {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
}




[dir="rtl"] .item-price {
    margin-left: 0;
    margin-right: 16px;
}

/* ---------------------------
   6. Cart Drawer
--------------------------- */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    /* Click helper for drawer only */
    transition: opacity 0.3s ease;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 100%;
    height: 100%;
    background: var(--color-surface);
    z-index: 1002;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: -4px 0 24px var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

[dir="rtl"] .cart-drawer {
    right: auto;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.cart-open .cart-overlay {
    opacity: 1;
    pointer-events: all;
}

.cart-open .cart-drawer {
    transform: translateX(0);
}

/* Cart Header & Footer */
.cart-header {
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.25rem;
    color: var(--color-text-primary);
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
}

.cart-footer {
    padding: 24px;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--color-text-primary);
}

.full-width {
    width: 100%;
    text-align: center;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: center;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--color-accent);
    font-weight: 500;
}

.cart-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-bg);
    padding: 4px;
    border-radius: var(--radius-sm);
}

.qty-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--color-text-primary);
    border-radius: 4px;
}

.qty-btn:hover {
    background-color: var(--color-border);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--color-accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

[dir="rtl"] .cart-badge {
    right: auto;
    left: -4px;
}

.cart-btn {
    position: relative;
    padding: 8px;
}

/* Add to Cart Button on Card */
.add-to-cart-btn {
    margin-top: 16px;
    padding: 12px;
    width: 100%;
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    border: 1px solid var(--color-border);
}

.add-to-cart-btn:hover {
    background-color: var(--color-text-primary);
    color: var(--color-bg);
    border-color: var(--color-text-primary);
}

.empty-cart-msg {
    text-align: center;
    color: var(--color-text-secondary);
    margin-top: 40px;
}

/* ---------------------------
   14. Animations
--------------------------- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}




/* ---------------------------
   7. Floating Action Buttons
--------------------------- */
.floating-actions {
    position: fixed;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 900;
}

/* LTR Default: Left side */
.floating-actions {
    left: 24px;
}

[dir="rtl"] .floating-actions {
    left: auto;
    right: 24px;
}

/* Note: .fab, .fab-whatsapp, .fab-scroll-top styles are defined after Skeleton UI section
   with glassmorphism design - see "FAB Glassmorphism Styles" section below */

/* ---------------------------
   8. Skeleton UI
--------------------------- */
.skeleton-card {
    pointer-events: none;
}

.skeleton-card .item-img-container {
    background-color: var(--color-border);
    position: relative;
    overflow: hidden;
}

.skeleton-card .item-img-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.2) 20%,
            rgba(255, 255, 255, 0.5) 60%,
            rgba(255, 255, 255, 0));
    animation: shimmer 2s infinite;
}

[data-theme="dark"] .skeleton-card .item-img-container {
    background-color: var(--color-surface);
}

[data-theme="dark"] .skeleton-card .item-img-container::after {
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.05) 20%,
            rgba(255, 255, 255, 0.1) 60%,
            rgba(255, 255, 255, 0));
}

.skeleton-line {
    height: 12px;
    background-color: var(--color-border);
    margin-bottom: 10px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

/* Skeleton line variants to match real card content */
.skeleton-title {
    height: 20px;
    width: 70%;
    margin-bottom: 12px;
}

.skeleton-text {
    height: 14px;
    width: 100%;
}

.skeleton-text-short {
    height: 14px;
    width: 50%;
}

/* Skeleton content padding to match real cards */
.skeleton-card .item-content {
    padding: 24px;
    min-height: 120px;
}

.skeleton-line::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.2) 20%,
            rgba(255, 255, 255, 0.5) 60%,
            rgba(255, 255, 255, 0));
    animation: shimmer 2s infinite;
}

[data-theme="dark"] .skeleton-line {
    background-color: #334155;
}

[data-theme="dark"] .skeleton-line::after {
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.05) 20%,
            rgba(255, 255, 255, 0.1) 60%,
            rgba(255, 255, 255, 0));
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* ---------------------------
   7b. FAB Glassmorphism Styles
--------------------------- */
@keyframes pulse-glass {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Glassmorphism Base */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);

    color: var(--color-text-primary);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1000;
}

.fab svg {
    width: 24px;
    height: 24px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.fab:hover {
    transform: translateY(-4px) scale(1.05);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.fab-whatsapp {
    /* Green Tint Glass */
    background: rgba(37, 211, 102, 0.2);
    border-color: rgba(37, 211, 102, 0.3);
    color: #25D366;
    /* Iconic Green */
    animation: pulse-glass 3s infinite;
}

.fab-whatsapp:hover {
    background: rgba(37, 211, 102, 0.3);
    color: #128C7E;
    animation: none;
    /* Stop pulse on hover */
}

/* Dark mode overrides for better visibility */
[data-theme="dark"] .fab {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

[data-theme="dark"] .fab-whatsapp {
    background: rgba(37, 211, 102, 0.15);
    color: #4ade80;
    /* Lighter green for dark mode */
}

.fab-scroll-top {
    width: 48px;
    height: 48px;
    margin-left: auto;
    margin-right: auto;
    /* Glassmorphism - transparent like before */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text-primary);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    cursor: pointer;
}

.fab-scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.fab-scroll-top:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ---------------------------
   15. Responsive Design
--------------------------- */
@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero h1 {
        font-size: 2.75rem;
    }

    .categories-nav {
        gap: 8px;
        margin-bottom: 32px;
    }

    .category-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2 {
        font-size: 2.25rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .nav-content {
        height: 70px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .item-content {
        padding: 16px;
    }

    .item-name {
        font-size: 1rem;
    }
}

/* ---------------------------
   9. Menu Features (Sizes & Prices)
--------------------------- */
.size-select-container {
    margin: 12px 0;
}

.size-selector {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .size-selector {
    background-color: var(--color-surface);
}

.size-selector:hover {
    border-color: var(--color-accent);
}

[dir="rtl"] .size-selector {
    background-position: left 14px center;
}

.size-selector:focus {
    border-color: var(--color-accent);
}

.size-single-label {
    margin: 8px 0;
    font-weight: 600;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.size-single-label::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
    border-radius: 50%;
}

/* Price Display overrides & new classes */
.price-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 80px;
    flex-shrink: 0;
}


[dir="rtl"] .price-display {
    margin-left: 0;
    margin-right: 16px;
    align-items: flex-end;
}

.price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

[dir="rtl"] .price-wrapper {
    align-items: flex-end;
}

.original-price {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    text-decoration: line-through;
    opacity: 0.7;
    margin-bottom: 2px;
}

.final-price {
    font-weight: 700;
    color: var(--color-accent);
    font-size: 1.1rem;
    line-height: 1.2;
    white-space: nowrap;
}

.discount-badge {
    display: inline-block;
    background-color: #ef4444;
    /* Vivid Red */
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    margin-top: 4px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}



.item-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.add-to-cart-btn {
    margin-top: auto;
}

/* ---------------------------
   10. Checkout & Success Modals
--------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.checkout-modal,
.success-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 2001;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.checkout-modal.active,
.success-modal.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.checkout-modal-content {
    background: var(--color-surface);
    border-radius: 12px !important;
    width: 95vw !important;
    max-width: 700px !important;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    display: flex !important;
    flex-direction: column !important;
}

.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    background: var(--color-surface) !important;
}

.checkout-header h3 {
    font-size: 1.25rem;
    color: var(--color-text-primary);
    margin: 0;
}

.close-checkout-btn {
    color: var(--color-text-secondary);
}

.checkout-form {
    padding: 24px;
}

.checkout-form .form-group {
    margin-bottom: 20px;
}

.checkout-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.checkout-form input,
.checkout-form textarea,
.checkout-form select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.checkout-form input:focus,
.checkout-form textarea:focus,
.checkout-form select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(200, 121, 65, 0.15);
}

.checkout-form select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    cursor: pointer;
}

[dir="rtl"] .checkout-form select {
    background-position: left 16px center;
}

.checkout-form textarea {
    resize: vertical;
    min-height: 60px;
}

.checkout-summary {
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--color-border);
}

.promo-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--color-border);
}

.promo-input-group {
    display: flex;
    gap: 12px;
}

.promo-input-group input {
    flex: 1;
    margin-bottom: 0 !important;
    background: var(--color-surface);
}

.promo-input-group button {
    flex: 0 0 auto;
    padding: 0 20px;
    height: 52px;
    /* Matches input height roughly */
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    border-radius: var(--radius-sm);
    font-weight: 600;
    background: transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.promo-input-group button:hover {
    background: var(--color-accent);
    color: white;
}

.promo-input-group button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.promo-message {
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 600;
}

.promo-message.success {
    color: #38a169;
}

.promo-message.error {
    color: #e53e3e;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--color-text-secondary);
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-row.total-row {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-primary);
    font-weight: 700;
    font-size: 1.15rem;
}

.discount-value {
    color: #38a169;
    font-weight: 600;
}

.summary-total {
    font-weight: 800;
    color: var(--color-accent);
    font-size: 1.35rem;
    white-space: nowrap;
    text-align: left;
}

[dir="rtl"] .summary-total {
    text-align: right;
}

#submit-order-btn {
    padding: 16px;
    font-size: 1rem;
}

#submit-order-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#submit-order-btn.loading {
    position: relative;
    color: transparent;
}

#submit-order-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Modal */
.success-modal-content {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    width: 90vw;
    max-width: 400px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #48bb78, #38a169);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: scaleIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.success-icon svg {
    color: white;
    width: 40px;
    height: 40px;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-modal-content h3 {
    font-size: 1.5rem;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}

.success-modal-content p {
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.order-id-display {
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 24px;
}

#customer-notes {
    min-height: 80px;
    resize: vertical;
}

.order-id-display span {
    color: var(--color-text-secondary);
}

.order-id-display strong {
    color: var(--color-accent);
    font-size: 1.25rem;
    font-family: monospace;
    letter-spacing: 0.05em;
}

@media (max-width: 480px) {
    .order-id-display {
        flex-direction: column;
        gap: 8px;
    }

    .order-id-display strong {
        font-size: 1.1rem;
        word-break: break-all;
    }
}

#close-success {
    min-width: 200px;
}

/* RTL Adjustments for Checkout */
[dir="rtl"] .checkout-form input,
[dir="rtl"] .checkout-form textarea {
    text-align: right;
}

.summary-row span:last-child {
    font-weight: 600;
    white-space: nowrap;
}

[dir="rtl"] #customer-phone {
    text-align: left;
    direction: ltr;
}

/* Responsive Checkout */
@media (max-width: 480px) {
    .checkout-modal-content {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .checkout-form {
        padding: 16px;
    }

    .checkout-form .form-group {
        margin-bottom: 12px;
    }

    .checkout-form label {
        margin-bottom: 4px;
        font-size: 0.85rem;
    }

    .checkout-header {
        padding: 16px;
    }

    .checkout-summary {
        padding: 16px;
        margin-bottom: 20px;
    }

    .promo-input-group {
        gap: 8px;
    }

    .promo-input-group button {
        padding: 0 12px;
        font-size: 0.9rem;
    }

    .summary-row {
        font-size: 0.95rem;
    }

    .summary-total {
        font-size: 1.2rem;
    }

    .success-modal-content {
        width: 92%;
        max-width: 360px;
        min-height: auto;
        border-radius: var(--radius-md);
        padding: 32px 24px;
    }
}

/* FAB Dark Mode */
[data-theme="dark"] .fab-scroll-top {
    background-color: #2d3748;
    color: #e2e8f0;
    border: 1px solid #4a5568;
}

[data-theme="dark"] .fab-scroll-top:hover {
    background-color: #4a5568;
    color: white;
}



/* ---------------------------
   13. Footer
--------------------------- */
.footer {
    position: relative;
    background: var(--color-footer-bg);
    padding: 50px 20px 0;
    margin-top: auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    font-family: 'Cairo', sans-serif;
}

/* تأثير اللافا */
.lava-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url('#goo');
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}

.blob {
    position: absolute;
    background: var(--color-accent);
    border-radius: 50%;
    bottom: -50px;
}

.blob:nth-child(1) {
    width: 150px;
    height: 150px;
    left: 10%;
    animation: rise 15s infinite ease-in-out;
}

.blob:nth-child(2) {
    width: 100px;
    height: 100px;
    left: 30%;
    animation: rise 12s infinite ease-in-out 2s;
}

.blob:nth-child(3) {
    width: 180px;
    height: 180px;
    left: 55%;
    animation: rise 18s infinite ease-in-out 1s;
}

.blob:nth-child(4) {
    width: 120px;
    height: 120px;
    left: 80%;
    animation: rise 14s infinite ease-in-out 3s;
}

.blob:nth-child(5) {
    width: 80px;
    height: 80px;
    left: 45%;
    animation: rise 20s infinite ease-in-out 5s;
    background: var(--color-accent-hover);
}

@keyframes rise {
    0% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-150px) scale(1.1);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

/* التنسيق الشبكي (Grid) */
.footer-content-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    text-align: right;
}

[dir="ltr"] .footer-content-wrapper {
    text-align: left;
}

/* مركزة عمود "تواصل معنا" كامل في RTL */
.footer-content-wrapper>.footer-col:nth-child(3) {
    text-align: center;
}

[dir="ltr"] .footer-content-wrapper>.footer-col:nth-child(3) {
    text-align: center;
}



/* العناوين */
.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--color-accent);
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
}

[dir="ltr"] .footer-col h3::after {
    right: auto;
    left: 0;
}

/* النصوص والأيقونات */
.brand-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.8;
    margin-bottom: 20px;
    max-width: 300px;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle definition */
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
    /* Prevent squishing */
}

.social-link i {
    font-size: 1.2rem;
}

.social-link:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-3px) rotate(360deg);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: 0.3s;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    opacity: 1;
    padding-right: 5px;
    color: var(--color-accent);
}

.footer-links a i {
    margin-left: 8px;
    font-size: 0.7rem;
    color: var(--color-accent);
}

[dir="ltr"] .footer-links a i {
    margin-left: 0;
    margin-right: 8px;
    transform: rotate(180deg);
}

.contact-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    /* يخلي كل العناصر اللي جواه تملأ العرض */
    width: 100%;
}

.contact-list li {
    margin-bottom: 15px;
    width: 100%;
}

.contact-btn {
    height: 80px;
    justify-content: space-between;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
    transition: 0.3s;
    border: 1px solid transparent;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    /* تزويد العرض ليكون كامل العمود */
}


.contact-btn:hover {
    background: var(--color-accent-soft);
    border-color: var(--color-accent);
    transform: translateX(-5px);
}

.contact-btn i {
    font-size: 2rem;
    /* حجم أيقونة أكبر ومتساوي */
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-accent);
    backdrop-filter: blur(4px);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* دائرية كاملة للاثنين */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    /* مسافة من اليمين في RTL */
}

[dir="ltr"] .contact-btn i {
    margin-left: 0;
    margin-right: 15px;
}

.contact-info-text {
    text-align: right;
    flex: 1;
}

[dir="ltr"] .contact-info-text {
    text-align: left;
}

.contact-info-text span {
    display: block;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* النصوص أكبر وأوضح */
.contact-info-text strong {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.contact-info-text strong {
    font-size: 1rem;
}

/* الشريط السفلي وتوقيع المطور */
.bottom-bar {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 20;
}

.bottom-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.copyright-text {
    font-size: 0.9rem;
    opacity: 0.8;
}

.copyright-text strong {
    color: var(--color-accent);
}

/* توقيع المطور */
.developer-credit {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
    direction: ltr;
}

.heart-icon {
    color: #e74c3c;
    animation: heartbeat 1.5s infinite;
}

.dev-name {
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    position: relative;
    transition: 0.3s;
    padding: 2px 5px;
}

.dev-name::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #e67e22;
    transition: width 0.3s ease-in-out;
}

.dev-name:hover {
    color: var(--color-accent);
    text-shadow: 0 0 10px var(--shadow-hover);
}

.dev-name:hover::before {
    width: 100%;
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.3);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.3);
    }

    70% {
        transform: scale(1);
    }
}

.svg-filter-hide {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* 11. Skeleton Loading */
.skeleton-card {
    pointer-events: none;
    border-color: var(--color-border) !important;
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #eeeeee;
    /* Default visible light grey */
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

[data-theme="dark"] .skeleton-img {
    background: #2a2a2a;
}

.skeleton-line {
    background: #eeeeee;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .skeleton-line {
    background: #2a2a2a;
}

.skeleton-title {
    height: 1.2rem;
    margin-bottom: 12px;
    width: 100%;
}

.skeleton-text {
    height: 0.9rem;
    margin-bottom: 8px;
    width: 80%;
}

.skeleton-text-short {
    height: 0.9rem;
    width: 60%;
}

.skeleton-img::after,
.skeleton-line::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            /* Higher opacity shimmer */
            transparent);
    animation: skeleton-shimmer 1.2s infinite;
}

/* Light mode specific shimmer for better visibility */
[data-theme="light"] .skeleton-img::after,
[data-theme="light"] .skeleton-line::after {
    background: linear-gradient(90deg,
            transparent,
            rgba(0, 0, 0, 0.05),
            transparent);
}

@keyframes skeleton-shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* =========================================
   التجاوب (Responsive)
   ========================================= */
@media (max-width: 768px) {
    .footer-content-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    [dir="ltr"] .footer-content-wrapper {
        text-align: center;
    }

    .footer-col h3::after {
        right: 50%;
        transform: translateX(50%);
    }

    [dir="ltr"] .footer-col h3::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .brand-desc {
        margin: 0 auto 20px;
    }

    .social-icons {
        justify-content: center;
    }

    .contact-btn {
        justify-content: center;
    }

    .bottom-bar-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* =========================================
   11. Order Tracking UI
   ========================================= */

/* Hero Track Button */
.track-hero-btn {
    margin-top: 1.2rem;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    width: fit-content;
}

.track-hero-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff !important;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    margin-inline-start: 8px;
}

.copy-btn:hover {
    color: var(--color-accent);
    background: rgba(0, 0, 0, 0.05);
}

/* Tracking Modal */
#tracking-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#tracking-modal.hidden {
    display: none !important;
}

.tracking-modal-content {
    max-width: 500px;
    width: 100%;
    background: var(--color-bg);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-border);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--color-text-primary);
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--color-text-secondary);
    line-height: 1;
}

.close-modal-btn:hover {
    color: var(--color-accent);
}

.tracking-body {
    margin-top: 1rem;
}

.tracking-search {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

@media (max-width: 480px) {
    .tracking-search {
        flex-direction: column;
    }

    .tracking-search .btn {
        width: 100%;
    }
}

.tracking-search .btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.tracking-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-size: 1rem;
}

.tracking-input:focus {
    border-color: var(--color-accent);
    outline: none;
}

#tracking-result.hidden {
    display: none;
}

/* Stepper */
.stepper-wrapper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 2rem 0;
}

.stepper-wrapper::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--color-border);
    z-index: 0;
}

.stepper-item {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 33.33%;
    opacity: 0.4;
    transition: all 0.3s;
}

.stepper-item.active {
    opacity: 1;
}

.stepper-item.completed .step-icon {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.stepper-item.current .step-icon {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.2);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(255, 107, 0, 0.1);
    }
}

.step-icon {
    width: 48px;
    height: 48px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-align: center;
}

.order-meta-info {
    background: var(--color-bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.meta-row {
    font-size: 0.9rem;
    text-align: center;
}

.meta-row strong {
    display: block;
    margin-top: 4px;
    color: var(--color-accent);
    font-size: 1rem;
}

.track-message {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    min-height: 20px;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .tracking-modal-content {
    background: #1a1a1a;
    border: 1px solid #333;
}

[data-theme="dark"] .step-icon {
    background: #222;
    border-color: #444;
}

/* Button Spinner for Loading States */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spinner-rotate 0.8s linear infinite;
    vertical-align: middle;
    margin-inline-end: 6px;
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

@keyframes spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   12. Branches Section
   ========================================= */

.branches-section {
    padding: 80px 0;
    background-color: var(--color-surface);
    position: relative;
    z-index: 2;
}

[data-theme="dark"] .branches-section {
    background-color: #172033;
}

.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.branch-card {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] .branch-card {
    background: var(--color-bg-secondary);
}

.branch-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.branch-img-container {
    height: 200px;
    overflow: hidden;
}

.branch-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.branch-card:hover .branch-img {
    transform: scale(1.05);
}

.branch-content {
    padding: 24px;
}

.branch-content h3 {
    margin-bottom: 12px;
    color: var(--color-text-primary);
}

.branch-address {
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.branch-contact {
    display: flex;
    gap: 12px;
}

.branch-contact .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text-primary);
    background: var(--color-surface);
    text-decoration: none;
    transition: all 0.2s ease;
}

.branch-contact .btn i {
    font-size: 1rem;
    order: 1;
    /* Icon always appears after text */
}

.branch-contact .btn:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

/* Coming Soon Card */
.branch-card.coming-soon {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-style: dashed;
    background: rgba(0, 0, 0, 0.02);
}

.branch-card.coming-soon .branch-content {
    padding: 40px;
}

.branch-card.coming-soon h3 {
    color: var(--color-text-secondary);
    font-style: italic;
}

/* ---------------------------
   16. Utilities (CLS-safe)
--------------------------- */
.hidden-skeleton {
    visibility: hidden;
    position: absolute;
    pointer-events: none;
}

/* Hidden utility for honeypot/spam protection fields */
.d-none {
    display: none !important;
}