:root {
    /* Premium Color Palette - StoreClick Evolution */
    --bg: #030712;
    --bg-sec: #111827;
    --card: #1f2937;
    --surface: #374151;
    --text: #f9fafb;
    --text-sec: #9ca3af;
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #8b5cf6;
    --accent: #10b981;
    --border: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --danger: #ef4444;
    
    /* Gradientes */
    --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    
    /* Shadows */
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    --shadow-indigo: 0 10px 30px -10px rgba(99, 102, 241, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body { 
    font-family: 'DM Sans', sans-serif; 
    background: var(--bg); 
    color: var(--text); 
    overflow-x: hidden; 
    line-height: 1.6;
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.02em; }

/* Premium Buttons */
.btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 12px; 
    padding: 14px 28px; 
    border-radius: 14px; 
    font-weight: 700; 
    cursor: pointer; 
    border: 1px solid transparent; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.btn-primary { 
    background: var(--grad-primary); 
    color: white; 
    box-shadow: var(--shadow-indigo);
}

.btn-primary:hover { 
    transform: translateY(-3px) scale(1.02); 
    box-shadow: 0 20px 30px -10px rgba(99, 102, 241, 0.5); 
}

.btn-secondary { 
    background: rgba(255, 255, 255, 0.03); 
    color: var(--text); 
    border: 1px solid var(--border); 
    backdrop-filter: blur(10px);
}

.btn-secondary:hover { 
    background: rgba(255, 255, 255, 0.08); 
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost { 
    background: transparent; 
    color: var(--text-sec); 
}

.btn-ghost:hover { 
    background: rgba(255, 255, 255, 0.05); 
    color: var(--text); 
}

/* Premium Card & Inputs */
.card { 
    background: var(--bg-sec); 
    border: 1px solid var(--border); 
    border-radius: 24px; 
    padding: 30px; 
    box-shadow: var(--shadow-premium);
    transition: border-color 0.3s, transform 0.3s;
}

.card:hover { border-color: rgba(99, 102, 241, 0.2); }

.input { 
    width: 100%; 
    padding: 14px 20px; 
    border-radius: 14px; 
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid var(--border); 
    color: var(--text); 
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
}
.input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Fix for Select dropdown options visibility */
select.input {
    color-scheme: dark;
}
select.input option {
    background-color: #111827 !important;
    color: white !important;
}

/* Dark Modal Definition */
.dark-modal {
    background-color: #111827 !important;
    color: white !important;
}
.dark-modal h2, .dark-modal h3, .dark-modal label {
    color: white !important;
}
.badge { display: inline-block; }

/* Navegación SaaS */
.nav-saas { position: fixed; top: 0; width: 100%; z-index: 100; background: rgba(9, 9, 11, 0.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-saas-inner { max-width: 1200px; margin: 0 auto; padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; }

/* Landing Page */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 24px; background: radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.1) 0%, transparent 60%); }
.hero h1 { font-size: 4rem; font-weight: 700; margin-bottom: 16px; line-height: 1.1; }
.hero-accent { color: var(--accent); }

/* Dashboard Layout */
.sidebar { width: 260px; height: 100vh; position: fixed; background: var(--card); border-right: 1px solid var(--border); padding: 16px; display: flex; flex-direction: column; transition: transform 0.3s; }
.main-admin { margin-left: 260px; padding: 32px; min-height: 100vh; }
.nav-item { padding: 12px; border-radius: 6px; margin-bottom: 4px; cursor: pointer; display: flex; align-items: center; gap: 12px; color: var(--text-sec); }
.nav-item.active { background: var(--surface); color: var(--accent); }
.nav-item:hover { background: var(--surface); color: var(--text); }

/* Storefront */
.store-header { padding: 120px 24px 60px; text-align: center; background: linear-gradient(to bottom, var(--card), var(--bg)); }

/* === Modals & Drawers Redesign === */
/* Modal Responsivo Fix */
.modal { 
    position: fixed; 
    inset: 0; 
    background: rgba(0, 0, 0, 0.7); 
    backdrop-filter: blur(4px); 
    display: none; 
    align-items: center; 
    justify-content: center; 
    z-index: 1000; 
    padding: 16px; 
    transition: all 0.3s ease-out;
}

.modal.active { 
    display: flex; 
}

/* Modal Content (Centered) */
.modal-content { 
    background: white; 
    width: 100%; 
    max-width: 600px; 
    border-radius: 32px; 
    padding: 32px; 
    position: relative; 
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    animation: modal-slide-up 300ms ease-out forwards;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

@keyframes modal-slide-up {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .modal {
        align-items: flex-end;
        padding: 0;
    }
    .modal-content {
        width: 100%;
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        max-height: 90vh;
        padding: 24px;
        animation: modal-slide-up-mobile 300ms ease-out forwards;
    }
}

@keyframes modal-slide-up-mobile {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

/* Close Button Utility */
.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #64748b;
    background: transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    z-index: 50;
    cursor: pointer;
    flex-shrink: 0;
}
.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #0f172a;
    transform: scale(1.05);
}
.dark-modal .modal-close-btn {
    color: #e2e8f0;
}
.dark-modal .modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    height: -webkit-fill-available;
    background: white;
    box-shadow: -15px 0 60px rgba(0,0,0,0.15);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.drawer.active {
    transform: translateX(0);
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content.dark-modal {
    background: #0f172a;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
}

/* === Usage Progress Bar === */
.usage-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin: 12px 0;
}

.usage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 10px;
    transition: width 1s ease-out;
}

/* === Order Status Colors === */
.status-pill {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pending { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.status-completed { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.status-cancelled { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* Order Status Select Colors in Admin Panels */
.status-select-pending { 
    background-color: rgba(245, 158, 11, 0.15) !important; 
    color: #fbbf24 !important; 
    border-color: rgba(245, 158, 11, 0.3) !important; 
}
.status-select-attended { 
    background-color: rgba(59, 130, 246, 0.15) !important; 
    color: #60a5fa !important; 
    border-color: rgba(59, 130, 246, 0.3) !important; 
}
.status-select-delivered { 
    background-color: rgba(16, 185, 129, 0.15) !important; 
    color: #34d399 !important; 
    border-color: rgba(16, 185, 129, 0.3) !important; 
}

/* Skeleton Loader Animation */
.skeleton {
    background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

/* Specific Skeleton Shapes */
.skeleton-circle { border-radius: 50% !important; }
.skeleton-text { height: 12px; margin-bottom: 8px; width: 100%; }
.skeleton-img { width: 100%; height: 100%; border-radius: 20px !important; }

/* Spinner */
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); z-index: 200; width: 280px; }
    .sidebar.open { transform: translateX(0); }
    .main-admin { margin-left: 0; padding: 20px; padding-top: 80px; }
    .hero h1 { font-size: 2.5rem; }
    
    #grid-products {
        grid-template-columns: 1fr !important;
    }
    .product-card-admin {
        display: flex !important;
        align-items: center;
        gap: 12px;
        padding: 12px !important;
    }
    .product-card-admin img {
        width: 80px !important;
        height: 80px !important;
        border-radius: 8px;
    }
    .product-card-admin .card-body {
        padding: 0 !important;
        flex: 1;
    }
    .product-card-admin .btn-group {
        flex-direction: column;
        width: auto !important;
    }
    
    .admin-mobile-header { 
        display: flex; 
        align-items: center; 
        gap: 16px; 
        padding: 16px; 
        background: var(--card); 
        border-bottom: 1px solid var(--border); 
        position: fixed; 
        top: 0; 
        width: 100%; 
        z-index: 150; 
    }
    
    .menu-toggle {
        background: none;
        border: none;
        color: var(--text);
        cursor: pointer;
        padding: 4px;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .admin-header h2 { font-size: 1.5rem; }

    /* Mobile Specific Tweaks */
    .mobile-simulator { display: none !important; }
    
    /* Responsive Buttons - Added for small screens */
    .btn { 
        padding: 10px 18px !important; 
        font-size: 14px !important; 
        gap: 8px !important;
        border-radius: 12px !important;
    }
    
    /* Grid adjustments */
    .grid-admin { grid-template-columns: 1fr; }
    
    /* Hero text mobile size */
    h1 { font-size: 3.5rem !important; }
    
    /* Touch friendly footer / nav */
    .bottom-nav { 
        height: 75px; 
        padding-bottom: constant(safe-area-inset-bottom);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

.admin-mobile-header { display: none; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }

#sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 180;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}
#sidebar-overlay.active { display: block; opacity: 1; }

.admin-bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: var(--card);
    border-top: 1px solid var(--border);
    display: none;
    justify-content: space-around;
    padding: 10px 0 25px; /* Extra padding for iOS home indicator */
    z-index: 100;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-sec);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
}
.bottom-nav-item.active { color: var(--accent); }

@media (max-width: 768px) {
    .admin-bottom-nav { display: flex; }
}

.fade-in { animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* === Storefront Optimized === */
#view-store {
    background: #f1f5f9; /* Slate-100: Better contrast than gray-50 */
}

.store-nav {
    height: 80px;
}

.store-hero-bg {
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
                radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
}

.search-input-group {
    background: #f1f5f9;
    padding: 2px;
    border-radius: 100px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.search-input-group:focus-within {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-input-group input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

/* Product Cards & Images */
.product-image-container {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f8fafc;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image-container img {
    transform: scale(1.05);
}

.product-card-premium {
    background: white;
    border-radius: 48px;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f1f5f9;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 80px -12px rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.15);
}

.product-image-inner {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-image-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease-out;
    z-index: 1;
    pointer-events: none;
    border-radius: 32px;
}

.product-card-premium:hover .product-image-inner::before {
    opacity: 1;
}

.product-card-premium:hover .product-image-inner img {
    transform: scale(1.05);
}

.product-price-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: #6366f1;
    color: white;
    padding: 6px 14px;
    border-radius: 12px;
    font-weight: 900;
    font-size: 13px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease-out;
}

.product-card-premium:hover .product-price-badge {
    transform: scale(1.05);
}

.product-add-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    z-index: 5;
    pointer-events: none;
}

.product-card-premium:hover .product-add-overlay {
    opacity: 1;
    pointer-events: auto;
}

.product-add-btn {
    background: #6366f1;
    color: white;
    padding: 10px 20px;
    border-radius: 9999px;
    font-weight: 900;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-out;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);

}

.product-add-btn:hover {
    background: #4f46e5;
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6);
}

.product-add-btn:active {
    transform: scale(0.95);
}

.btn-add-cart-mini {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #0f172a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

/* Mobile product button always visible, desktop hover-only */
@media (max-width: 768px) {
    .product-add-overlay {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

.btn-add-cart-mini:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.qty-control {
    background: #f8fafc;
    border-radius: 12px;
    padding: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.cart-drawer-header {
    padding: 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.cart-drawer-body {
    flex: 1; /* Allow stretching to fill available drawer space */
    overflow-y: auto; /* Enable vertical scroll inside body */
    padding: 24px;
}

.cart-drawer-footer {
    padding: 24px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    flex-shrink: 0;
}

/* Storefront Specific Inputs Fix */
#view-store .input {
    color: #0f172a !important; /* Force dark text in storefront */
    background: #f1f5f9;
}

#view-store .input:focus {
    background: #ffffff;
    border-color: #6366f1;
}

/* Animations */
.stagger-in > * {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerIn 0.5s ease-out forwards;
}

@keyframes staggerIn {
    to { opacity: 1; transform: translateY(0); }
}

.stagger-in > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.15s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.2s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.25s; }
.stagger-in > *:nth-child(n+5) { animation-delay: 0.3s; }
/* Social Media Icons */
#store-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#store-social-links a:hover {
    color: #6366f1;
    background: #ffffff;
    border-color: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

/* === Category Filter Premium === */
.cat-btn {
    padding: 8px 20px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.cat-btn span:first-child {
    font-size: 1.2em;
    line-height: 1;
}

.cat-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    color: #1e293b;
}

.cat-btn.active {
    background: #6366f1;
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.cat-btn.active:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

#category-filter-bar {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

#category-filter-bar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.category-scroll-container {
    position: relative;
    margin: 0 -24px;
    padding: 0 24px;
}

.category-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
    z-index: 20;
    font-weight: bold;
    font-size: 16px;
}

.category-scroll-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.category-scroll-btn.active {
    display: flex;
}

.category-scroll-btn.left {
    left: 0;
}

.category-scroll-btn.right {
    right: 0;
}

.category-scroll-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 100%;
    background: linear-gradient(to left, white, transparent);
    pointer-events: none;
    z-index: 10;
}

.category-scroll-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 100%;
    background: linear-gradient(to right, white, transparent);
    pointer-events: none;
    z-index: 10;
    opacity: 0;
}

