/* 
  ✨ The Liquid Gold & Pearl Flow Menu
  Color Palette: Champagne Gold, Warm Cream, Liquid Pearl, Rich Bronze.
  STRICT RULE: Avoid dark obsidian themes. Maintain luxury warm creams & shiny gold accents.
*/

:root {
    --bg-cream: #fbf9f4; /* عاجي دافئ فاتح جداً */
    --liquid-white: rgba(255, 255, 255, 0.85); /* أبيض لؤلؤي للقطرات */
    --liquid-glass: rgba(255, 255, 255, 0.45);
    
    --gold-accent: #c5a059; /* ذهبي شامبيني فاخر */
    --gold-bright: #e5c158; /* ذهبي متوهج */
    --gold-glow: rgba(197, 160, 89, 0.25);
    --gold-border: rgba(197, 160, 89, 0.18);
    
    --text-bronze: #3e3427; /* برونزي داكن للنصوص الرئيسية */
    --text-sand: #8b7c6c; /* رملي للوصف */
    
    --shadow-premium: 0 10px 30px rgba(197, 160, 89, 0.08);
    --shadow-liquid: 0 15px 35px rgba(197, 160, 89, 0.18);
    
    --font-elegant: 'Cairo', sans-serif;
    --font-number: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-cream);
    color: var(--text-bronze);
    font-family: var(--font-elegant);
    direction: rtl;
    text-align: right;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* محاكاة شاشة الجوال الفاخرة للكمبيوتر */
@media (min-width: 481px) {
    html {
        background-color: #eae5db !important;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
    }
    body {
        width: 100%;
        max-width: 420px;
        height: 92vh;
        max-height: 850px;
        position: relative;
        box-shadow: 0 20px 60px rgba(62, 52, 39, 0.15) !important;
        border-radius: 35px;
        overflow: hidden;
        border: 5px solid var(--liquid-white);
    }
    .expanding-drop-overlay {
        max-width: 420px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    .cart-drawer-overlay {
        max-width: 420px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* --- Entry Splash Screen --- */
.app-splash-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #fcf9f4;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.app-splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
}
.splash-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.splash-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 2.5px solid var(--gold-accent);
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.25);
    object-fit: cover;
    animation: splashPulse 2s infinite ease-in-out;
    margin-bottom: 16px;
}
.splash-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-bronze);
    margin-bottom: 4px;
}
.splash-subtitle {
    font-size: 11px;
    color: var(--gold-accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: var(--font-number);
    margin-bottom: 24px;
}
.splash-loader {
    width: 40px;
    height: 3px;
    background: rgba(197, 160, 89, 0.15);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.splash-loader::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 50%;
    background: var(--gold-accent);
    animation: loaderMove 1.5s infinite ease-in-out;
}

@keyframes splashPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(197, 160, 89, 0.15)); }
    50% { transform: scale(1.06); filter: drop-shadow(0 0 20px rgba(197, 160, 89, 0.3)); }
}
@keyframes loaderMove {
    0% { left: -50%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

/* 
  =====================================
  Liquid Physics Background Blobs
  =====================================
*/
.liquid-bg-flow {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.7;
}
.liquid-blob {
    position: absolute;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.22) 0%, rgba(255, 255, 255, 0) 70%);
    filter: blur(10px);
    mix-blend-mode: multiply;
    animation: blobFloat 22s infinite alternate ease-in-out;
}
.blob-one {
    width: 320px; height: 320px;
    top: -50px; left: -80px;
    border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    animation-duration: 25s;
}
.blob-two {
    width: 280px; height: 280px;
    bottom: 10%; right: -60px;
    background: radial-gradient(circle, rgba(229, 193, 88, 0.18) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 70% 30% 52% 48% / 60% 40% 60% 40%;
    animation-duration: 20s;
    animation-delay: -2s;
}
.blob-three {
    width: 250px; height: 250px;
    top: 40%; left: -40px;
    background: radial-gradient(circle, rgba(243, 235, 216, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50% 50% 30% 70% / 50% 60% 40% 50%;
    animation-duration: 18s;
    animation-delay: -4s;
}

@keyframes blobFloat {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(30px, -40px) rotate(120deg) scale(1.1); }
    66% { transform: translate(-20px, 30px) rotate(240deg) scale(0.9); }
    100% { transform: translate(0, 0) rotate(360deg) scale(1); }
}

/* 
  =====================================
  Main Layout Wrapper
  =====================================
*/
.liquid-wrapper {
    position: relative;
    z-index: 2;
    padding: 20px 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.liquid-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--liquid-white);
    border: 1px solid var(--gold-border);
    border-radius: 20px;
    padding: 16px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    margin-bottom: 16px;
}
.logo-container {
    width: 54px; height: 54px;
    border-radius: 50%;
    padding: 2px;
    border: 1.5px solid var(--gold-accent);
    background: #fff;
    margin-bottom: 8px;
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.15);
}
.cafe-logo {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.aura-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--gold-accent);
    letter-spacing: 0.5px;
    font-family: var(--font-number);
}
.aura-subtitle {
    font-size: 11px;
    color: var(--text-sand);
    font-weight: 600;
    margin-bottom: 8px;
}
.header-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    font-size: 10.5px;
    color: var(--text-sand);
    border-top: 1px solid rgba(197, 160, 89, 0.1);
    padding-top: 8px;
    width: 100%;
}
.header-details span i {
    color: var(--gold-accent);
}
.wifi-box {
    color: var(--gold-accent);
    cursor: pointer;
    font-weight: 700;
}

