/* ==========================================================================
   BioStore.AI - Custom Premium Stylesheet
   ========================================================================== */

/* --- Design Tokens & CSS Variables --- */
:root {
    /* Fonts */
    --font-dashboard: 'Plus Jakarta Sans', sans-serif;
    
    /* Light Theme (Default Dashboard) */
    --bg-app: #f4f6fa;
    --bg-panel: rgba(255, 255, 255, 0.85);
    --bg-card: #ffffff;
    --border-color: rgba(226, 232, 240, 0.8);
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --primary: #FF6D00; /* Nextools Orange */
    --primary-hover: #E65100;
    --primary-light: rgba(255, 109, 0, 0.1);
    --accent-purple: #304FFE; /* Nextools Deep Blue */
    --accent-pink: #ec4899;
    --accent-green: #00BFAE; /* Nextools Teal */
    
    --shadow-sm: 0 2px 4px rgba(148, 163, 184, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(148, 163, 184, 0.1), 0 4px 6px -2px rgba(148, 163, 184, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(148, 163, 184, 0.15), 0 10px 10px -5px rgba(148, 163, 184, 0.04);
    
    --glass-blur: 16px;
    --glass-border: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] {
    /* Dark Theme Dashboard */
    --bg-app: #090d16;
    --bg-panel: rgba(17, 24, 39, 0.7);
    --bg-card: #151c2c;
    --border-color: rgba(51, 65, 85, 0.5);
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    
    --primary: #FF6D00; /* Nextools Orange */
    --primary-hover: #FF8F00;
    --primary-light: rgba(255, 109, 0, 0.15);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    --glass-border: rgba(255, 255, 255, 0.05);
}

/* --- Global Reset & Scrollbars --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-dashboard);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

/* Custom Scrollbar - Dashboard styling */
.scrollbar-styled::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.scrollbar-styled::-webkit-scrollbar-track {
    background: transparent;
}
.scrollbar-styled::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--primary) 15%, var(--text-light) 22%);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.scrollbar-styled::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Storefront Viewport Scrollbar (Matches store theme text color) */
.phone-screen::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.phone-screen::-webkit-scrollbar-track {
    background: transparent;
}
.phone-screen::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--store-text, #333333) 16%, transparent);
    border-radius: 10px;
    transition: background-color 0.2s ease;
}
.phone-screen::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--store-text, #333333) 28%, transparent);
}

/* --- App Container & Layout --- */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-panel);
    backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
    height: 70px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--accent-purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}
.logo-text h1 span {
    color: var(--primary);
}
.logo-text .tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: -2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Template Selectors */
.template-selector-bar {
    display: flex;
    align-items: center;
    background: var(--bg-app);
    padding: 0.25rem;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}
.template-selector-bar .label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0 0.75rem;
}
.template-btn {
    background: transparent;
    border: none;
    outline: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.25s ease;
}
.template-btn i {
    width: 14px;
    height: 14px;
}
.template-btn.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* --- Main Workspace --- */
.app-workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100vh - 70px);
}

/* Left Panel: Creator Dashboard */
.creator-panel {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 60%;
    min-width: 500px;
}

/* Right Panel: Simulator */
.simulator-panel {
    width: 40%;
    min-width: 400px;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent 60%),
                radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.05), transparent 60%);
    border-left: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
}

.simulator-sticky-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.simulator-header-info {
    text-align: center;
}
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.35rem 0.75rem;
    border-radius: 30px;
    letter-spacing: 1px;
}
.ping-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--accent-green);
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.simulator-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* --- Card Styles --- */
.creator-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.icon-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.icon-title i {
    width: 20px;
    height: 20px;
}
.icon-title h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.card-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.45;
}

/* AI Prompter Card Specifics */
.ai-prompter-card {
    border: 1px dashed var(--accent-purple);
    background: linear-gradient(180deg, var(--bg-card), rgba(168, 85, 247, 0.02));
}
.prompt-input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.prompt-input-wrapper textarea {
    width: 100%;
    height: 110px;
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    resize: none;
    outline: none;
    line-height: 1.5;
}
.prompt-input-wrapper textarea:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.1);
}
.ai-generate-btn {
    background: linear-gradient(135deg, var(--accent-purple), var(--primary));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.ai-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}
