/**
 * ROUGE VINTAGE-INDUSTRIAL URBAN LOUNGE — DIGITAL MENU THEME (REDESIGNED)
 * Main Color: #770b24 (Velvet Rouge / Royal Wine Crimson)
 * Accents: Antique Gold (#D4AF37), Charcoal Slate (#141113), Parchment Ivory (#FAF7F2)
 * Fully Responsive & Mobile-First Engineered
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;0,900;1,400;1,600;1,700&family=Cinzel:wght@600;700;800;900&family=Great+Vibes&display=swap');

@font-face {
    font-family: 'Vazirmatn';
    src: url('../../fonts/Vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../../fonts/Vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../../fonts/Vazirmatn/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../../fonts/Vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Iranian-Sans';
    src: url('../../fonts/Iranian-Sans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* -------------------------------------------------------------
       MAIN MANDATORY COLOR: #770b24 (Velvet Rouge / Royal Crimson)
       ------------------------------------------------------------- */
    --rg-primary: #770b24;            /* THE CORE MANDATORY COLOR */
    --rg-primary-dark: #520719;       /* Deep vintage wine shadow */
    --rg-primary-deep: #35030e;       /* Velvet black-crimson */
    --rg-primary-midnight: #1d0107;   /* Midnight backdrop shade */
    --rg-primary-light: #9c1333;      /* Roseate ruby hover */
    --rg-primary-bright: #c41c45;     /* Glowing active crimson */
    --rg-primary-soft: #e33b63;       /* Delicate highlight */

    /* Glows & Drop Shadows in Velvet Rouge */
    --rg-primary-glow: rgba(119, 11, 36, 0.48);
    --rg-primary-glow-soft: rgba(119, 11, 36, 0.24);
    --rg-primary-glow-lg: 0 0 35px rgba(119, 11, 36, 0.6);
    --rg-primary-border: rgba(119, 11, 36, 0.45);
    --rg-primary-border-bright: rgba(196, 28, 69, 0.7);

    /* Luxury Antique Gold (from Elephant Seal & Angel Calligraphy) */
    --rg-gold: #D4AF37;               /* Regal gold ring */
    --rg-gold-warm: #E5B842;          /* Lit candle gold */
    --rg-gold-light: #F7E2A3;         /* Gold leaf reflection */
    --rg-gold-dark: #91721D;          /* Antique brass patina */
    --rg-gold-glow: rgba(212, 175, 55, 0.38);
    --rg-gold-border: rgba(212, 175, 55, 0.32);

    /* Matte Charcoal, Espresso Wood & Slate Backgrounds */
    --rg-bg-primary: #110d10;         /* Deep moody canvas with faint rouge warmth */
    --rg-bg-canvas: #151114;          /* Secondary canvas */
    --rg-bg-card: #1c161a;            /* Elevated card surface */
    --rg-bg-card-hover: #261c22;      /* Hover card state with rouge tint */
    --rg-bg-elevated: #2d2128;        /* Dialogs / dropdowns */
    --rg-bg-overlay: rgba(17, 13, 16, 0.94);

    /* Parchment Ivory & High-Contrast Typography */
    --rg-parchment: #FAF7F2;          /* Clear high-contrast text */
    --rg-parchment-soft: #EFE8DE;     /* Secondary subtitles */
    --rg-parchment-muted: #C7BDAD;    /* Descriptions */
    --rg-parchment-dim: #948773;      /* Meta labels & hints */

    /* Botanical Natural Touches */
    --rg-botanical: #446849;
    --rg-botanical-light: #67946D;

    /* Semantic Status */
    --rg-success: #368B52;
    --rg-danger: #D92B3D;
    --rg-warning: #E5A93C;

    /* Typography */
    --rg-font-display: 'Playfair Display', 'Cinzel', Georgia, serif;
    --rg-font-script: 'Great Vibes', 'Playfair Display', cursive, serif;
    --rg-font-sans: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Layout & Responsive Heights */
    --rg-header-h: 70px;
    --rg-dock-h: calc(64px + env(safe-area-inset-bottom, 0px));
    --rg-radius-sm: 8px;
    --rg-radius-md: 14px;
    --rg-radius-lg: 20px;
    --rg-radius-pill: 9999px;

    /* Shadows & Transitions */
    --rg-shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.45);
    --rg-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
    --rg-shadow-lg: 0 16px 45px rgba(0, 0, 0, 0.75);
    --rg-shadow-card: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.05);
    --rg-shadow-rouge: 0 12px 36px rgba(119, 11, 36, 0.4);
    --rg-trans-fast: 0.18s cubic-bezier(0.2, 0, 0, 1);
    --rg-trans-smooth: 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 860px) {
    :root {
        --rg-header-h: 78px;
    }
}

/* Base Reset & Mobile Enhancements */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.rg-body {
    margin: 0;
    padding: 0;
    background-color: var(--rg-bg-primary);
    color: var(--rg-parchment);
    font-family: var(--rg-font-sans);
    line-height: 1.7;
    direction: rtl;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    background-image: 
        radial-gradient(ellipse at 50% 0%, rgba(119, 11, 36, 0.22) 0%, transparent 65%),
        radial-gradient(circle at 10% 40%, rgba(212, 175, 55, 0.07) 0%, transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(119, 11, 36, 0.16) 0%, transparent 55%);
    background-attachment: fixed;
    padding-bottom: var(--rg-dock-h);
}