/* 
  =====================================
  Category Liquid Tabs
  =====================================
*/
.liquid-tabs-wrap {
    overflow: hidden;
    margin-bottom: 16px;
}
.liquid-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
}
.liquid-tabs::-webkit-scrollbar { display: none; }

.liquid-tab {
    white-space: nowrap;
    background: var(--liquid-white);
    border: 1px solid var(--gold-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: var(--text-sand);
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.liquid-tab.active {
    background: var(--gold-accent);
    border-color: var(--gold-accent);
    color: #fff;
    box-shadow: 0 4px 15px var(--gold-glow);
    transform: translateY(-1px);
}

/* 
  =====================================
  Catalog & Liquid Cards
  =====================================
*/
.liquid-catalog {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    flex-grow: 1;
    transition: opacity 0.5s ease-in-out, filter 0.5s ease-in-out;
}

.liquid-card {
    background: var(--liquid-white);
    border: 1px solid var(--gold-border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 18px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-premium);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    
    /* Liquid Melt Animation */
    opacity: 0;
    filter: blur(12px) contrast(1.5);
    transform: translateY(20px) scale(0.9);
    animation: liquidMelt 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.liquid-card:nth-child(1) { animation-delay: 40ms; }
.liquid-card:nth-child(2) { animation-delay: 80ms; }
.liquid-card:nth-child(3) { animation-delay: 120ms; }
.liquid-card:nth-child(4) { animation-delay: 160ms; }
.liquid-card:nth-child(5) { animation-delay: 200ms; }
.liquid-card:nth-child(6) { animation-delay: 240ms; }
.liquid-card:nth-child(7) { animation-delay: 280ms; }
.liquid-card:nth-child(8) { animation-delay: 320ms; }

@keyframes liquidMelt {
    to {
        opacity: 1;
        filter: blur(0) contrast(1);
        transform: translateY(0) scale(1);
    }
}
.liquid-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--gold-accent);
    box-shadow: 0 10px 22px var(--gold-glow);
}

@keyframes organicMorph {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    50% { border-radius: 50% 50% 50% 50% / 40% 60% 40% 60%; }
    100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
}

.card-img-blob {
    width: 100%;
    aspect-ratio: 1.2;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    overflow: hidden;
    border: 1px solid var(--gold-border);
    background: var(--bg-cream);
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: organicMorph 7s ease-in-out infinite;
}
.liquid-card:nth-child(even) .card-img-blob {
    animation-delay: -3.5s;
}

.card-img-blob img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.card-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}
.card-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-bronze);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-price {
    font-family: var(--font-number);
    font-size: 12.5px;
    font-weight: 800;
    color: var(--gold-accent);
    margin-top: 2px;
}
.card-price span {
    font-size: 9px;
    font-family: var(--font-elegant);
}