.ai-generate-btn:active {
    transform: translateY(0);
}

/* AI Loading Overlay */
.ai-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(4px);
    z-index: 5;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: white;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.ai-loading-overlay.hide {
    opacity: 0;
    pointer-events: none;
}
.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.loading-status {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* --- Editor Accordions --- */
.editor-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.editor-accordion {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.accordion-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    outline: none;
    color: var(--text-primary);
}
.trigger-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 0.9rem;
}
.trigger-label i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}
.chevron-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}
.editor-accordion.active .chevron-icon {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 1.25rem 1.25rem 1.25rem;
    display: none;
}
.editor-accordion.active .accordion-content {
    display: block;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}
.col-12 { grid-column: span 12; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.form-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    outline: none;
}
.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}
.form-group input[type="color"] {
    width: 100%;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    padding: 2px;
}
.help-text {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 2px;
}

/* Theme Presets Styling */
.theme-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 0.25rem;
}
.preset-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    text-align: left;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
}
.preset-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 5px rgba(99, 102, 241, 0.15);
    background: var(--primary-light);
}
.color-preview {
    width: 24px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

/* Dynamic Editor Product list */
.editor-product-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.editor-product-card {
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}
.editor-product-card .remove-prod-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}
.editor-product-card .remove-prod-btn:hover {
    color: var(--accent-pink);
}

/* Buttons */
.icon-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
}
.icon-btn i {
    width: 16px;
    height: 16px;
}
.icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}
.primary-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.3);
}
.secondary-btn {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.secondary-btn:hover {
    background: var(--bg-app);
    border-color: var(--text-light);
}
.w-full { width: 100%; }

/* Header Template Selector Dropdown */
.header-template-select {
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.header-template-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 5px rgba(99, 102, 241, 0.2);
}


/* --- Smartphone Mockup Bezel --- */
.phone-mockup {
    position: relative;
    width: 320px;
    height: 650px;
    background: #000000;
    border: 12px solid #222222;
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 2px #333333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
}

/* Camera dynamic island */
.phone-camera-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 25px;
    background: #000000;
    border-radius: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}
.camera-lens {
    width: 8px;
    height: 8px;
    background: #111111;
    border-radius: 50%;
    box-shadow: inset 0 0 2px rgba(255, 255, 255, 0.4);
}
.notch-sensor {
    width: 12px;
    height: 4px;
    background: #0d0d0d;
    border-radius: 4px;
}

/* Status Bar */
.phone-status-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 38px;
    padding: 0 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    z-index: 90;
    padding-bottom: 4px;
}
.status-bar-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}
.bar-icon {
    width: 12px;
    height: 12px;
}
.battery-icon {
    width: 18px;
    height: 9px;
    border: 1px solid #ffffff;
    border-radius: 2px;
    padding: 1px;
    position: relative;
}
.battery-fill {
    display: block;
    width: 80%;
    height: 100%;
    background: #ffffff;
    border-radius: 1px;
}
.battery-icon::after {
    content: '';
    position: absolute;
    top: 2px;
    right: -3px;
    width: 2px;
    height: 3px;
    background: #ffffff;
    border-radius: 0 1px 1px 0;
}

/* Home Bar Indicator */
.phone-home-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    z-index: 100;
}

/* Phone Bezel Buttons */
.phone-volume-buttons {
    position: absolute;
    left: -14px;
    top: 120px;
    width: 3px;
    height: 50px;
    background: #333333;
    border-radius: 2px 0 0 2px;
    box-shadow: -1px 0 2px rgba(0, 0, 0, 0.5);
}
.phone-volume-buttons::after {
    content: '';
    position: absolute;
    left: 0;
    top: 60px;
    width: 3px;
    height: 50px;
    background: #333333;
    border-radius: 2px 0 0 2px;
}
.phone-power-button {
    position: absolute;
    right: -14px;
    top: 160px;
    width: 3px;
    height: 75px;
    background: #333333;
    border-radius: 0 2px 2px 0;
    box-shadow: 1px 0 2px rgba(0, 0, 0, 0.5);
}