/* Spinner SM */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-sm {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* === Premium Toasts === */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2005;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 16px 24px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 20px 50px -12px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast.removing {
    animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translate(-50%, 0); }
    to { opacity: 0; transform: translate(-50%, -10px); }
}

/* === Realtime Mobile Preview Simulator === */
.mobile-simulator {
    width: 280px;
    height: 560px;
    background: #000;
    border-radius: 40px;
    padding: 10px;
    position: relative;
    box-shadow: 0 50px 100px -20px rgba(0,0,0,0.5), 
                0 0 0 4px #1f2937,
                0 0 0 10px #0f172a;
    margin: 0 auto;
    overflow: hidden;
}

.mobile-simulator::before { /* Notch */
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 25px;
    background: #000;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 100;
}

.simulator-screen {
    width: 100%;
    height: 100%;
    background: #f1f5f9;
    border-radius: 32px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
}

.simulator-screen::-webkit-scrollbar { display: none; }

.simulator-content {
    padding-top: 40px;
    padding-bottom: 20px;
    flex: 1;
}

/* Specific Preview Styles */
.preview-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    margin: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.preview-img {
    width: 100%;
    height: 150px;
    background: #e2e8f0;
    object-fit: cover;
}

.preview-body {
    padding: 15px;
}

.preview-name {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.preview-price {
    color: #6366f1;
    font-weight: 900;
    font-size: 18px;
}

.preview-desc {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 12px;
}

.simulator-footer {
    height: 60px;
    background: white;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding-bottom: 15px;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-slide-up { animation: slideUp 0.4s ease-out forwards; }

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.whatsapp-icon-container {
    width: 64px;
    height: 64px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
}

.whatsapp-float:hover .whatsapp-icon-container {
    transform: scale(1.1) rotate(12deg);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.6);
}

.whatsapp-badge {
    background: white;
    color: #030712;
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
}

.whatsapp-ping {
    position: absolute;
    inset: 0;
    background: #25D366;
    border-radius: 50%;
    z-index: 1;
    animation: whatsapp-ping 2s infinite linear;
    opacity: 0.6;
}

@keyframes whatsapp-ping {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.8); opacity: 0; }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 100px; /* Above the mobile nav */
        right: 20px;
    }
    .whatsapp-icon-container {
        width: 56px;
        height: 56px;
    }
}

