/* 
   App-Restaurant.css
   Core styles for the "App-Like" Restaurant Template
   FINAL RESTORATION (Includes Header, Stories, Cart, Grid)
*/

:root {
    /* --- Base Colors (Dark Default) --- */
    --app-bg: #0f172a;           
    --app-text: #f8fafc;         
    --app-text-muted: #94a3b8;   
    
    --app-card-bg: rgba(30, 41, 59, 0.7); 
    --app-card-border: rgba(255, 255, 255, 0.08);
    
    --app-primary: #f97316;      
    --app-primary-fade: rgba(249, 115, 22, 0.15);
    
    --app-nav-bg: rgba(15, 23, 42, 0.98); 
    --app-nav-border: rgba(255, 255, 255, 0.05);

    --app-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.15);
    --app-radius: 16px;
    
    --anim-fast: 0.2s;
    --anim-medium: 0.3s;
}

/* --- Light Mode Overrides --- */
[data-theme="light"] {
    --app-bg: #f8fafc;           
    --app-text: #1e293b;         
    --app-text-muted: #64748b;
    
    --app-card-bg: rgba(255, 255, 255, 0.9);
    --app-card-border: rgba(0, 0, 0, 0.05);
    
    --app-nav-bg: rgba(255, 255, 255, 0.98);
    --app-nav-border: rgba(0, 0, 0, 0.05);
    
    --app-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* --- Global Reset --- */
body {
    background-color: var(--app-bg);
    color: var(--app-text);
    font-family: 'Tajawal', sans-serif;
    margin: 0;
    padding: 0;
    padding-bottom: 90px !important; /* Reduced to match Floating Nav height without extra dead space */
    -webkit-tap-highlight-color: transparent;
}

/* --- [Restored] Header / Topbar --- */
/* --- [Restored] Header / Topbar --- */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: transparent; /* Seamless with hero */
    position: relative;
    z-index: 10;
}

/* No Light Mode Override needed for transparent relative header */

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--app-card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--app-primary);
    border: 1px solid var(--app-card-border);
    overflow: hidden; /* Ensures img fits */
}

.brand-title {
    font-weight: 800;
    font-size: 16px;
    line-height: 1.2;
    color: var(--app-text);
}

.brand-sub {
    font-size: 11px;
    color: var(--app-text-muted);
}

.topbar-actions {
    display: flex; /* Placeholder for future actions */
}

/* --- Stories Bar (Instagram-like) --- */
.stories-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 16px 16px 16px; /* Below header */
    scrollbar-width: none;
}
.stories-container::-webkit-scrollbar { display: none; }

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 72px;
    cursor: pointer;
}

.story-ring {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    padding: 2px;
    border: 2px solid var(--app-primary);
    background: transparent;
}

.story-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--app-bg);
}