/* 
  =====================================
  Drop Overlay & Popups (Slide Up Drop)
  =====================================
*/
.expanding-drop-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(62, 52, 39, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.expanding-drop-overlay.active {
    opacity: 1;
    display: flex;
}
.drop-content {
    background: #fdfcf9;
    border-top: 2px solid var(--gold-accent);
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    width: 100%;
    padding: 14px 18px 12px;
    display: flex;
    flex-direction: column;
    max-height: 68vh;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -8px 32px rgba(197, 160, 89, 0.15);
}
.expanding-drop-overlay.active .drop-content {
    transform: translateY(0);
}

.drop-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 16px;
    flex-shrink: 0;
}
.drop-accent-line {
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    width: 40px; height: 4px;
    background: rgba(197, 160, 89, 0.2);
    border-radius: 4px;
}
.close-drop {
    background: rgba(197, 160, 89, 0.08);
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    color: var(--text-bronze);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: auto;
}
html[dir="ltr"] .close-drop {
    margin-right: 0;
    margin-left: auto;
}

.drop-body {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}
.drop-img-wrap {
    width: 80px; height: 80px;
    margin: 0 auto 10px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    border: 2px solid var(--gold-accent);
    overflow: hidden;
    animation: organicMorph 8s ease-in-out infinite;
    box-shadow: var(--shadow-liquid);
}
.drop-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.drop-body h2 {
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-bronze);
    margin-bottom: 4px;
}
.drop-body .desc-text {
    text-align: center;
    font-size: 10.5px;
    color: var(--text-sand);
    line-height: 1.35;
    margin-bottom: 16px;
    padding: 0 10px;
}

/* Customizations */
.drop-options-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.option-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.group-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--gold-accent);
}
.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pill-group label {
    position: relative;
    cursor: pointer;
}
.pill-group label input {
    position: absolute;
    opacity: 0; width: 0; height: 0;
}
.pill-label {
    display: inline-block;
    padding: 5px 12px;
    background: #fbf9f4;
    border: 1px solid var(--gold-border);
    border-radius: 20px;
    font-size: 10.5px;
    color: var(--text-sand);
    transition: all 0.25s;
}
.pill-group input:checked + .pill-label {
    background: var(--gold-accent);
    border-color: var(--gold-accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 3px 8px var(--gold-glow);
}

.drop-footer {
    border-top: 1px solid rgba(197, 160, 89, 0.12);
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.drop-price {
    font-family: var(--font-number);
    font-size: 17px;
    font-weight: 800;
    color: var(--text-bronze);
    white-space: nowrap;
}
.drop-price .currency {
    font-size: 11px;
    font-family: var(--font-elegant);
    color: var(--gold-accent);
}
.gold-btn {
    flex: 1;
    background: linear-gradient(135deg, var(--gold-accent), #d4a847);
    border: none;
    color: #fff;
    padding: 13px 18px;
    border-radius: 50px;
    font-family: var(--font-elegant);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 6px 18px rgba(197, 160, 89, 0.42);
    transition: transform .2s, box-shadow .2s;
    animation: btnPulse 2.6s ease-in-out infinite;
}
@keyframes btnPulse {
    0%, 100% { box-shadow: 0 6px 16px rgba(197,160,89,.38); }
    50%       { box-shadow: 0 6px 26px rgba(197,160,89,.62); }
}
.gold-btn:active {
    transform: scale(0.96);
}
.gold-btn:disabled {
    background: #ccc;
    box-shadow: none;
    animation: none;
    cursor: not-allowed;
}

/* 
  =====================================
  Floating Basket Orb
  =====================================
*/
.aura-cart-btn {
    position: fixed;
    bottom: 24px; left: 24px;
    width: 50px; height: 50px;
    background: var(--gold-accent);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-liquid);
    z-index: 99;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}
.aura-cart-btn.active {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}
.cart-count {
    position: absolute;
    top: -3px; right: -3px;
    background: #fff;
    color: var(--gold-accent);
    border: 1px solid var(--gold-accent);
    width: 18px; height: 18px;
    border-radius: 50%;
    font-size: 9.5px;
    font-family: var(--font-number);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 
  =====================================
  Cart Drawer Panel
  =====================================
*/
.cart-content-panel {
    max-height: 92vh;
}
.cart-drawer-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--gold-accent);
}
.cart-items-flow {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cart-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fdfcf9;
    border: 1px solid var(--gold-border);
    border-radius: 14px;
    padding: 8px;
}
.cart-item-image {
    width: 42px; height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--gold-border);
}
.cart-item-info {
    flex-grow: 1;
}
.cart-item-name {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-bronze);
}
.cart-item-options-desc {
    font-size: 9px;
    color: var(--gold-accent);
    margin-top: 1px;
}
.cart-item-price-desc {
    font-family: var(--font-number);
    font-size: 11px;
    color: var(--text-sand);
    margin-top: 1px;
}
.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.qty-control {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--gold-border);
    border-radius: 12px;
    overflow: hidden;
}
.qty-btn {
    background: none;
    border: none;
    color: var(--gold-accent);
    width: 20px; height: 20px;
    cursor: pointer;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-val {
    font-family: var(--font-number);
    font-size: 10px;
    font-weight: 700;
    min-width: 14px;
    text-align: center;
}
.remove-btn {
    background: none;
    border: none;
    color: var(--error-color);
    cursor: pointer;
    font-size: 10px;
}

/* Order Form */
.cart-form {
    margin-top: 16px;
    border-top: 1px solid rgba(197, 160, 89, 0.1);
    padding-top: 12px;
}
.cart-form h3 {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--gold-accent);
    margin-bottom: 10px;
}
.form-row {
    margin-bottom: 8px;
}
.form-row label {
    display: block;
    font-size: 10px;
    color: var(--text-sand);
    margin-bottom: 2px;
}
.form-row label .required {
    color: var(--error-color);
}
.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    background: #fff;
    border: 1px solid var(--gold-border);
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--text-bronze);
    font-family: var(--font-elegant);
    font-size: 11px;
    outline: none;
}
.form-row select option {
    background: #fff;
    color: var(--text-bronze);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: var(--gold-accent);
}