/* Phone Screen Viewport */
.phone-screen {
    width: 100%;
    height: 100%;
    background: #ffffff;
    overflow-y: auto;
    position: relative;
    padding-top: 38px; /* Offset status bar */
    padding-bottom: 40px; /* Offset home indicator */
}

/* Sticky Cart Bottom Bar inside Simulator */
.phone-cart-bar {
    position: absolute;
    bottom: 20px;
    left: 10px;
    right: 10px;
    height: 58px;
    background: rgba(15, 22, 40, 0.85); /* Deep slate-blue glass */
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 18px;
    z-index: 95;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.1rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    border: 1px solid color-mix(in srgb, var(--store-accent, var(--primary)) 20%, rgba(255, 255, 255, 0.08));
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, border-color 0.3s ease;
}
.phone-cart-bar.hide {
    transform: translateY(90px);
    opacity: 0;
    pointer-events: none;
}
.cart-summary {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: white;
}
.cart-icon-badge {
    position: relative;
}
.cart-icon-badge i {
    width: 22px;
    height: 22px;
    color: rgba(255, 255, 255, 0.95);
}
@keyframes cart-badge-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); box-shadow: 0 0 8px var(--accent-pink); }
    100% { transform: scale(1); }
}
.cart-badge-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--accent-pink);
    color: white;
    font-size: 0.62rem;
    font-weight: 800;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(236, 72, 153, 0.4);
    animation: cart-badge-pulse 1.5s infinite ease-in-out;
}
.cart-total-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.total-label {
    font-size: 0.58rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.total-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
}
.cart-checkout-btn {
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.55rem 1rem;
    font-size: 0.78rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 191, 174, 0.25);
    transition: all 0.2s ease;
}
.cart-checkout-btn i {
    width: 14px;
    height: 14px;
}
.cart-checkout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 191, 174, 0.45);
    filter: brightness(1.05);
}
.cart-checkout-btn:active {
    transform: translateY(1px);
}

/* --- Render Store Theme CSS Presets --- */
.bio-store-render {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 1.75rem 1.25rem;
    text-align: center;
    background-color: var(--store-bg, #fff);
    /* Soft vertical overlay to enrich color depth */
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%);
    color: var(--store-text, #333);
    position: relative;
    overflow-x: hidden;
}

/* Elegant floating backdrop glow blobs that automatically inherit accent colors */
.bio-store-render::before,
.bio-store-render::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
    transition: background-color 0.5s ease;
}
.bio-store-render::before {
    top: -50px;
    left: -80px;
    background-color: var(--store-accent);
}
.bio-store-render::after {
    bottom: 80px;
    right: -80px;
    background-color: var(--store-accent);
}

/* Typography styles */
.font-outfit * { font-family: 'Outfit', sans-serif; }
.font-jakarta * { font-family: 'Plus Jakarta Sans', sans-serif; }
.font-serif * { font-family: 'Playfair Display', serif; }
.font-mono * { font-family: Courier, monospace; }

/* Bio Store Render Layouts */
/* Presets styling hooks with refined premium aesthetics */
.theme-pastel-sweet {
    --store-bg: linear-gradient(135deg, #FFF5F7 0%, #FFEBEF 50%, #FFF3F5 100%);
    --store-text: #3D2D35;
    --store-accent: #FF5A79;
    --store-card-bg: rgba(255, 255, 255, 0.85);
    --store-card-shadow: 0 8px 24px rgba(255, 90, 121, 0.08);
    --store-border: 1px solid rgba(255, 255, 255, 0.6);
    --store-radius: 20px;
}

.theme-neon-dark {
    --store-bg: linear-gradient(135deg, #07090E 0%, #0F121F 50%, #151126 100%);
    --store-text: #E8EBFC;
    --store-accent: #A855F7;
    --store-card-bg: rgba(18, 22, 41, 0.65);
    --store-card-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --store-border: 1px solid rgba(168, 85, 247, 0.15);
    --store-radius: 16px;
}
.theme-neon-dark .phone-status-bar {
    color: #ffffff;
}
.theme-neon-dark .bio-store-render {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.45) 100%);
}

