/* ============================================
   Brand Color Palette - La Grotta Restaurant
   Inspired by: Black & White logo with mountain motif
   Aesthetic: Refined Italian luxury, monochromatic elegance
   ============================================ */
:root {
    /* Primary Brand Colors - Deep black from logo */
    --brand-primary: #0A0A0A;
    --brand-primary-light: #1C1C1C;
    --brand-primary-dark: #000000;
    --brand-primary-darker: #000000;

    /* Secondary Brand Colors - Warm ivory/parchment */
    --brand-secondary: #F2EDE4;
    --brand-secondary-light: #FAF8F4;
    --brand-secondary-dark: #E0D9CE;

    /* Accent Colors - Warm antique gold (from parchment/coffee tones) */
    --brand-accent: #C9A96E;
    --brand-accent-light: #DEC08A;
    --brand-accent-dark: #A8884F;

    /* UI Colors */
    --brand-white: #FFFFFF;
    --brand-dark: #1A1A1A;
    --brand-cream-overlay: rgba(242, 237, 228, 0.08);

    /* NEW: Refined texture & shadow tokens */
    --shadow-soft: 0 4px 24px rgba(0,0,0,0.10);
    --shadow-medium: 0 8px 32px rgba(0,0,0,0.18);
    --shadow-strong: 0 12px 40px rgba(0,0,0,0.28);
    --gold-glow: 0 0 20px rgba(201,169,110,0.25);
    --border-gold: 1px solid rgba(201,169,110,0.35);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    -webkit-text-size-adjust: 100%;
    font-family: 'Cairo', 'Noto Sans Arabic', sans-serif !important;
    overflow-x: hidden;
    position: relative;

    /* Deep charcoal base with warm undertone - evokes Italian stone/cave ambiance */
    background-color: #0D0D0B;
    background-image:
        /* Subtle diagonal grain for tactile depth */
        repeating-linear-gradient(
            135deg,
            transparent,
            transparent 40px,
            rgba(201, 169, 110, 0.018) 40px,
            rgba(201, 169, 110, 0.018) 80px
        ),
        /* Vertical vignette */
        radial-gradient(ellipse at center top, #1a1a16 0%, #0A0A08 60%, #000000 100%);
    background-attachment: fixed;
}

/* Noise texture overlay for premium feel */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Fine stone/paper grain texture using SVG filter simulation */
    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

/* Container */
.menu-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    z-index: 2;
}

/* Header - White matching logo */
/* Header - Refined black with gold accent line */
.menu-header {
    background: #ffffff;
    color: var(--brand-secondary-light);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.7), 0 1px 0 rgba(201,169,110,0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;

    /* Gold bottom accent line replaces the old e8e8d0 border */
    border-bottom: 1.5px solid rgba(201, 169, 110, 0.5);
    backdrop-filter: blur(12px);
}

.back-btn,
.cart-btn {
    display: flex;
    align-items: center;
    color: var(--brand-secondary-light);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-radius: 12px;

    /* Subtle gold-tinted glass button */
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 169, 110, 0.25);
}

.back-btn:hover,
.cart-btn:hover {
    color: var(--brand-accent);
    background: rgba(201, 169, 110, 0.15);
    transform: translateY(-2px);
    box-shadow: var(--gold-glow);
    border-color: rgba(201, 169, 110, 0.6);
}

.back-btn i,
.cart-btn i {
    margin: 0 8px;
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.back-btn:hover i,
.cart-btn:hover i {
    transform: scale(1.1);
}

.logo-small {
    height: 55px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Soft gold ring on hover */
    border-radius: 8px;
    /* padding: 2px 6px; */
}

.logo-small a {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90%;
    width: 100%;
}

.logo-small img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    /* Ensure white logo bg blends on dark header */
    filter: drop-shadow(0 0 8px rgba(201,169,110,0.2));
}

.logo-small:hover {
    background: rgba(201, 169, 110, 0.1);
    transform: scale(1.08);
    border-color: rgba(201, 169, 110, 0.4);
    box-shadow: var(--gold-glow);
}
/* Main content area */
.menu-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    padding-bottom: 140px;
    position: relative;
}

/* Gold accent bar beneath header - signature brand stripe */
.brand-accent-bar {
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--brand-accent-dark) 20%,
        var(--brand-accent) 50%,
        var(--brand-accent-dark) 80%,
        transparent 100%
    );
    width: 100%;
    flex-shrink: 0;
}