.whatsapp-btn:disabled {
    background: rgba(197, 160, 89, 0.15) !important;
    color: rgba(62, 52, 39, 0.25) !important;
    cursor: not-allowed;
    box-shadow: none !important;
}

/* 
  =====================================
  Toast Notification
  =====================================
*/
.aura-toast {
    position: fixed;
    bottom: 30px; left: 50%;
    transform: translate(-50%, 50px);
    background: #fdfcf9;
    border: 1px solid var(--gold-accent);
    color: var(--text-bronze);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-liquid);
}
.aura-toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

/* responsive mobile tweaks and general scaling down */
@media (max-width: 480px) {
    .liquid-wrapper {
        padding: 12px 10px !important;
    }
    .liquid-header {
        padding: 12px !important;
        margin-bottom: 12px !important;
    }
    .aura-title {
        font-size: 17px !important;
    }
    .aura-subtitle {
        font-size: 10px !important;
    }
    .header-details {
        font-size: 9px !important;
        gap: 8px !important;
        padding-top: 6px !important;
    }
    
    .liquid-tab {
        padding: 6px 12px !important;
        font-size: 10px !important;
    }
    
    /* Smaller catalog grid and cards */
    .liquid-catalog {
        gap: 8px !important;
    }
    .liquid-card {
        padding: 8px !important;
        border-radius: 14px !important;
        gap: 6px !important;
    }
    .card-title {
        font-size: 10.5px !important;
    }
    .card-price {
        font-size: 11px !important;
    }
    .badge-tag {
        font-size: 7px !important;
        padding: 1px 4px !important;
    }
    
    /* Customizer Drop Overlay */
    .drop-content {
        padding: 10px 14px 10px;
        max-height: 65vh !important;
    }
    .drop-img-wrap {
        width: 58px; height: 58px;
        margin-bottom: 6px;
    }
    .drop-body h2 {
        font-size: 13px;
        margin-bottom: 3px;
    }
    .drop-body .desc-text {
        font-size: 9.5px;
        margin-bottom: 6px;
    }
    .drop-options-wrap { gap: 8px; }
    .option-group { margin-bottom: 0; }
    .group-label { font-size: 8.5px; margin-bottom: 3px; }
    .pill-label { padding: 4px 10px; font-size: 8.5px; }
    .drop-footer { padding-top: 8px; }
    .drop-price { font-size: 14px; }
    .gold-btn { padding: 11px 14px; font-size: 12px; }
}