.theme-earthy-minimal {
    --store-bg: #FAF7F2;
    --store-text: #2D2521;
    --store-accent: #786C5A;
    --store-card-bg: #FFFFFF;
    --store-card-shadow: 0 2px 8px rgba(120, 108, 90, 0.04);
    --store-border: 1px solid #EBE6DC;
    --store-radius: 4px;
}

.theme-cyber-lemon {
    --store-bg: #0C0C0C;
    --store-text: #F2F2F2;
    --store-accent: #C7FF00;
    --store-card-bg: #141414;
    --store-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    --store-border: 1px solid rgba(199, 255, 0, 0.15);
    --store-radius: 0px;
}
.theme-cyber-lemon .bio-store-render {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0.5) 100%);
}

/* Bio profile elements */
.bio-profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}
.bio-avatar-wrapper {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--store-accent, #6366f1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--store-accent) 15%, transparent), 
                0 10px 25px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}
.bio-avatar-wrapper:hover {
    transform: scale(1.06);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--store-accent) 25%, transparent), 
                0 12px 30px rgba(0, 0, 0, 0.12);
}
.bio-avatar-wrapper i {
    width: 36px;
    height: 36px;
}
/* Glowing Online indicator dot */
.bio-avatar-wrapper::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 13px;
    height: 13px;
    background-color: var(--accent-green, #00BFAE);
    border: 2px solid var(--store-bg, #fff);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-green, #00BFAE);
    z-index: 3;
}
.sim-store-name {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 0.35rem;
    color: var(--store-text);
}
.sim-store-bio {
    font-size: 0.8rem;
    color: var(--store-text);
    opacity: 0.75;
    line-height: 1.45;
    padding: 0 1rem;
    max-width: 280px;
    margin: 0 auto;
}

/* Bio Social Links Pill - Glassmorphism Restyle */
.bio-social-links {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.75rem;
    position: relative;
    z-index: 1;
}
.social-link-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 24px;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.whatsapp-pill {
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.2);
    color: #1b5e20;
}
.instagram-pill {
    background: rgba(233, 30, 99, 0.08);
    border: 1px solid rgba(233, 30, 99, 0.2);
    color: #b71c1c;
}
.website-pill {
    background: rgba(33, 150, 243, 0.08);
    border: 1px solid rgba(33, 150, 243, 0.2);
    color: #0d47a1;
}

.whatsapp-pill:hover {
    background: rgba(37, 211, 102, 0.15);
    border-color: rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.15);
}
.instagram-pill:hover {
    background: rgba(233, 30, 99, 0.15);
    border-color: rgba(233, 30, 99, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(233, 30, 99, 0.15);
}
.website-pill:hover {
    background: rgba(33, 150, 243, 0.15);
    border-color: rgba(33, 150, 243, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.15);
}

/* Adjustments for dark themes */
.theme-neon-dark .whatsapp-pill,
.theme-cyber-lemon .whatsapp-pill {
    color: #66bb6a;
    background: rgba(102, 187, 106, 0.08);
    border-color: rgba(102, 187, 106, 0.2);
}
.theme-neon-dark .instagram-pill,
.theme-cyber-lemon .instagram-pill {
    color: #f48fb1;
    background: rgba(244, 143, 177, 0.08);
    border-color: rgba(244, 143, 177, 0.2);
}
.theme-neon-dark .website-pill,
.theme-cyber-lemon .website-pill {
    color: #90caf9;
    background: rgba(144, 202, 249, 0.08);
    border-color: rgba(144, 202, 249, 0.2);
}

/* Search bar styling */
.sim-search-bar-wrapper {
    padding: 0 0.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}
.sim-search-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--store-card-bg);
    border: var(--store-border, 1px solid rgba(0, 0, 0, 0.06));
    border-radius: 30px;
    padding: 0.55rem 1.1rem;
    box-shadow: var(--store-card-shadow);
    transition: all 0.3s ease;
}
.sim-search-bar:focus-within {
    border-color: var(--store-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--store-accent) 15%, transparent), 
                var(--store-card-shadow);
}
.sim-search-bar i {
    width: 15px;
    height: 15px;
    opacity: 0.6;
    color: var(--store-text);
}
.sim-search-bar input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.78rem;
    width: 100%;
    color: var(--store-text);
}
.sim-search-bar input::placeholder {
    color: var(--store-text);
    opacity: 0.5;
}