@media (min-width: 840px) {
    body.rg-body {
        padding-bottom: 0;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0f0b0d;
}
::-webkit-scrollbar-thumb {
    background: var(--rg-primary);
    border-radius: 4px;
    border: 1px solid var(--rg-gold-border);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--rg-primary-light);
}

::selection {
    background: var(--rg-primary);
    color: #FFFFFF;
}

/* Responsive Container */
.rg-container {
    width: 100%;
    max-width: 1240px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 20px;
    padding-left: 20px;
}

@media (max-width: 640px) {
    .rg-container {
        padding-right: 14px;
        padding-left: 14px;
    }
}

@media (max-width: 360px) {
    .rg-container {
        padding-right: 10px;
        padding-left: 10px;
    }
}

/* Ambient Backlight Cove Glow Orbs */
.rg-cove-glow {
    position: absolute;
    width: clamp(280px, 45vw, 520px);
    height: clamp(280px, 45vw, 520px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(119, 11, 36, 0.32) 0%, rgba(212, 175, 55, 0.08) 50%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
}

/* Kicker Header */
.rg-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--rg-font-display);
    font-size: clamp(0.7rem, 2.2vw, 0.82rem);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--rg-gold);
    margin-bottom: 8px;
    text-shadow: 0 0 12px var(--rg-gold-glow);
}

.rg-kicker::before,
.rg-kicker::after {
    content: "✦";
    font-size: 0.8rem;
    color: var(--rg-primary-light);
}

/* Touch-Friendly Responsive Buttons */
.rg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 24px;
    min-height: 46px;
    border-radius: var(--rg-radius-md);
    font-family: var(--rg-font-sans);
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    transition: all var(--rg-trans-smooth);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

@media (max-width: 480px) {
    .rg-btn {
        padding: 12px 18px;
        font-size: 0.9rem;
    }
}

.rg-btn--primary {
    background: linear-gradient(135deg, #9c1333 0%, #770b24 50%, #520719 100%);
    color: #FFFFFF;
    border-color: rgba(247, 226, 163, 0.4);
    box-shadow: 0 6px 22px rgba(119, 11, 36, 0.45), 0 0 14px rgba(119, 11, 36, 0.3);
    font-weight: 700;
}

.rg-btn--primary:hover,
.rg-btn--primary:active {
    background: linear-gradient(135deg, #b81a40 0%, #8c0e2c 50%, #63091f 100%);
    color: #FFFFFF;
    box-shadow: 0 8px 30px rgba(119, 11, 36, 0.65), 0 0 20px rgba(212, 175, 55, 0.35);
    border-color: var(--rg-gold);
}

.rg-btn--outline {
    background: rgba(28, 22, 26, 0.7);
    color: var(--rg-parchment);
    border-color: var(--rg-primary-border);
    backdrop-filter: blur(10px);
}

.rg-btn--outline:hover,
.rg-btn--outline:active {
    background: rgba(119, 11, 36, 0.25);
    border-color: var(--rg-primary-bright);
    color: #FFFFFF;
    box-shadow: 0 0 22px var(--rg-primary-glow);
}

/* Badges */
.rg-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: var(--rg-radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.rg-badge--signature {
    background: linear-gradient(135deg, rgba(119, 11, 36, 0.85) 0%, rgba(82, 7, 25, 0.95) 100%);
    color: #FFECA8;
    border-color: var(--rg-gold);
    box-shadow: 0 0 14px var(--rg-gold-glow);
}

.rg-badge--discount {
    background: rgba(217, 43, 61, 0.3);
    color: #FFB3BA;
    border-color: rgba(217, 43, 61, 0.6);
}

.rg-badge--soldout {
    background: rgba(45, 38, 43, 0.9);
    color: var(--rg-parchment-dim);
    border-color: rgba(90, 80, 87, 0.5);
}

/* Inputs & Form Fields (16px floor on mobile to prevent iOS Safari auto-zoom) */
.rg-input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(22, 17, 20, 0.94);
    border: 1px solid var(--rg-primary-border);
    border-radius: var(--rg-radius-md);
    color: var(--rg-parchment);
    font-family: var(--rg-font-sans);
    font-size: 16px; /* Prevents iOS auto-zoom */
    outline: none;
    transition: all var(--rg-trans-smooth);
    min-height: 48px;
}

.rg-input:focus {
    border-color: var(--rg-primary-bright);
    box-shadow: 0 0 20px var(--rg-primary-glow);
    background: rgba(28, 22, 26, 0.98);
}

.rg-input::placeholder {
    color: var(--rg-parchment-dim);
    opacity: 0.8;
}

/* Ceremonial Page Loader with Sculpted Seal */
.rg-loader {
    position: fixed;
    inset: 0;
    background: #0f0c0e;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.rg-loader.is-hidden,
.rg-loader.is-loaded,
.rg-loader.is-done {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.rg-loader__crest {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--rg-gold);
    animation: rgPulse 2.2s infinite ease-in-out;
    box-shadow: 0 0 35px var(--rg-primary-glow), 0 0 20px var(--rg-gold-glow);
}

@keyframes rgPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 30px var(--rg-primary-glow), 0 0 18px var(--rg-gold-glow);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 0 50px rgba(196, 28, 69, 0.7), 0 0 30px rgba(212, 175, 55, 0.6);
    }
}

.rg-loader__title {
    font-family: var(--rg-font-display);
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--rg-parchment);
    margin: 0;
}

.rg-loader__subtitle {
    font-size: 0.88rem;
    color: var(--rg-gold);
    margin: 0;
}