/* =============================================
   Store Name – Mobile Overflow Fix
   ============================================= */

/* Hero title: reduce size on small screens and allow word-wrap */
#store-title-main {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

@media (max-width: 480px) {
    #store-title-main {
        font-size: 2rem !important;   /* ~32px, legible sin romper layout */
        line-height: 1.15;
        /* 2-line ellipsis as fallback for very long names */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    #store-title-main {
        font-size: 2.5rem !important;  /* ~40px */
        line-height: 1.15;
    }
}

/* Nav title: prevent long names from pushing nav icons off-screen */
#store-title-nav {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;  /* Desktop safe - hidden on sm anyway */
}

@media (min-width: 640px) and (max-width: 900px) {
    /* Visible only on sm+, but on tablets the name can still overflow */
    #store-title-nav {
        max-width: 180px;
    }
}

/* =============================================
   Testimonial Logo Styles
   ============================================= */

/* Contenedor cuadrado con borde sutil para logos transparentes o con fondo */
.testimonial-logo-wrap {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Imagen del logo: llena el contenedor sin distorsionarse */
.testimonial-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 4px;   /* Pequeño margen interno para logos con padding propio */
    display: block;
}

/* Fallback: inicial de color cuando la imagen no carga */
.testimonial-logo-fallback {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.25rem;
}

/* Responsive: el wrapper escala ligeramente en mobile para mejor visibilidad */
@media (max-width: 480px) {
    .testimonial-logo-wrap {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }
}