/* Products lists grids */
.sim-products-container {
    display: grid;
    gap: 0.85rem;
    padding: 0 0.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Shared Premium Product Card Base */
.sim-product-card {
    background: var(--store-card-bg);
    border: var(--store-border, 1px solid rgba(0, 0, 0, 0.05));
    border-bottom: var(--store-border-bottom, var(--store-border, 1px solid rgba(0, 0, 0, 0.05)));
    border-radius: var(--store-radius, 16px);
    box-shadow: var(--store-card-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                border-color 0.3s ease;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    /* Align heights in grid */
    height: 100%;
    display: flex;
    flex-direction: column;
}
.sim-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px color-mix(in srgb, var(--store-accent) 8%, rgba(0, 0, 0, 0.12)), 
                var(--store-card-shadow);
    border-color: color-mix(in srgb, var(--store-accent) 35%, transparent);
}
.sim-product-card:active {
    transform: translateY(-2px);
}

/* Emojis hover zoom and tilt micro-animation */
.sim-prod-img-box {
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.2);
}
.sim-prod-img-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.04) 100%);
    pointer-events: none;
}
.sim-prod-img-box span {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.sim-product-card:hover .sim-prod-img-box span {
    transform: scale(1.2) rotate(8deg);
}

/* Premium Buy Button Styling */
.sim-prod-buy-btn {
    border: none;
    background: var(--store-accent);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--store-accent) 25%, transparent);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.sim-prod-buy-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--store-accent) 40%, transparent);
    filter: brightness(1.05);
}
.sim-prod-buy-btn:active {
    transform: scale(0.96);
}

/* Contrast Fix: Cyber Lemon theme black button text */
.theme-cyber-lemon .sim-prod-buy-btn {
    color: #000000 !important;
    font-weight: 800;
}

/* GRID 2-COLUMN VIEW */
.layout-grid-2col .sim-products-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    align-items: stretch; /* Force row stretching */
}
.layout-grid-2col .sim-product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.85rem;
    text-align: center;
    height: 100%; /* Fill grid row height */
}
.layout-grid-2col .sim-prod-img-box {
    width: 100%;
    aspect-ratio: 1;
    border-radius: calc(var(--store-radius) - 4px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 2rem;
    flex-shrink: 0;
}
.layout-grid-2col .sim-prod-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex: 1; /* Stretch details to push buttons down */
}
.layout-grid-2col .sim-prod-name {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--store-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2rem;
    line-height: 1.3;
}
.layout-grid-2col .sim-prod-desc {
    display: none !important; /* Hide descriptions in 2-col to keep card heights uniform */
}
.layout-grid-2col .sim-flex-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto; /* Push price and button to bottom */
}
.layout-grid-2col .sim-prod-price {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--store-accent);
    margin-bottom: 0.15rem;
}
.layout-grid-2col .sim-prod-buy-btn {
    width: 100%;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.5rem;
    border-radius: 10px;
}