.story-title {
    font-size: 11px;
    color: var(--app-text);
    text-align: center;
    max-width: 70px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Hero Section --- */
.hero {
    padding: 0 16px 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px 0;
    line-height: 1.2;
}
.hero-title span { color: var(--app-primary); }

.hero-sub {
    font-size: 14px;
    color: var(--app-text-muted);
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.hero-media {
    display: flex;
    justify-content: center;
    position: relative;
    /* margin-top: -10px; removed to prevent overlap issues */
}

.hero-img {
    width: 140px;      /* Fixed reasonable size */
    height: 140px;     /* Square */
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 4px solid var(--app-card-border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* --- Buttons --- */
.hero-actions {
    display: flex;
    gap: 12px;
}

.btn-primary {
    flex: 1;
    background: var(--app-primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--app-text);
    border: 1px solid var(--app-card-border);
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

/* --- Categories --- */
.filters {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 16px 16px 16px;
    scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.filter-btn {
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 99px;
    background: var(--app-card-bg);
    border: 1px solid var(--app-card-border);
    color: var(--app-text-muted);
    font-weight: 600;
    font-size: 13px;
}
.filter-btn.active {
    background: var(--app-primary);
    color: white;
    border-color: var(--app-primary);
}

/* --- Products Grid --- */
.products-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 16px;
}
/* List Card Style */
.menu-item-card {
    display: flex;
    background: var(--app-card-bg);
    border: 1px solid var(--app-card-border);
    border-radius: 16px;
    overflow: hidden;
    height: 110px;
    position: relative; /* [v3.3.21.386] Essential for absolute badges */
}
.menu-item-img {
    width: 110px;
    height: 110px;
    object-fit: cover;
}
.menu-item-info {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.menu-item-title {
    font-weight: 700;
    font-size: 15px;
    margin: 0;
    color: var(--app-text);
}
.menu-item-desc {
    font-size: 12px;
    color: var(--app-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}
.menu-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.menu-item-price {
    font-weight: 700;
    color: var(--app-primary);
}

/* --- Bottom Nav --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px; /* Slightly taller */
    background: var(--app-nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--app-nav-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--app-text-muted);
    font-size: 10px;
    text-decoration: none;
    gap: 4px;
}
.nav-item i { font-size: 20px; }
.nav-item.active { color: var(--app-primary); }

.nav-badge {
    position: absolute;
    top: -5px; right: -8px;
    background: #ef4444; color: white;
    font-size: 10px; width: 16px; height: 16px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
}

/* --- Premium Floating Cart --- */
#floatingCartContainer {
    position: fixed;
    bottom: 85px; /* Above Nav */
    left: 16px;
    right: 16px;
    z-index: 990;
    display: none !important; /* [User Request] Removed Floating Cart to avoid duplication with Bottom Nav */
    
    background: #0f172a; /* Solid Dark */
    color: white;
    padding: 14px 20px;
    border-radius: 16px;
    
    /* Flex Layout */
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#cartTotal {
    font-size: 16px;
    font-weight: 800;
    font-family: monospace;
    letter-spacing: 0.5px;
}

.cart-cta-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--app-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

#cartCountBadge {
    background: #ef4444;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- Section Headers --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    margin-bottom: 12px;
    margin-top: 16px;
}
.section-title { font-size: 18px; font-weight: 800; }
.section-sub { font-size: 12px; color: var(--app-text-muted); }

/* --- Footer --- */
.site-footer {
    padding: 40px 20px 100px 20px; /* Extra bottom pad */
    background: rgba(0,0,0,0.2);
    margin-top: 40px;
}
.footer-title { font-weight: 800; font-size: 18px; margin-bottom: 8px; }
.footer-desc { font-size: 13px; color: var(--app-text-muted); max-width: 300px; margin-bottom: 20px; }
.footer-list { list-style: none; padding: 0; margin: 0 0 20px 0; }
.footer-list li { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; color: var(--app-text-muted); }
.social-link { 
    display: inline-flex; width: 36px; height: 36px; border-radius: 50%; 
    background: var(--app-card-bg); color: var(--app-text); 
    align-items: center; justify-content: center; margin-left: 8px;
}

/* --- Modals (Basics) --- */
.modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 2000;
    display: none; align-items: flex-end; justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-backdrop.open { display: flex; }
.modal {
    background: var(--app-bg);
    width: 100%; max-height: 90vh;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    overflow-y: auto;
    position: relative;
    animation: slideUpModal 0.3s ease-out;
}
@keyframes slideUpModal {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-title { font-size: 18px; font-weight: 800; margin: 0; }
.modal-close { background: none; border: none; font-size: 24px; color: var(--app-text-muted); cursor: pointer; }

/* Success Modal Specifics (Copied from previous leak check to be safe) */
.success-modal-content { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 20px; }
.success-icon-wrapper { width: 80px; height: 80px; position: relative; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.success-icon-circle { position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 3px solid #22c55e; opacity: 0; transform: scale(0); }
.success-check { font-size: 32px; color: #22c55e; opacity: 0; transform: scale(0); }
.order-id-chip { background: var(--bg-soft); padding: 10px 20px; border-radius: 50px; display: inline-flex; align-items: center; gap: 10px; margin-bottom: 30px; border: 1px dashed rgba(255, 255, 255, 0.2); }
.success-btn { width: 100%; padding: 14px; border-radius: 16px; font-weight: 700; font-size: 16px; background: #2563eb; color: #ffffff; border: none; cursor: pointer; }
@keyframes circleDraw { 0% { transform: scale(0); opacity: 0; } 80% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes checkPop { 0% { transform: translate(-50%, -50%) scale(0); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* --- [Restored] Hero Status Pill --- */
.hero-tag {
    position: absolute;
    bottom: -10px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--app-card-border);
    padding: 6px 14px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--app-text);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 2;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

/* --- [Restored] Search Bar --- */
.search-container {
    padding: 0 16px 16px 16px;
}
#productSearch {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--app-card-border);
    background: var(--app-card-bg);
    color: var(--app-text);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
#productSearch:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 3px var(--app-primary-fade);
}
#productSearch::placeholder {
    color: var(--app-text-muted);
}

/* --- [Fix] Card Spacing & Typography --- */
.menu-item-info {
    padding: 10px 12px !important; /* Slightly tighter */
    gap: 4px;
}
.menu-item-title {
    font-size: 14px !important;
    line-height: 1.3;
    margin-bottom: 4px;
}
.menu-item-desc {
    font-size: 11px !important;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin-bottom: 8px; 
}
.menu-item-footer {
    margin-top: auto; /* Push to bottom */
}


/* --- [Restored] Modal Internals & Forms --- */

/* Modal Header & Close */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--app-nav-border);
    margin-bottom: 16px;
}
.modal-title { font-size: 18px; font-weight: 800; color: var(--app-text); }
.modal-close { 
    background: rgba(255,255,255,0.1); 
    border: none; 
    width: 32px; height: 32px; 
    border-radius: 50%;
    color: var(--app-text); 
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    cursor: pointer;
}

/* Product Modal Tweaks */
.modal-product-image {
    width: 100%; height: 200px;
    border-radius: 12px;
    background-size: cover; background-position: center;
    margin-bottom: 16px;
    display: none; /* JS toggles this */
    flex-shrink: 0; /* [v3.3.21.362] Fix Squashing */
}

/* Quantity Control (Pill Shape) */
.qty-controls {
    display: flex;
    align-items: center;
    background: var(--app-card-bg);
    border: 1px solid var(--app-card-border);
    border-radius: 12px;
    height: 44px;
    overflow: hidden;
    width: fit-content;
    margin: 16px 0;
}
.qty-btn {
    width: 44px; height: 44px;
    background: transparent;
    border: none;
    color: var(--app-text);
    font-size: 18px; font-weight: bold;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.qty-val {
    min-width: 40px;
    text-align: center;
    font-weight: 800;
    font-size: 16px;
}
input#qtyInput { /* Hide actual input if used, rely on span usually, but if input: */
    width: 50px; text-align: center; background:transparent; border:none; color:white; font-weight:bold; font-size:16px;
}

/* Add to Cart Button (Sticky Bottom Feel) */
.btn-add-cart {
    width: 100%;
    background: var(--app-primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 16px;
    margin-top: 16px;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* Form Inputs (Checkout) */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--app-text-muted); }
.form-input {
    width: 100%;
    padding: 14px;
    background: var(--app-card-bg);
    border: 1px solid var(--app-card-border);
    border-radius: 12px;
    color: var(--app-text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.form-input:focus { border-color: var(--app-primary); }

/* Option Chips (Radio) */
.chip-wrapper { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip-item { cursor: pointer; position: relative; }
.chip-item input { position: absolute; opacity: 0; }
.chip-content {
    background: var(--app-card-bg);
    border: 1px solid var(--app-card-border);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--app-text-muted);
    transition: all 0.2s;
}
.chip-item input:checked + .chip-content {
    background: var(--app-primary);
    color: white;
    border-color: var(--app-primary);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Checkbox Style List */
.extra-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--app-nav-border);
    cursor: pointer;
}
.custom-checkmark, .custom-radio {
    width: 20px; height: 20px;
    border: 2px solid var(--app-text-muted);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
}
.custom-radio { border-radius: 50%; }
input:checked + .custom-checkmark, input:checked + .custom-radio {
    background: var(--app-primary);
    border-color: var(--app-primary);
}
input:checked + .custom-checkmark i { color: white; font-size: 12px; }

/* Checkout Toggles (Delivery/Pickup) */
.order-type-toggle {
    display: flex; background: var(--app-card-bg); padding: 4px; border-radius: 12px; gap:4px;
}
.type-option {
    flex: 1; text-align: center; padding: 10px; border-radius: 8px; font-weight: 700; font-size: 13px;
    cursor: pointer; color: var(--app-text-muted);
}
.type-option input { display: none; }
.type-option.active { background: var(--app-primary); color: white; }

/* Cart Items in List */
.cart-item {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--app-card-border);
}

/* WhatsApp Button */
.btn-wa-send {
    width: 100%;
    background: #22c55e; /* WhatsApp Green */
    color: white;
    padding: 16px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 16px;
    border: none;
    margin-top: 16px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}


/* --- [Refinement] Modal Polish --- */
.modal-close {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: var(--app-text-muted) !important;
    width: 36px; height: 36px;
    transition: all 0.2s;
}
.modal-close:hover {
    color: var(--app-text);
    border-color: var(--app-text);
    background: rgba(255,255,255,0.05) !important;
}

.modal-textarea {
    background: var(--bg-soft) !important; /* Slightly lighter than card */
    border: 1px solid var(--app-card-border) !important;
    border-radius: 12px;
    padding: 12px;
    resize: none;
    font-size: 13px;
}
.modal-textarea:focus {
    border-color: var(--app-primary) !important;
    background: var(--app-card-bg) !important;
}

/* Adjust Title Size */
.modal-title {
    font-size: 17px !important; 
    line-height: 1.3;
}


/* --- [Final Clean] Semantic Modal Classes --- */
.header-spacer { width: 36px; }
.modal-desc {
    margin-bottom: 24px; font-size: 13px; color: var(--app-text-muted); 
    text-align: center; line-height: 1.5;
}
.modal-body { padding-top: 0; }
.notes-container { margin-top: 24px; }
.notes-header { margin-bottom: 8px; display:flex; justify-content:space-between; align-items:center; }
.form-label { margin: 0; font-size: 13px; font-weight: 700; color: var(--app-text-muted); }
.modal-spacer { height: 20px; }

.action-row {
    display: flex; justify-content: space-between; align-items: center; margin-top: 16px;
}
.qty-label { font-weight: 600; font-size: 14px; color: var(--app-text-muted); }

/* Quantity Val Update */
.qty-val {
    width: 40px; border: none; background: transparent; 
    color: var(--app-text); text-align: center; 
    font-weight: 800; font-size: 16px;
    appearance: textfield;
    -moz-appearance: textfield;
}
.qty-val::-webkit-outer-spin-button,
.qty-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.modal-footer { padding-top: 0; border: none; }
.btn-price {
    background: rgba(255,255,255,0.2); padding: 4px 12px; 
    border-radius: 8px; font-size: 15px; font-weight: 700;
}
.btn-text { font-size: 17px; font-weight: 800; }
#addToCartBtn {
    width: 100%; margin-top: 0; justify-content: space-between; padding: 16px 24px;
}


/* --- [Fix] Add Button Size --- */
.btn-text {
    font-size: 19px !important; /* Larger than price badge (15px) */
    font-weight: 800;
    letter-spacing: 0.5px;
}
.btn-price {
    font-size: 15px !important;
    font-weight: 700;
    background: rgba(0,0,0,0.15); /* Slightly darker for contrast */
}


/* --- [Fix] Slimmer Quantity Controls --- */
.action-row {
    margin-top: 12px !important; /* Move closer */
}

/* Override existing sizes */
.qty-controls {
    padding: 0 !important; /* Remove internal padding */
    height: 36px !important; /* Fixed height */
}
.qty-btn {
    width: 32px !important; height: 32px !important;
    font-size: 16px !important; line-height: 1;
}
.qty-val {
    font-size: 15px !important;
    width: 30px !important;
    height: 32px !important; line-height: 32px;
}


/* --- [Fix] Notes Toggle & Width --- */
.btn-toggle-note {
    background: transparent;
    border: 1px dashed var(--app-border);
    color: var(--app-primary);
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.btn-toggle-note:hover {
    background: rgba(249, 115, 22, 0.05);
    border-color: var(--app-primary);
}

.modal-textarea {
    width: 100% !important;
    box-sizing: border-box !important; /* Prevents overflow */
    max-width: 100% !important;
}


/* --- [Fix] Header & Stories Spacing --- */
.brand-logo {
    width: 64px !important; /* Was 48px */
    height: 64px !important;
    border-width: 2px !important;
}

/* Add breathing room below header */
.stories-container {
    margin-top: 16px !important; 
    padding-top: 8px !important;
}

/* Adjust topbar to accommodate larger logo if needed */
.topbar {
    padding-bottom: 8px !important;
}

/* --- Splash Screen --- */
.menu-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.menu-splash.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.splash-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.splash-logo-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 24px;
}
.splash-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.splash-name {
    color: white;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    opacity: 0;
    animation: slideUpFade 0.6s ease 0.2s forwards;
}
.splash-loader {
    width: 120px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    opacity: 0;
    animation: fadeIn 0.6s ease 0.4s forwards;
}
.splash-loader-bar {
    width: 100%;
    height: 100%;
    background: var(--app-primary, #2563eb);
    transform: translateX(-100%);
    animation: loadingBar 1.5s ease infinite;
}
@keyframes slideUpFade {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes loadingBar {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}


/* --- [Fix] Add Button Overlay (Restored & Positioned) --- */
.add-btn-overlay {
    position: absolute;
    bottom: 25px !important; /* Detached from bottom */
    left: 12px !important;   /* Detached from left */
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--app-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 5;
}

.add-btn-overlay:active {
    transform: scale(0.9);
    background: var(--app-primary);
    color: white;
}

body.dark-theme .add-btn-overlay {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--app-primary);
}

body.dark-theme .add-btn-overlay:active {
    background: var(--app-primary);
    color: white;
}

/* [v3.3.21.363] Premium Floating Bottom Navigation */
/* [v3.3.21.363] Premium Floating Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%; 
    transform: translateX(-50%); /* [Fix] Perfect Center */
    width: 94%; /* [Fix] Percentage width to ensure margin */
    max-width: 450px; /* [Fix] Cap width */
    box-sizing: border-box;
    
    /* Default (Light Mode) */
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    display: flex;
    justify-content: space-between; /* Change from around to between for better edge spacing */
    align-items: center;
    padding: 8px 12px; /* [Fix] More side padding */
    z-index: 9000;
    transition: all 0.3s ease;
}

/* Dark Theme Override */
[data-theme='dark'] .bottom-nav {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-item {
    background: transparent;
    border: none;
    padding: 6px 4px; /* [Fix] Minimal padding to prevent overflow */
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    color: var(--text-muted, #94a3b8);
    transition: all 0.2s;
    position: relative;
    overflow: visible; /* [Fix] Allow badge pulse to expand beyond borders */
    flex: 1; 
    min-width: 0; /* [Fix] Allow shrinking */
}

.nav-item .icon-frame {
    font-size: 20px;
    margin-bottom: 2px;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    position: relative; /* [Add] For Positioning Badge */
}

.nav-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: var(--app-primary); /* [v3.3.21.403] Now follows primary color */
    color: white;
    font-size: 10px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1.5px solid var(--app-nav-bg); /* Match Nav Background dynamically */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 10;
    animation: badge-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badge-pop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes badge-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--app-primary), transparent 30%); }
    50% { transform: scale(1.6); box-shadow: 0 0 0 10px color-mix(in srgb, var(--app-primary), transparent 100%); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--app-primary), transparent 100%); }
}

.nav-badge.pulse {
    animation: badge-pulse 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.nav-item span {
    font-size: 11px;
    font-weight: 500;
    transition: font-weight 0.2s;
}

/* Active State */
.nav-item.active {
    color: var(--app-primary);
    background: color-mix(in srgb, var(--app-primary), transparent 90%);
}

.nav-item.active .icon-frame {
    transform: translateY(-2px);
}

.nav-item.active span {
    font-weight: 700;
}

/* Glow Effect */
.nav-item.active::after {
    content: '';
    position: absolute;
    width: 40%;
    height: 40%;
    background: var(--app-primary);
    filter: blur(15px);
    opacity: 0.2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Mobile Adjustments */
/* Mobile Adjustments Removed - Universal Centered Layout applies everywhere */

/* =========================================
   SHOP SPECIFIC OVERRIDES (Grid, Blue Theme)
   ========================================= */
:root {
    --app-primary: #3b82f6; /* Shop Blue */
    --app-primary-fade: rgba(59, 130, 246, 0.15);
    /* --app-radius: 12px; */ /* Keep original radius for consistency or override if needed */
}

[data-theme='light'] {
    --app-bg: #f8fafc;
}

/* Shop Grid Layout */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px;
}
@media (min-width: 640px) { .shop-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .shop-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

/* Shop Card Style */
/* Shop Card Style - Premium Vertical/Organized */
.shop-card {
    background: var(--app-card-bg);
    border: 1px solid var(--app-card-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}
.shop-card:active { transform: scale(0.98); }
.shop-card:hover {
    border-color: var(--app-primary);
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.3);
}

.shop-card-image {
    width: 100%;
    aspect-ratio: 1/1; /* Square for uniform look */
    background-size: cover;
    background-position: center;
    background-color: white; /* Force white bg for transparent product pngs */
    position: relative;
    border-bottom: 1px solid var(--app-card-border);
}

.shop-card-details {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
    text-align: start; /* Align everything to start */
}

.shop-card-header {
    display: flex;
    flex-direction: column; /* Stack Title & Price */
    gap: 4px;
    margin-bottom: 2px;
}

.shop-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--app-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    margin: 0; /* Remove default browser margin */
}

.shop-card-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--app-primary); /* Distinct Primary Color */
    letter-spacing: 0.5px;
}



/* Add Button - Solid & Prominent */
.shop-add-btn {
    margin-top: auto; /* Push to bottom */
    width: 100%;
    background: var(--app-primary); 
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.shop-add-btn:active {
    transform: scale(0.97);
    opacity: 0.9;
}


