/* ═══════════════════════════════════════
   CANIFA STYLIST PRO — Light Mode Edition
   ═══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700;800&display=swap');

:root {
    /* Brand Colors */
    --primary: #C8102E;
    --primary-hover: #A30D25;
    --primary-glow: rgba(200, 16, 46, 0.15);
    
    /* Neutral Palette - Light Mode */
    --bg-main: #F8F9FA;
    --bg-surface: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-bubble-user: #C8102E;
    --bg-bubble-ai: #F1F3F5;
    --bg-input: #F8F9FA;
    
    /* Accents */
    --accent-blue: #007AFF;
    --accent-gray: #E9ECEF;
    
    /* Typography */
    --text-main: #121212;
    --text-secondary: #495057;
    --text-muted: #ADB5BD;
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
    
    /* Borders & Shadows */
    --border: rgba(0, 0, 0, 0.08);
    --border-bright: rgba(0, 0, 0, 0.12);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
    
    /* Transitions */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
body {
    font-family: var(--font-sans);
    margin: 0; padding: 0;
    background-color: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ═══ NAVIGATION ═══ */
.nav-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-header h1 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary);
    letter-spacing: 2px;
}

.nav-links { display: flex; gap: 12px; }
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--accent-gray);
    transition: all 0.3s var(--ease);
    font-size: 13px;
    font-weight: 600;
}
.nav-links a:hover { background: #DEE2E6; transform: translateY(-2px); color: var(--text-main); }
.nav-links a.active { background: var(--primary); color: white; box-shadow: 0 4px 12px var(--primary-glow); }

/* ═══ MAIN LAYOUT ═══ */
.main-content {
    height: calc(100vh - 64px);
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    gap: 24px;
}

/* CHAT CONTAINER */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
}

/* CONFIG BAR */
.config-bar {
    padding: 16px 24px;
    background: #F8F9FA;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.config-item { display: flex; align-items: center; gap: 8px; }
.config-item label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.config-item input {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    padding: 6px 12px;
    font-size: 12px;
    outline: none;
}
.config-item input:focus { border-color: var(--primary); }

.btn-action {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}
.btn-refresh { background: #007AFF; color: white; }
.btn-prompt { background: #FAB005; color: #000; }
.btn-clear { background: #FA5252; color: white; }

/* CHAT BOX */
.chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    scroll-behavior: smooth;
    background: #FFFFFF;
}

.msg-group { max-width: 85%; display: flex; flex-direction: column; }
.msg-group.user { align-self: flex-end; align-items: flex-end; }
.msg-group.bot { align-self: flex-start; align-items: flex-start; }

.sender-name { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; letter-spacing: 1px; }

.bubble {
    padding: 16px 20px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.6;
    animation: fadeIn 0.4s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.bubble.user { background: var(--primary); color: white; border-bottom-right-radius: 4px; box-shadow: 0 4px 15px var(--primary-glow); }
.bubble.bot { background: var(--bg-bubble-ai); border: 1px solid var(--border-bright); color: var(--text-main); border-bottom-left-radius: 4px; }

.bubble .timestamp { display: block; font-size: 10px; opacity: 0.5; margin-top: 8px; text-align: right; }

/* PRODUCT CARDS */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}

.p-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s var(--ease);
    display: flex;
    flex-direction: column;
}
.p-card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: var(--shadow-lg); }

.p-img-wrap { position: relative; height: 260px; overflow: hidden; background: #F8F9FA; }
.p-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.p-card:hover .p-img { transform: scale(1.05); }

.p-badge {
    position: absolute; top: 12px; left: 12px; background: var(--primary); color: white;
    font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 6px; z-index: 10;
}

.p-content { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.p-sku { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.p-name { font-size: 14px; font-weight: 600; color: var(--text-main); margin-bottom: 12px; height: 40px; overflow: hidden; }
.p-price-row { display: flex; align-items: center; gap: 8px; margin-top: auto; margin-bottom: 16px; }
.p-price-sale { font-size: 18px; font-weight: 800; color: var(--primary); }
.p-price-old { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }

.p-btn {
    background: #F8F9FA; color: var(--text-main); border: 1px solid var(--border);
    padding: 10px; border-radius: 10px; text-decoration: none; font-size: 12px; font-weight: 700;
    text-align: center; transition: all 0.3s;
}
.p-btn:hover { background: var(--primary); border-color: var(--primary); color: white; }

/* INPUT BAR */
.input-bar {
    padding: 24px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
}
.input-inner {
    background: #F8F9FA;
    border: 1px solid var(--border-bright);
    border-radius: 20px;
    padding: 8px 8px 8px 24px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.input-inner input { flex: 1; background: transparent; border: none; color: var(--text-main); font-size: 16px; outline: none; }
.btn-send {
    width: 48px; height: 48px; border-radius: 14px; background: var(--primary); color: white;
    border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* PROMPT PANEL */
.prompt-panel {
    width: 0; opacity: 0; visibility: hidden;
    background: white; border-left: 1px solid var(--border);
    display: flex; flex-direction: column; transition: all 0.5s var(--ease);
}
.prompt-panel.open { width: 500px; opacity: 1; visibility: visible; }
.prompt-inner { padding: 32px; display: flex; flex-direction: column; height: 100%; gap: 20px; }
.prompt-textarea {
    flex: 1; background: #F8F9FA; color: #495057; border: 1px solid var(--border);
    border-radius: 12px; padding: 20px; font-family: 'Consolas', monospace; font-size: 13px; line-height: 1.6;
}