/* LIST 1-COLUMN DETAILED VIEW */
.layout-list-detailed .sim-products-container {
    grid-template-columns: 1fr;
    gap: 0.85rem;
}
.layout-list-detailed .sim-product-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    text-align: left;
}
.layout-list-detailed .sim-prod-img-box {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    border-radius: calc(var(--store-radius) - 2px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}
.layout-list-detailed .sim-prod-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.layout-list-detailed .sim-prod-name {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--store-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.layout-list-detailed .sim-prod-desc {
    font-size: 0.68rem;
    opacity: 0.7;
    margin-bottom: 0.35rem;
    line-height: 1.35;
    color: var(--store-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.layout-list-detailed .sim-flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
    width: 100%;
}
.layout-list-detailed .sim-prod-price {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--store-accent);
}
.layout-list-detailed .sim-prod-buy-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}
.layout-list-detailed .sim-prod-buy-btn span {
    display: none;
}

/* GRID 1-COLUMN BOLD VIEW */
.layout-grid-1col .sim-products-container {
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
.layout-grid-1col .sim-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.layout-grid-1col .sim-prod-img-box {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    border-radius: 0;
    flex-shrink: 0;
}
.layout-grid-1col .sim-prod-details {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem;
    text-align: left;
    flex: 1;
}
.layout-grid-1col .sim-prod-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--store-text);
}
.layout-grid-1col .sim-prod-desc {
    font-size: 0.72rem;
    opacity: 0.7;
    margin-bottom: 0.85rem;
    line-height: 1.4;
    color: var(--store-text);
}
.layout-grid-1col .sim-flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Push price and button to bottom */
}
.layout-grid-1col .sim-prod-price {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--store-accent);
}
.layout-grid-1col .sim-prod-buy-btn {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 10px;
}