/* Categories section */
.categories-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 25px;
    font-weight: 800;

    /* Gold gradient text for headline elegance */
    color: transparent;
    background: linear-gradient(135deg, #C9A96E 0%, #F0D898 50%, #C9A96E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    text-align: center;
    position: relative;
    letter-spacing: -0.02em;
}

/* Decorative underline beneath section title */
.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand-accent), transparent);
    margin: 10px auto 0;
    border-radius: 2px;
}


/* Categories grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.category-card {
    /* Dark card background - white food photos pop against it */
    background: #161614;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-medium), inset 0 1px 0 rgba(255,255,255,0.04);
    text-decoration: none;
    color: var(--brand-secondary-light);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(201, 169, 110, 0.2);
    background-clip: padding-box;
}

/* Gold gradient border on hover */
.category-card::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, var(--brand-accent-dark), var(--brand-accent), var(--brand-accent-dark));
    border-radius: 17px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-strong), var(--gold-glow);
}

.category-image {
    width: 100%;
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Warm gold wash on hover - works beautifully with white-bg food photos */
    background: linear-gradient(180deg,
        rgba(0,0,0,0.0) 0%,
        rgba(201,169,110,0.15) 70%,
        rgba(0,0,0,0.4) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-card:hover .category-overlay {
    opacity: 1;
}

.category-name {
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-weight: 500;

    /* Dark label — crisp contrast against dark card body */
    background: linear-gradient(180deg, #323231 0%, #222221 100%);
    color: var(--brand-secondary);
    font-size: 16px;
    padding: 10px 5px;
    border-radius: 0 0 14px 14px;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;

    /* Thin gold top border for separation */
    border-top: 1px solid rgba(201, 169, 110, 0.2);
}

.category-card:hover .category-name {
    /* Gold-tinted dark label on hover */
    background: linear-gradient(180deg, #1a1914 0%, #141410 100%);
    color: var(--brand-accent-light);
    transform: translateY(-3px);
    font-size: 16px;
    padding: 14px 8px;
    font-weight: 800;
    border-top-color: rgba(201, 169, 110, 0.5);
}

/* Slider enhancements */
/* Slider - framed like a gallery piece */
.slider-container {
    margin-bottom: 30px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-strong);

    /* Gold double-border frame effect */
    border: 2px solid rgba(201, 169, 110, 0.5);
    outline: 1px solid rgba(201, 169, 110, 0.15);
    outline-offset: 4px;
}

.slider-arrow {
    background: rgba(10, 10, 8, 0.85);
    color: var(--brand-accent);
    border: 1px solid rgba(201, 169, 110, 0.4);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(8px);
}

.slider-arrow:hover {
    background: var(--brand-accent);
    color: var(--brand-primary);
    transform: scale(1.1);
    box-shadow: var(--gold-glow);
    border-color: var(--brand-accent-light);
}

.slider-dot {
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(201, 169, 110, 0.4);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.slider-dot.active,
.slider-dot:hover {
    background: var(--brand-accent);
    border-color: var(--brand-accent-light);
    transform: scale(1.2);
    box-shadow: var(--gold-glow);
}

/* Responsive styles */
@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .category-name {
        padding: 5px 5px;
    }

    .back-btn span,
    .cart-btn span {
        display: none;
    }

    .back-btn i,
    .cart-btn i {
        font-size: 0.9rem;
        margin: 0;
    }

    .menu-content {
        padding-top: 5px;
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 120px;
    }

    .section-title {
        color: #000000;
        font-size: 1.6rem;
    }

    .menu-header {
        padding: 12px 15px;
    }

    .logo-small {
        height: 40px;
    }

    /* Improved mobile scrolling */
    body {
        height: 100%;
        overflow: hidden;
        position: fixed;
        width: 100%;
    }

    .menu-container {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 7px;
    }

    .category-name {
        padding: 4px 5px;
    }

    .menu-content {
        padding-top: 5px;
        padding-left: 15px;
        padding-right: 15px;
        padding-bottom: 120px;
    }

    .logo-small {
        height: 40px;
    }

    .menu-header {
        padding: 5px 12px;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 7px;
    }

    .category-card:hover .category-name {
        font-size: 14px;
        padding: 10px 6px;
    }

    .back-btn,
    .cart-btn {
        padding: 8px 12px;
    }
}

/* Enhanced animations for better user experience */
@media (prefers-reduced-motion: no-preference) {
    .category-card {
        animation: fadeInUp 0.6s ease-out;
    }

    .category-card:nth-child(even) {
        animation-delay: 0.1s;
    }

    .category-card:nth-child(3n) {
        animation-delay: 0.2s;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}