/* Base Styles */
body { font-family: 'Montserrat', sans-serif; margin: 0; padding: 0; background: #fff; color: #333; overflow-x: hidden; }
* { box-sizing: border-box; }

/* Top Promo Banner */
.top-promo { background-color: #002d5b; color: white; text-align: center; padding: 10px; font-size: 12px; font-weight: 700; position: relative; }
.top-promo span { text-decoration: underline; cursor: pointer; }
.close-promo { position: absolute; right: 20px; top: 10px; cursor: pointer; font-size: 14px; }

/* Main Header */
.main-header { display: flex; align-items: center; justify-content: space-between; padding: 15px 40px; background: white; border-bottom: 1px solid #eee; flex-wrap: wrap; }
.logos { display: flex; align-items: center; gap: 20px; }
.brand-text { font-family: 'Noto Serif', serif; text-align: center; line-height: 1; }
.brand-text .bottom-text { font-size: 28px; color: #00a0d6; letter-spacing: 2px; }
.gymboree-text { font-size: 22px; font-weight: 700; color: #002d5b; letter-spacing: -0.5px; }

/* Search Bar */
.header-search-area { display: flex; align-items: center; flex-grow: 1; max-width: 600px; margin: 0 40px; gap: 12px; }
.search-container { flex-grow: 1; position: relative; }
.search-container input { width: 100%; padding: 12px 20px 12px 40px; border-radius: 25px; border: 1px solid #ccc; background: #f8f8f8; font-size: 14px; font-family: 'Montserrat', sans-serif; }
.search-icon { position: absolute; left: 15px; top: 12px; color: #666; font-size: 16px; }

/* User Actions & Nav */
.user-actions { display: flex; align-items: center; gap: 15px; font-size: 12px; font-weight: 600; }
.action-icon { display: flex; flex-direction: column; align-items: center; cursor: pointer; color: #002d5b; }
.action-icon .circle { width: 35px; height: 35px; border-radius: 50%; border: 1px solid #ccc; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; font-size: 16px; }

/* Category Nav */
.category-nav { display: flex; justify-content: center; gap: 30px; padding: 15px 20px; background: white; font-size: 12px; font-weight: 700; border-bottom: 1px solid #eee; }
.category-nav div { text-align: center; cursor: pointer; white-space: nowrap; }
.category-nav .sub { font-size: 10px; font-weight: 400; color: #666; margin-top: 4px; }
.clearance { color: #d32f2f; }

/* --- AI CHATBOT WIDGET STYLES --- */
.ai-fab { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background: #002d5b; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: transform 0.2s; z-index: 1000; }
.ai-fab:hover { transform: scale(1.1); }

.chat-window { position: fixed; bottom: 100px; right: 30px; width: 550px; height: 750px; max-height: 85vh; background: white; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); display: flex; flex-direction: column; overflow: hidden; z-index: 999; transform: translateY(20px); opacity: 0; pointer-events: none; transition: all 0.3s ease; }
.chat-window.active { transform: translateY(0); opacity: 1; pointer-events: auto; }

/* Chat Header */
.chat-header { background: #fff; color: #000; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; }
.chat-header-empty { width: 60px; } 
.chat-header-title { font-weight: 800; font-size: 18px; text-align: center; flex: 1; }
.chat-header-actions { display: flex; align-items: center; gap: 12px; }
.start-again-btn { background: #fff; border: 1px solid #ccc; border-radius: 20px; padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; font-family: 'Montserrat', sans-serif; }
.start-again-btn:hover { background: #f4f6f8; }
.close-chat { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #ccc; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; color: #666; }
.close-chat:hover { background: #f4f6f8; }

.chat-body { flex-grow: 1; padding: 20px; overflow-y: auto; background: #fff; scroll-behavior: smooth; position: relative; }

/* Welcome Screen */
.welcome-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; }
.welcome-logo { width: 90px; height: 90px; background: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.welcome-screen h3 { font-size: 20px; font-weight: 800; margin: 0 0 10px 0; color: #000; }
.welcome-screen p { font-size: 15px; font-weight: 600; color: #666; margin: 0 0 30px 0; }

.prompts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.suggestion-chip { background: #e2f0f9; border: none; color: #1a2b4c; border-radius: 16px; padding: 20px 16px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: 'Montserrat', sans-serif; line-height: 1.4; text-align: center; }
.suggestion-chip:hover { background: #d0e4f2; }

/* Chat Bubbles */
.user-chat-bubble { background: #def0f9; color: #1f2937; padding: 14px 20px; border-radius: 20px 20px 0 20px; margin-left: auto; margin-bottom: 20px; max-width: 85%; width: fit-content; font-size: 15px; line-height: 1.5; word-wrap: break-word; font-weight: 600; }
.ai-chat-bubble { background: #f8f9fa; color: #1f2937; padding: 14px 20px; border-radius: 20px 20px 20px 0; margin-right: auto; margin-bottom: 15px; max-width: 90%; width: fit-content; font-size: 15px; line-height: 1.5; font-weight: 600; }

/* Chat Footer & Input */
.chat-footer { padding: 15px 20px; background: white; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #eee; }
.input-group { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid #ddd; border-radius: 30px; padding: 6px 6px 6px 15px;}
.input-group input { flex: 1; border: none; background: transparent; outline: none; font-family: 'monospace', sans-serif; font-size: 15px;}
.send-btn { width: 42px; height: 42px; border-radius: 50%; background: #262b40; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background 0.2s; }
.send-btn:hover { background: #000; }
.send-btn svg { width: 22px; height: 22px; fill: white; }
.send-btn:disabled { background: #ccc; }

#status-log { font-family: monospace; font-size: 11px; color: #666; text-align: center; margin-bottom: -5px;}
.footer-terms { font-size: 11px; color: #888; text-align: center; margin-top: 5px; line-height: 1.4; }
.footer-terms a { color: #555; text-decoration: underline; }

/* Product Container */
.shop-ai-product-section { background: #f9f9f9; border-radius: 16px; padding: 16px; margin-bottom: 20px; animation: fadeIn 0.5s ease; }
.shop-ai-product-grid { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 4px; scroll-behavior: smooth; }
.shop-ai-product-grid::-webkit-scrollbar { display: none; } 

/* Product Cards */
.tcp-card { min-width: 180px; max-width: 180px; background: #fff; border-radius: 8px; overflow: hidden; flex-shrink: 0; display: flex; flex-direction: column; transition: transform 0.2s; padding-bottom: 10px; cursor: pointer;}
.tcp-card:hover { transform: translateY(-4px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.tcp-img-container { position: relative; width: 100%; height: 200px; background: #fff; margin-bottom: 8px; }
.tcp-card-img { width: 100%; height: 100%; object-fit: contain; }

.tcp-card-info { display: flex; flex-direction: column; text-align: left; padding: 0 12px; flex-grow: 1; justify-content: space-between;}
.tcp-brand { color: #888; font-size: 11px; font-weight: 700; margin-bottom: 4px; text-transform: uppercase; }
.tcp-title { font-size: 13px; color: #333; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; margin-bottom: 12px;}
.tcp-bottom-row { display: flex; justify-content: space-between; align-items: flex-end; }
.tcp-price-col { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.tcp-current-price { font-weight: 800; color: #000; font-size: 16px;}
.tcp-original-price { text-decoration: line-through; color: #888; font-size: 13px; font-weight: 600;}

.tcp-bag-btn { width: 32px; height: 32px; border-radius: 50%; background: #1a2b4c; color: white; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;}
.tcp-bag-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* NEW: Product Sidebar Overlays */
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); z-index: 2999; display: none; opacity: 0; transition: opacity 0.3s; }
.overlay.active { display: block; opacity: 1; }
.details-sidebar { position: fixed; top: 0; right: -450px; width: 400px; height: 100%; background: white; z-index: 3000; box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15); transition: right 0.3s ease; display: flex; flex-direction: column; }
.details-sidebar.active { right: 0; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    /* Stack the header for mobile */
    .main-header { padding: 10px 20px; flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 15px;}
    .hide-mobile { display: none !important; }
    
    .logos { order: 1; width: auto; }
    .user-actions { order: 2; gap: 10px; }
    .header-search-area { order: 3; width: 100%; max-width: 100%; margin: 0; }
    
    /* Make Navigation horizontally scrollable on mobile */
    .category-nav { justify-content: flex-start; overflow-x: auto; padding: 15px 20px; gap: 20px; }
    .category-nav::-webkit-scrollbar { display: none; }

    /* Shrink Header texts for mobile */
    .brand-text .bottom-text { font-size: 20px; }
    .gymboree-text { font-size: 16px; }
    .action-icon .circle { width: 30px; height: 30px; font-size: 14px; }

    /* Make the Chatbot take the full screen */
    .chat-window {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
        transform: translateY(100%);
    }
    
    /* Stack Prompts inside chatbot */
    .prompts-grid { grid-template-columns: 1fr; }
    
    /* Hide FAB if Chat is active */
    .chat-window.active ~ .ai-fab { display: none; }
    
    .chat-header-title { font-size: 14px; }
    .start-again-btn { font-size: 11px; padding: 6px 10px; }
    .chat-header-empty { width: 40px; }

    /* Adjust product sidebar for mobile */
    .details-sidebar { width: 100%; right: -100%; }
}

/* --- CAROUSEL ARROWS --- */
.carousel-wrapper-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.carousel-arrow {
    position: absolute;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    color: #333;
    transition: all 0.2s;
}
.carousel-arrow:hover { background: #f8f9fa; transform: scale(1.05); }
.left-arrow { left: -10px; }
.right-arrow { right: -10px; }

/* --- SIDEBAR SIZES & COLORS --- */
.sidebar-size-box {
    border: 1px solid #ddd;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
}
.sidebar-size-box:hover, .sidebar-size-box.active {
    border-color: #000;
    background: #f8f9fa;
}
.sidebar-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #ddd;
    cursor: pointer;
}
.sidebar-color-swatch.active {
    box-shadow: 0 0 0 2px #fff, 0 0 0 2px #000;
}