/* Default dynamic image patterns with expanded niches */
.pattern-bakery { background: radial-gradient(circle, #FFF0E5, #FFD5B2); }
.pattern-clothing { background: radial-gradient(circle, #E8EBF2, #C2CAD9); }
.pattern-crafts { background: radial-gradient(circle, #F3EAF4, #D6C2D8); }
.pattern-flower { background: radial-gradient(circle, #F3E5F5, #E1BEE7); }
.pattern-coffee { background: radial-gradient(circle, #EFEBE9, #D7CCC8); }
.pattern-gem { background: radial-gradient(circle, #E0F7FA, #B2EBF2); }
.pattern-default { background: radial-gradient(circle, #E8F5E9, #C8E6C9); }

/* Empty state / footer */
.sim-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    border: 1px dashed rgba(0,0,0,0.1);
    border-radius: 12px;
    margin: 0 0.5rem;
}
.sim-empty-state i {
    width: 32px;
    height: 32px;
    opacity: 0.3;
    margin-bottom: 0.5rem;
}
.sim-empty-state p {
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.7;
}
.sim-empty-state span {
    font-size: 0.65rem;
    opacity: 0.5;
}
.sim-store-footer {
    margin-top: auto;
    padding: 1.5rem 0 0.5rem 0;
    font-size: 0.65rem;
    opacity: 0.6;
}
.footer-highlight {
    font-weight: 700;
    color: var(--store-accent);
}

/* --- Modals Styling --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 1;
    transition: opacity 0.25s ease;
}
.modal-overlay.hide {
    opacity: 0;
    pointer-events: none;
}
.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 450px;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.hide .modal-card {
    transform: translateY(40px);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}
.close-modal-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}
.close-modal-btn:hover {
    color: var(--accent-pink);
}
.modal-body {
    padding: 1.5rem;
}

/* WhatsApp Chat Mockup Specifics */
.bg-whatsapp {
    background: #075E54 !important;
    color: white;
}
.bg-whatsapp-light {
    background: #F0F2F5;
}
.whatsapp-modal {
    max-width: 380px;
}
.whatsapp-modal .user-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.avatar-green {
    width: 38px;
    height: 38px;
    background: #128C7E;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.status-info h3 {
    font-size: 0.85rem;
    font-weight: 700;
}
.online-status {
    font-size: 0.65rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 3px;
}
.online-status .bullet {
    width: 6px;
    height: 6px;
    background: #25D366;
    border-radius: 50%;
    display: inline-block;
}
.whatsapp-chat-body {
    background: #ECE5DD; /* WhatsApp classic wall bg */
    height: 320px;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.chat-timestamp {
    background: rgba(225, 238, 246, 0.9);
    align-self: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #555;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    text-transform: uppercase;
}
.wa-message {
    max-width: 80%;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}
.wa-received {
    background: #ffffff;
    align-self: flex-start;
    border-top-left-radius: 0;
    color: #303030;
}
.wa-sent {
    background: #DCF8C6;
    align-self: flex-end;
    border-top-right-radius: 0;
    color: #303030;
}
.whitespace-pre {
    white-space: pre-wrap;
    text-align: left;
}
.msg-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
}
.msg-time {
    font-size: 0.6rem;
    color: rgba(0,0,0,0.45);
}
.wa-ticks {
    width: 12px;
    height: 12px;
    color: #34B7F1;
}
.wa-input-mock {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border-radius: 30px;
    padding: 0.45rem 1rem;
    margin: 0.5rem 0;
}
.mock-input-field {
    flex: 1;
    font-size: 0.75rem;
    color: #999;
    text-align: left;
}
.wa-send-mock-btn {
    background: #128C7E;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Success Publish modal components */
.text-center { text-align: center; }
.success-icon-wrapper {
    margin: 1rem 0;
}
.success-icon {
    width: 60px;
    height: 60px;
    color: var(--accent-green);
}
.publish-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.url-copy-card {
    display: flex;
    align-items: center;
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}
.url-prefix {
    color: var(--text-muted);
}
.url-slug {
    font-weight: 700;
    color: var(--primary);
    flex: 1;
    text-align: left;
    margin-left: 2px;
}
.copy-url-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-primary);
}
.qr-code-section {
    background: var(--bg-app);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}
.qr-code-section .section-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.qr-code-box {
    display: flex;
    justify-content: center;
}
.mock-qr {
    width: 200px;
    height: 200px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    background-color: #ffffff;
    display: block;
}
.modal-action-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}
@keyframes highlight-pulse {
    0% { box-shadow: 0 0 0 0px rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.2); }
    100% { box-shadow: 0 0 0 0px rgba(99, 102, 241, 0); }
}
.highlight-flash {
    animation: highlight-pulse 0.8s ease-out;
}

/* Utilities colors */
.text-purple { color: var(--accent-purple); }
.text-pink { color: var(--accent-pink); }
.text-green { color: var(--accent-green); }
.text-blue { color: #3b82f6; }
.badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    text-transform: uppercase;
    background: var(--bg-app);
    color: var(--text-muted);
}
.badge.purple {
    background: rgba(168, 85, 247, 0.1);
    color: var(--accent-purple);
}
.icon-inline {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 2px;
}

/* Responsive adjust - Tablet */
@media(max-width: 1024px) {
    .app-workspace {
        flex-direction: column;
        overflow-y: auto;
        height: auto;
    }
    .creator-panel {
        max-width: 100%;
        min-width: 100%;
        overflow-y: visible;
        height: auto;
    }
    .simulator-panel {
        width: 100%;
        min-width: 100%;
        padding: 3rem 1rem;
    }
}

/* Responsive adjust - Mobile */
@media(max-width: 768px) {
    .app-container {
        height: auto !important;
        min-height: calc(100vh - 60px);
    }
    .app-header {
        flex-wrap: wrap;
        height: auto;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }
    .header-left {
        order: 2;
        width: 100%;
    }
    .header-left .primary-btn {
        width: 100%;
        justify-content: center;
    }
    .header-actions {
        order: 1;
        width: 100%;
        justify-content: space-between !important;
        flex-wrap: nowrap;
    }
    .template-selector-bar {
        flex: 1;
        min-width: 0;
    }
    .header-template-select {
        min-width: 0;
        flex: 1;
    }
    .app-workspace {
        flex-direction: column;
        overflow-y: auto;
        height: auto;
    }
    .creator-panel {
        max-width: 100%;
        min-width: 0;
        width: 100%;
        padding: 1rem;
        overflow-y: visible;
        height: auto;
    }
    .simulator-panel {
        width: 100%;
        min-width: 0;
        padding: 2rem 1rem;
    }
    .creator-card {
        padding: 1rem;
    }
    .card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* --- Customer View adjustments --- */
body.customer-view .app-header { display: none; }
body.customer-view .creator-panel { display: none; }
body.customer-view .simulator-header-info { display: none !important; }
body.customer-view .app-workspace { height: 100vh; }

body.customer-view .phone-camera-notch,
body.customer-view .phone-status-bar,
body.customer-view .phone-home-indicator,
body.customer-view .phone-volume-buttons,
body.customer-view .phone-power-button {
    display: none;
}

body.customer-view .phone-mockup {
    border: none;
    box-shadow: none;
    background: transparent !important; /* Allows gradient blending */
}

body.customer-view .phone-screen {
    background: transparent !important; /* Allows gradient blending */
}

/* Desktop float view vs Native mobile view */
@media (min-width: 481px) {
    body.customer-view .simulator-panel {
        width: 100%;
        height: 100vh;
        padding: 2rem;
        background: var(--store-bg);
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        overflow: hidden;
    }
    /* Elegant large ambient colored glow blobs floating behind the center phone container on desktop */
    body.customer-view .simulator-panel::before,
    body.customer-view .simulator-panel::after {
        content: '';
        position: absolute;
        width: 550px;
        height: 550px;
        border-radius: 50%;
        filter: blur(130px);
        opacity: 0.16;
        pointer-events: none;
        z-index: 0;
        transition: background-color 0.5s ease;
    }
    body.customer-view .simulator-panel::before {
        top: -10%;
        left: -10%;
        background-color: var(--store-accent);
    }
    body.customer-view .simulator-panel::after {
        bottom: -10%;
        right: -10%;
        background-color: var(--store-accent);
    }
    body.customer-view .phone-mockup {
        width: 100%;
        max-width: 450px;
        height: 90vh;
        max-height: 850px;
        border-radius: 28px;
        box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35),
                    0 0 0 1px rgba(255, 255, 255, 0.12);
        overflow: hidden;
        position: relative;
        z-index: 1;
    }
    body.customer-view .phone-screen {
        padding-top: 2rem;
        padding-bottom: 85px;
        border-radius: 28px;
    }
    body.customer-view .phone-cart-bar {
        left: 20px;
        right: 20px;
        bottom: 20px;
        max-width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    body.customer-view .simulator-panel {
        width: 100%;
        height: 100vh;
        padding: 0;
        background: var(--store-bg);
    }
    body.customer-view .phone-mockup {
        width: 100%;
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
        margin: 0;
    }
    body.customer-view .phone-screen {
        padding-top: 1.5rem;
        padding-bottom: 85px;
        border-radius: 0;
    }
    body.customer-view .phone-cart-bar {
        left: 10px;
        right: 10px;
        bottom: 20px;
        max-width: calc(100% - 20px);
    }
}

/* --- Error Page Container --- */
.error-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    background: var(--bg-app);
}
.error-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}
.error-icon-box {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(236, 72, 153, 0.1);
    color: var(--accent-pink);
    display: flex;
    align-items: center;
    justify-content: center;
}
.error-icon-box i {
    width: 32px;
    height: 32px;
}
.error-card h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
}
.error-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- How to Use Steps Styles --- */
.how-to-use-card {
    border-color: rgba(59, 130, 246, 0.2);
    background: linear-gradient(180deg, var(--bg-card), rgba(59, 130, 246, 0.01));
}
.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.steps-list li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
}
.steps-list p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.steps-list p strong {
    color: var(--text-primary);
}

/* --- QR Code Download Dropdown Menu --- */
.dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    bottom: calc(100% + 8px); /* Open upwards since download button is at the bottom */
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 250;
    min-width: 180px;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-menu.hide {
    display: none;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover {
    background: var(--bg-app);
    color: var(--primary);
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}


