/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.5;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Left Sidebar */
.sidebar {
    width: 180px;
    min-width: 180px;
    background: linear-gradient(135deg, #2d2d2d 0%, #252525 50%, #1f1f1f 100%);
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: none;
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.logo-oval {
    width: auto;
    min-width: 120px;
    height: 46px;
    background: transparent;
    border: none;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 3px;
    overflow: visible;
    padding: 0 8px;
}

.logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 38.75872px;
    font-weight: 300;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #fa709a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    letter-spacing: 0;
}


/* Day mode logo */
body.day-mode .logo-oval {
    background: transparent;
    border: none;
}

body.day-mode .logo-text {
    background: linear-gradient(135deg, #1e293b 0%, #475569 25%, #64748b 50%, #94a3b8 75%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-family: 'Cormorant Garamond', serif;
    font-size: 5.25px;
    color: #e2e8f0;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-shadow: 0 2px 4px rgba(167, 139, 250, 0.3);
    text-align: center;
}

.new-search-btn {
    width: 100%;
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 6.5px;
    margin-top: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.new-search-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

.plus-icon {
    font-size: 16px;
    font-weight: bold;
}

.sidebar-content {
    flex: 1;
    padding: 16px;
}

.session-section,
.quick-links-section {
    margin-bottom: 24px;
}

.session-section h3,
.quick-links-section h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 11.4px;
    font-weight: 700;
    color: #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-align: left;
}

.new-chat-btn {
    background: #323232;
    border: none;
    color: white;
    padding: 0;
    margin: 0;
    margin-left: auto !important;
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0;
    border-radius: 50%;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    transform: translateY(-1px);
    white-space: nowrap;
    width: 24px;
    height: 24px;
}

.new-chat-btn:hover:not(:disabled) {
    color: white;
    background: #3a3a3a;
    transform: translateY(-1px) scale(1.3);
}

.new-chat-btn:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.search-history {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 4px 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.07) !important;
}

.search-item.active {
    background: rgba(255, 255, 255, 0.105) !important;
}

.search-thumbnail {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    flex-shrink: 0;
}

.search-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.search-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 13.4px !important;
    font-weight: 300 !important;
    color: #e5e7eb;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item .search-title {
    color: #d1d5db;
}

.search-item.active .search-title {
    background: linear-gradient(135deg, #ffffff 0%, #fce7f3 25%, #fbcfe8 50%, #f9a8d4 75%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700 !important;
}

.search-meta {
    font-size: 8px;
    font-weight: 300 !important;
    color: #9ca3af;
    text-align: left;
    width: 100%;
}

/* Hide search-meta in session items (chat tabs that have delete button) - only show it in search history with item counts */
.search-item:has(.delete-session-btn) .search-meta {
    display: none !important;
}

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quick-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    color: #d1d5db;
    text-decoration: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 12.3px;
    font-weight: 300;
    transition: all 0.2s ease;
    position: relative;
    text-align: left;
}

.quick-link .link-icon {
    order: 2;
}

.quick-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: scale(1.125); /* reduced ~10% */
}

.quick-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #fa709a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
}

.link-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    position: relative;
    order: 2;
}

.badge {
    background: transparent;
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    background-clip: initial !important;
    -webkit-background-clip: initial !important;
    font-size: 12px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    font-family: 'Cormorant Garamond', serif;
    position: absolute;
    top: -6px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.quick-link.active .badge {
    color: white !important;
    -webkit-text-fill-color: white !important;
    background-clip: initial !important;
    -webkit-background-clip: initial !important;
}

/* Theme Toggle */
.theme-toggle-container {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 100;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    width: 30px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.theme-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(180deg);
}

/* Day Mode Styles */
body.day-mode {
    background: #f8fafc;
    color: #1a1a1a;
}

body.day-mode .sidebar {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    color: #1e293b;
    border-right: none;
}

body.day-mode .sidebar-header {
    border-bottom: none;
}

body.day-mode .center-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 50%, #e2e8f0 100%);
}

body.day-mode .chat-container {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 50%, #e2e8f0 100%);
}

body.day-mode .empty-message h3 {
    background: linear-gradient(135deg, #1e293b 0%, #475569 25%, #64748b 50%, #94a3b8 75%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.day-mode .empty-message p {
    color: #475569;
}

body.day-mode .user-message .message-content {
    background: #f1f5f9;
    color: #000000;
    border-right: 2px solid #10b981;
}

body.day-mode .ai-message .message-content {
    background: #f8fafc;
    color: #000000;
    border-left: 2px solid #8b5cf6;
}

body.day-mode .message-input {
    background: white;
    border: 1px solid #e2e8f0;
    color: #000000;
}

body.day-mode .message-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

body.day-mode .session-section h3,
body.day-mode .quick-links-section h3,
body.day-mode .refinements-section h3 {
    color: #000000;
}

body.day-mode .tagline {
    color: #000000;
}

body.day-mode .refinement-btn,
body.day-mode .sort-btn {
    color: #000000;
}

body.day-mode .refinement-btn:hover,
body.day-mode .sort-btn:hover {
    background: transparent; /* no highlight */
    color: #000000;
    transform: scale(1.33); /* reduced ~10% */
}

body.day-mode .new-chat-btn {
    color: #1e293b;
    background: #d1d9e3;
    border: none;
}

body.day-mode .new-chat-btn:hover:not(:disabled) {
    color: #1e293b;
    background: #c4ceda;
    transform: translateY(-1px) scale(1.3);
}

body.day-mode .new-chat-btn:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

body.day-mode .search-item:hover {
    background: rgba(0, 0, 0, 0.105) !important;
}

body.day-mode .search-item.active {
    background: rgba(0, 0, 0, 0.14) !important;
}

body.day-mode .search-item .search-title {
    background: linear-gradient(135deg, #6b21a8 0%, #7c3aed 25%, #8b5cf6 50%, #a855f7 75%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Override search-title color in day mode */
body.day-mode .search-title {
    color: #be185d !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
}

/* Comprehensive Product Tile Day Mode Overrides */
body.day-mode #productGridContainer .product-name {
    color: #000000 !important;
}

body.day-mode #productGridContainer .product-price {
    color: #10b981 !important; /* Green color */
}

body.day-mode #productGridContainer .product-vendor {
    color: #000000 !important;
}

body.day-mode #productGridContainer h2 {
    color: #000000 !important;
}

body.day-mode #productGridContainer p {
    color: #000000 !important;
}

body.day-mode #productGridContainer * {
    color: #000000 !important;
}

body.day-mode .search-item.active .search-title {
    background: linear-gradient(135deg, #6b21a8 0%, #7c3aed 25%, #8b5cf6 50%, #a855f7 75%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700 !important;
}

body.day-mode .search-meta {
    color: #000000;
}

body.day-mode .quick-link {
    color: #000000;
}

body.day-mode .quick-link:hover {
    background: rgba(0, 0, 0, 0.15);
    color: #000000;
}

body.day-mode .banner-icon {
    color: #000000;
    filter: brightness(0.8) contrast(1.2);
}

body.day-mode .banner-badge {
    color: #000000 !important;
}

body.day-mode .toast {
    color: #000000;
}

body.day-mode .theme-toggle {
    background: rgba(0, 0, 0, 0.1);
}

body.day-mode .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Cart Message Red Color for Both Themes */
.cart-expiration-message {
    color: #ef4444 !important;
}

body.day-mode .cart-expiration-message {
    color: #ef4444 !important;
}

/* Override universal selector for cart message */
body.day-mode #productGridContainer .cart-expiration-message {
    color: #ef4444 !important;
}

/* Day Mode Active Icon Highlight */
body.day-mode .banner-link.active {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
    width: 38px;
    height: 29px;
}

/* Day mode hover state for banner icons */
body.day-mode .banner-link:hover {
    background: transparent; /* no highlight */
    transform: none; /* scale icon only */
    box-shadow: none;
}

body.day-mode .banner-link:hover .banner-icon {
    filter: brightness(0.9) contrast(1.3);
    text-shadow: 0 0 3px rgba(0,0,0,0.3);
    transform: scale(1.22);
}

body.day-mode .banner-link.active .banner-icon {
    filter: brightness(1.2) contrast(1.4);
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

body.day-mode .banner-link.active .banner-badge {
    color: #000000 !important;
    text-shadow: none;
    font-weight: 700;
    top: -2px;
    right: -2px;
}

/* Cart Page Day Mode */
body.day-mode .cart-header h2 {
    color: #000000 !important;
}

body.day-mode .cart-header .subheader {
    color: #000000 !important;
}

body.day-mode .product-card .product-title {
    color: #000000 !important;
}

body.day-mode .product-card .product-price {
    color: #10b981 !important; /* Green color */
}

body.day-mode .product-card .product-description {
    color: #000000 !important;
}

body.day-mode .cart-summary h3 {
    color: #000000 !important;
}

body.day-mode .cart-summary .total-price {
    color: #000000 !important;
}

body.day-mode .cart-empty h3 {
    color: #000000 !important;
}

body.day-mode .cart-empty p {
    color: #000000 !important;
}

body.day-mode .quantity-controls button {
    color: #000000 !important;
}

body.day-mode .remove-item-btn {
    color: #000000 !important;
}

body.day-mode .cart-item-info h4 {
    color: #000000 !important;
}

body.day-mode .cart-item-info p {
    color: #000000 !important;
}

body.day-mode .cart-item-price {
    color: #000000 !important;
}

body.day-mode .cart-item-actions button {
    color: #000000 !important;
}

/* Product Tile Day Mode */
body.day-mode .product-name {
    color: #000000 !important;
}

body.day-mode .product-price {
    color: #10b981 !important; /* Green color */
}

body.day-mode .product-vendor {
    color: #000000 !important;
}

body.day-mode .modal-right .product-name {
    color: #000000 !important;
}

body.day-mode .modal-right .product-price {
    color: #10b981 !important; /* Green color */
}

/* Additional Cart Summary Elements */
body.day-mode .cart-summary * {
    color: #000000 !important;
}

body.day-mode .cart-summary .summary-item {
    color: #000000 !important;
}

body.day-mode .cart-summary .summary-label {
    color: #000000 !important;
}

body.day-mode .cart-summary .summary-value {
    color: #000000 !important;
}

body.day-mode .sticky-banner {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 50%, #e2e8f0 100%);
    border-bottom: none;
}

/* Night Mode Sticky Banner */
.sticky-banner {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #383838 0%, #313131 50%, #2b2b2b 100%);
    border-bottom: none;
    padding: 4px 16px;
    z-index: 100;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 70%;
}

.banner-icons {
    display: flex;
    gap: 16px;
    align-items: center;
}

    .banner-link {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 36px;
        border-radius: 8px;
        background: transparent;
        transition: all 0.2s ease;
        text-decoration: none;
    }

.banner-link:hover {
    background: transparent; /* no highlight on hover */
    transform: none; /* scale icon only, not container */
    box-shadow: none;
}

.banner-link:hover .banner-icon {
    filter: brightness(2) contrast(1.5);
    text-shadow: 0 0 4px rgba(255,255,255,0.6);
    transform: scale(1.22); /* enlarge icon on hover */
}

.banner-link.active {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    width: 46px;
    height: 29px;
}

.banner-link.active .banner-icon {
    filter: brightness(1.8) contrast(1.4);
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.4);
}

.banner-link.active .banner-badge {
    color: white !important;
    text-shadow: none;
    font-weight: 700;
    top: -2px;
    right: -2px;
}

.banner-icon {
    font-size: 24px;
    color: white;
    filter: brightness(1.5) contrast(1.2);
    transition: transform 0.15s ease, filter 0.15s ease, text-shadow 0.15s ease;
}

.banner-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: transparent;
    color: white !important;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 8px;
    min-width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', serif;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    z-index: 10;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    background: #f8fafc;
}

.center-panel {
    flex: 1;
    background: linear-gradient(135deg, #333333 0%, #2a2a2a 50%, #242424 100%);
    display: flex;
    flex-direction: column;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #383838 0%, #313131 50%, #2b2b2b 100%);
    border-radius: 0;
    margin: 0;
    box-shadow: none;
}

.chat-scrollable-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

.chat-scrollable-area::-webkit-scrollbar {
    width: 4px;
}

.chat-scrollable-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.chat-scrollable-area::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #fa709a 100%);
    border-radius: 10px;
}

.chat-scrollable-area::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653b8f 25%, #d373ea 50%, #e03d59 75%, #e8557a 100%);
}

/* Sidebar scrollbar styles to match chatbot */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #fa709a 100%);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653b8f 25%, #d373ea 50%, #e03d59 75%, #e8557a 100%);
}


.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.empty-message {
    text-align: center;
}

.empty-message h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15.5px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #fa709a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.empty-message p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 12.25px;
    color: #e2e8f0;
    line-height: 1.4;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

.chat-messages-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.user-message,
.ai-message {
    display: flex;
    gap: 12px;
    max-width: 75%;
    align-items: flex-start;
    padding: 0;
    margin-bottom: 6px;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
    margin-right: 8px;
}

.ai-message {
    align-self: flex-start;
}

.message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: normal;
    flex-shrink: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.user-avatar {
    background: transparent;
}

.ai-avatar {
    background: #f1f5f9;
    width: 36px;
    height: 36px;
    font-size: 20px;
    border: 1px solid #e2e8f0;
}

.message-content {
    padding: 3px 8px;
    border-radius: 12px;
    line-height: 1.3;
    font-size: 14px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
}

.user-message .message-content {
    background: transparent;
    color: white;
    box-shadow: none;
    border: none;
    border-right: 2px solid #10b981;
    font-weight: normal;
}

.ai-message .message-content {
    background: transparent;
    color: white;
    box-shadow: none;
    border-left: 2px solid #8b5cf6;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.search-title {
    font-size: 13.4px !important;
    font-weight: 700;
    color: #1e293b;
}

.view-toggle {
    display: flex;
    gap: 4px;
}

.view-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
}

.user-query {
    margin-bottom: 16px;
}

.query-chip {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.ai-response {
    margin-bottom: 20px;
}

.ai-response p {
    font-size: 16px;
    color: #475569;
    font-weight: 500;
}

#productGridContainer {
    display: none !important;
    padding: 20px;
    min-height: 400px;
}

#productGridContainer:not(:empty) {
    display: block !important;
}

#productGridContainer .product-grid {
    display: grid !important;
    visibility: visible !important;
}

.filter-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-chip {
    background: #e0e7ff;
    color: #3730a3;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 400;
    font-family: 'Cormorant Garamond', serif;
    display: flex;
    align-items: center;
    gap: 6px;
}

.remove-filter {
    background: none;
    border: none;
    color: #3730a3;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: 17px;
    margin-bottom: 22px;
    align-items: stretch;
    max-width: 75%;
}

.product-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 245px;
}

.product-card.product-enter {
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
}


.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #8b5cf6;
}

.product-card.highlighted {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.product-image {
    width: 100%;
    height: 160px;
    background: #f1f5f9;
    position: relative;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

/* Offer badge on product tiles */
.offer-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ef4444; /* red */
    color: #ffffff;
    font-size: 9px; /* reduced ~20% */
    font-weight: 700;
    padding: 2px 5px; /* reduced width padding */
    border-radius: 10px; /* slightly smaller radius */
    line-height: 1;
    z-index: 5;
}

.product-image.blue { background: #d9e8ff; }
.product-image.green { background: #dcfce7; }
.product-image.pink { background: #fce7f3; }
.product-image.yellow { background: #fef3c7; }
.product-image.purple { background: #e9d5ff; }
.product-image.gray { background: #f1f5f9; }

/* Override background color when image URL is provided */
.product-image[style*="background-image"] {
    background-color: transparent;
}

.favorite-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    color: #ef4444;
    transition: all 0.2s ease;
}

.favorite-btn:hover {
    background: white;
    transform: scale(1.1);
}

.match-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: 600;
}

.match-percentage {
    font-size: 8px;
    line-height: 1;
}

.match-text {
    font-size: 6px;
    line-height: 1;
}

.product-info {
    padding: 11px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-brand {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 4px;
    display: none;
}

.product-name {
    font-size: 8px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.3;
}

.product-price {
    font-size: 10px;
    font-weight: 700;
    color: #10b981; /* Green color */
    margin-bottom: 2px;
}

.product-vendor {
    font-size: 7px;
    font-weight: 600;
    color: #8b5cf6;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.action-btn {
    flex: 1;
    padding: 6px 8px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #64748b;
    width: 25px;
    height: 25px;
    padding: 0;
}

.view-btn-action {
    background: transparent;
    color: #64748b;
}

.view-btn-action svg {
    stroke: currentColor;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.view-btn-action:hover {
    background: #cbd5e1;
    color: #8b5cf6;
    border-color: #8b5cf6;
}

.add-btn-action {
    background: transparent;
    color: #64748b;
}

.add-btn-action:hover {
    background: #cbd5e1;
    color: #8b5cf6;
    border-color: #8b5cf6;
}

.load-more-container {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.load-more-btn {
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

.message-input-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding-top: 20px;
    flex-shrink: 0;
    position: relative;
}

.message-input {
    width: calc(60% - 55px);
    padding: 16px 20px;
    border: 1px solid #e2e8f0;
    border-right: none;
    border-radius: 30px 0 0 30px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    min-height: 52px;
    background: white;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
}

.message-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.send-btn {
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    color: white;
    border: 1px solid transparent;
    border-left: none;
    padding: 0;
    border-radius: 0 30px 30px 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 52px;
    width: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn svg {
    stroke: white;
    flex-shrink: 0;
}

.send-btn:hover {
    background: linear-gradient(135deg, #5568d3 0%, #d373ea 100%);
    transform: translateY(-1px);
}

/* Right Panel */
.right-panel {
    width: 200px;
    min-width: 200px;
    background: #f8fafc;
    padding: 24px;
    overflow-y: auto;
}

.insights-section,
.refinements-section,
.complete-look-section,
.related-searches-section {
    margin-bottom: 24px;
}

.insights-section h3,
.refinements-section h3,
.complete-look-section h3,
.related-searches-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
}

.insight-card {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.insight-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.insight-card ul {
    list-style: none;
}

.insight-card li {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
    position: relative;
    padding-left: 12px;
}

.insight-card li:before {
    content: "•";
    color: #8b5cf6;
    position: absolute;
    left: 0;
}

.refinement-options {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.refinement-btn,
.sort-btn {
    background: transparent;
    border: none;
    padding: 4px 12px;
    border-radius: 8px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 12.3px;
    font-weight: 300;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    width: max-content; /* shrink to content so hover isn't full width */
    max-width: 100%;
    align-self: flex-start;
    text-align: left !important;
}

/* Hover state for Smart Filters and Smart Sort (night mode) */
.refinement-btn:hover,
.sort-btn:hover {
    background: transparent; /* no highlight */
    color: #ffffff;
    transform: scale(1.33); /* reduced ~10% */
}

.refinement-btn span,
.sort-btn span {
    text-align: left;
}

.refinement-btn.active,
.sort-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #fa709a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
}

/* Style Lens button accent (green to match user message accent) */
#openVirtualTryOnBtn {
    color: #22c55e; /* brighter green */
    position: relative;
    text-shadow: 0 0 6px rgba(34, 197, 94, 0.55), 0 0 12px rgba(34, 197, 94, 0.35);
}

#openVirtualTryOnBtn::after {
    content: '✨';
    position: absolute;
    top: 2px;
    right: -2px;
    font-size: 10px;
    opacity: 0.85;
    pointer-events: none;
    animation: sparklePulse 1.6s ease-in-out infinite;
}

@keyframes sparklePulse {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 0.7; }
    50% { transform: translateY(-1px) rotate(12deg) scale(1.15); opacity: 1; }
    100% { transform: translateY(0) rotate(0deg) scale(1); opacity: 0.7; }
}

#openVirtualTryOnBtn:hover { 
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.8), 0 0 16px rgba(34, 197, 94, 0.55);
}

body.day-mode #openVirtualTryOnBtn {
    color: #16a34a; /* day-mode brighter green */
}

body.day-mode #openVirtualTryOnBtn:hover {
    text-shadow: 0 0 8px rgba(22, 163, 74, 0.8), 0 0 16px rgba(22, 163, 74, 0.55);
}

/* Local Vibe buttons - clustered layout */
.local-vibe-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 8px 0 0; /* Add right padding to prevent edge collision (increased for hover) */
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden; /* Prevent buttons from going beyond container on hover */
}

.local-vibe-btn {
    background: transparent;
    border: none;
    padding: 4px 12px;
    border-radius: 8px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 10.25px;
    font-weight: 300;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    width: max-content;
    max-width: calc(100% - 12px); /* Prevent overflow with padding and gap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative; /* For better positioning control */
}

.local-vibe-btn:hover {
    background: transparent; /* no highlight */
    color: #ffffff;
    transform: scale(1.33);
    transform-origin: left center; /* Scale from left to prevent right edge overflow */
}

body.day-mode .local-vibe-btn {
    color: #000000;
}

body.day-mode .local-vibe-btn:hover {
    background: transparent;
    color: #000000;
    transform: scale(1.33);
    transform-origin: left center; /* Scale from left to prevent right edge overflow */
}

.sidebar .refinements-section {
    background: transparent;
    border-right: none;
}

.sidebar .refinements-section h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 11.4px;
    font-weight: 700;
    color: #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.arrow {
    color: #8b5cf6;
    font-weight: bold;
}

.look-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.look-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.look-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    flex-shrink: 0;
}

.look-info {
    flex: 1;
}

.look-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.look-price {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.recommendations-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 16px;
}

.recommendations-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.recommendations-loading p {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.quick-view-btn {
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-view-btn:hover {
    background: #7c3aed;
}

.search-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-pill {
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-pill:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

/* Quick View Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 950px;
    max-width: 95vw;
    max-height: 95vh;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Style Quiz modal - Night mode override */
body:not(.day-mode) #styleQuizModal .modal-content {
    background: linear-gradient(135deg, #353535 0%, #2c2c2c 50%, #242424 100%);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.06);
}
body:not(.day-mode) #styleQuizModal .modal-body {
    color: #ffffff;
}
body:not(.day-mode) #styleQuizModal #styleQuizInput {
    background: #ffffff; /* match main chat input */
    color: #000000;
    border: 1px solid #e2e8f0;
}
body:not(.day-mode) #styleQuizModal #styleQuizInput::placeholder {
    color: #64748b;
}

/* Virtual Try On Modal Styles */
.virtual-tryon-modal {
    max-width: 450px;
    width: 90vw;
    max-height: 64vh;
}

/* Virtual Try On Modal Close Button - Increased by 25% from reduced size */
#virtualTryOnModal .modal-close {
    width: 20px;
    height: 20px;
    font-size: 11.25px;
    top: 10px;
    right: 10px;
    transition: all 0.2s ease;
}

/* Virtual Try On Modal Close Button Hover Effect */
#virtualTryOnModal .modal-close:hover {
    background: rgba(139, 92, 246, 0.9);
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.virtual-tryon-body {
    flex-direction: column;
    height: 100%;
    padding: 18px;
    overflow-y: auto;
    background: transparent !important;
}

/* Ensure modal body for virtual try on has transparent background */
#virtualTryOnModal .modal-body,
#virtualTryOnModal .virtual-tryon-body {
    background: transparent !important;
}

/* Override any inherited backgrounds from modal-body - only sections, not inputs/buttons */
.virtual-tryon-upload-section,
.virtual-tryon-question-section,
.virtual-tryon-title,
.virtual-tryon-description,
.virtual-tryon-label {
    background: transparent !important;
}

.virtual-tryon-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15.5px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #fa709a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 12px 0;
    padding: 0;
}

.virtual-tryon-description {
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin: 0 0 10px 0;
    background: transparent !important;
    padding: 0;
}

.virtual-tryon-upload-section {
    margin-bottom: 16px;
    background: transparent !important;
    padding: 0;
}

.virtual-tryon-label {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 8px;
    background: transparent !important;
    padding: 0;
    border: none;
}

.virtual-tryon-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
    min-height: 180px;
    height: 180px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.virtual-tryon-upload-area:hover {
    border-color: #8b5cf6;
    background: #f1f5f9;
}

.virtual-tryon-file-input {
    display: none;
}

.virtual-tryon-preview {
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


.virtual-tryon-preview-img {
    max-width: 100%;
    max-height: 144px;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}

.virtual-tryon-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    width: 100%;
}

.virtual-tryon-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.virtual-tryon-prompt-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    color: #64748b;
}

.virtual-tryon-prompt-hint {
    font-family: 'Cormorant Garamond', serif;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.virtual-tryon-remove-btn {
    display: none;
    margin-top: 8px;
    padding: 6px 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Cormorant Garamond', serif;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.virtual-tryon-remove-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.virtual-tryon-question-section {
    margin-bottom: 16px;
    background: transparent !important;
    padding: 0;
}

.virtual-tryon-textarea {
    width: 100%;
    min-height: 60px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 14px;
    resize: none;
    box-sizing: border-box;
    color: #1e293b;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.virtual-tryon-textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.virtual-tryon-textarea::placeholder {
    color: #94a3b8;
    font-family: 'Cormorant Garamond', serif;
}

.virtual-tryon-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.virtual-tryon-cancel-btn {
    padding: 8.5px 17px;
    background: #f3f4f6;
    color: #475569;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cormorant Garamond', serif;
    font-size: 11.9px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.virtual-tryon-cancel-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.virtual-tryon-submit-btn {
    padding: 8.5px 17px;
    background: #8b5cf6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cormorant Garamond', serif;
    font-size: 11.9px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.virtual-tryon-submit-btn:disabled {
    background: #9ca3af;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.6;
}

.virtual-tryon-submit-btn:disabled:hover {
    background: #9ca3af;
    transform: none;
}

.virtual-tryon-submit-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

/* Virtual Try On modal - Night mode */
body:not(.day-mode) #virtualTryOnModal .virtual-tryon-modal {
    background: linear-gradient(135deg, #353535 0%, #2c2c2c 50%, #242424 100%);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.06);
}

body:not(.day-mode) #virtualTryOnModal .modal-body,
body:not(.day-mode) #virtualTryOnModal .virtual-tryon-body {
    background: transparent !important;
}

/* Only sections should be transparent, inputs keep their backgrounds */
body:not(.day-mode) .virtual-tryon-upload-section,
body:not(.day-mode) .virtual-tryon-question-section,
body:not(.day-mode) .virtual-tryon-title,
body:not(.day-mode) .virtual-tryon-description,
body:not(.day-mode) .virtual-tryon-label {
    background: transparent !important;
}

body:not(.day-mode) .virtual-tryon-title {
    /* Keep gradient text effect for night mode */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #fa709a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body:not(.day-mode) .virtual-tryon-description {
    color: #e5e7eb;
    background: transparent !important;
}

body:not(.day-mode) .virtual-tryon-label {
    color: #e5e7eb;
    background: transparent !important;
}

body:not(.day-mode) .virtual-tryon-upload-section {
    background: transparent !important;
}

body:not(.day-mode) .virtual-tryon-question-section {
    background: transparent !important;
}

body:not(.day-mode) .virtual-tryon-upload-area {
    background: #2c2c2c;
    border-color: #475569;
}

body:not(.day-mode) .virtual-tryon-upload-area:hover {
    border-color: #8b5cf6;
    background: #353535;
}

body:not(.day-mode) .virtual-tryon-prompt-text {
    color: #e5e7eb;
}

body:not(.day-mode) .virtual-tryon-prompt-hint {
    color: #9ca3af;
}

body:not(.day-mode) .virtual-tryon-textarea {
    background: #2c2c2c;
    color: #ffffff;
    border-color: #475569;
}

body:not(.day-mode) .virtual-tryon-textarea:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

body:not(.day-mode) .virtual-tryon-textarea::placeholder {
    color: #9ca3af;
    font-family: 'Cormorant Garamond', serif;
}

body:not(.day-mode) .virtual-tryon-cancel-btn {
    background: #404040;
    color: #e5e7eb;
}

body:not(.day-mode) .virtual-tryon-cancel-btn:hover {
    background: #4a4a4a;
}

body:not(.day-mode) .virtual-tryon-submit-btn {
    background: #8b5cf6;
    color: #ffffff;
}

body:not(.day-mode) .virtual-tryon-submit-btn:hover {
    background: #7c3aed;
}

/* Virtual Try On modal - Day mode */
body.day-mode #virtualTryOnModal .virtual-tryon-modal {
    background: white;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

body.day-mode .virtual-tryon-title {
    background: linear-gradient(135deg, #1e293b 0%, #475569 25%, #64748b 50%, #94a3b8 75%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.day-mode .virtual-tryon-description {
    color: #1e293b;
    background: transparent !important;
}

body.day-mode .virtual-tryon-upload-section {
    background: transparent !important;
}

body.day-mode .virtual-tryon-question-section {
    background: transparent !important;
}

body.day-mode .virtual-tryon-submit-btn:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
}

body.day-mode .virtual-tryon-submit-btn:disabled:hover {
    background: #cbd5e1;
    transform: none;
}

body.day-mode #virtualTryOnModal .modal-body,
body.day-mode #virtualTryOnModal .virtual-tryon-body {
    background: transparent !important;
}

/* Only sections should be transparent, inputs keep their backgrounds */
body.day-mode .virtual-tryon-upload-section,
body.day-mode .virtual-tryon-question-section,
body.day-mode .virtual-tryon-title,
body.day-mode .virtual-tryon-description,
body.day-mode .virtual-tryon-label {
    background: transparent !important;
}

/* Style Quiz chat messages - match main chat styles */
#styleQuizModal .user-message .message-content {
    background: transparent;
    color: white;
    box-shadow: none;
    border: none;
    border-right: 2px solid #10b981;
    font-weight: normal;
}
#styleQuizModal .ai-message .message-content {
    background: transparent;
    color: white;
    box-shadow: none;
    border-left: 2px solid #8b5cf6;
}

/* Day mode variants for quiz messages */
body.day-mode #styleQuizModal .user-message .message-content {
    background: #f1f5f9;
    color: #000000;
    border-right: 2px solid #10b981;
}
body.day-mode #styleQuizModal .ai-message .message-content {
    background: #f8fafc;
    color: #000000;
    border-left: 2px solid #8b5cf6;
}

/* Style Quiz input area - mimic main input */
#styleQuizModal .modal-body > div:last-child {
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: center;
}
#styleQuizModal #styleQuizInput {
    flex: 0 0 auto;
    width: calc(65% - 55px); /* increased ~30% from previous */
    padding: 12px 16px; /* slight increase */
    border: 1px solid #e2e8f0;
    border-right: none;
    border-radius: 30px 0 0 30px;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    min-height: 45px; /* increased ~25% */
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
}
body:not(.day-mode) #styleQuizModal #styleQuizInput {
    border-color: #475569;
}
#styleQuizModal #styleQuizInput:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
#styleQuizModal #styleQuizSend {
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    color: white;
    border: 1px solid transparent;
    border-left: none;
    padding: 0;
    border-radius: 0 30px 30px 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 45px; /* match increased input height */
    width: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#styleQuizModal #styleQuizSend:hover {
    background: linear-gradient(135deg, #5568d3 0%, #d373ea 100%);
    transform: translateY(-1px);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    color: #64748b;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    display: flex;
    height: 100%;
}

.modal-left {
    width: 45%;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.main-image-container {
    position: relative;
    flex: 1;
    margin-bottom: 16px;
}

.main-image {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border-radius: 8px;
    background: #f1f5f9;
}

/* Image Carousel Styles */
.image-carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.image-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 300px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    border-radius: 8px;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #1e293b;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.carousel-arrow-left {
    left: 16px;
}

.carousel-arrow-right {
    right: 16px;
}

.carousel-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    gap: 8px;
    z-index: 10;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.carousel-indicator.active {
    background: rgba(255, 255, 255, 1);
    border-color: #8b5cf6;
    transform: scale(1.3);
}

.modal-left .match-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.modal-left .match-percentage {
    font-size: 14px;
    line-height: 1;
}

.modal-left .match-text {
    font-size: 11px;
    line-height: 1;
}

.modal-left .favorite-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #ef4444;
}

.thumbnail-gallery {
    display: none;
}

.thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.thumbnail.active {
    border-color: #8b5cf6;
}

.modal-right {
    width: 55%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.complete-the-look-section {
    margin-top: auto;
    width: 100%;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.complete-the-look-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: stretch;
}

.recommended-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.recommended-product-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    background: #f1f5f9;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-dots::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.typing-dots {
    animation: blink 1.4s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.blinking-circles {
    display: inline-flex;
    gap: 3px;
    margin-left: 6px;
}

.blinking-circles .circle {
    color: #667eea;
    font-size: 8px;
    animation: blink-sequential 1.5s infinite;
}

.blinking-circles .c1 {
    animation-delay: 0s;
}

.blinking-circles .c2 {
    animation-delay: 0.2s;
}

.blinking-circles .c3 {
    animation-delay: 0.4s;
}

@keyframes blink-sequential {
    0%, 30% { opacity: 1; }
    31%, 100% { opacity: 0.3; }
}

.product-brand {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.modal-right .product-name {
    font-size: 16.8px; /* Reduced by 30% from 24px */
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    line-height: 1.2;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars {
    color: #fbbf24;
    font-size: 16px;
}

.rating-text {
    font-size: 14px;
    color: #64748b;
}

.modal-right .product-price {
    font-size: 16.8px; /* Reduced by 40% from 28px */
    font-weight: 700;
    color: #10b981; /* Green color */
    margin-bottom: 16px;
}

.vendor-link {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
}

.vendor-url {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.vendor-url:hover {
    text-decoration: underline;
}

.ai-insight {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insight-icon {
    font-size: 16px;
}

.insight-text {
    font-size: 14px;
    color: #166534;
    font-weight: 500;
}

.color-selector,
.size-selector {
    margin-bottom: 20px;
}

.color-selector label,
.size-selector label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.color-options {
    display: flex;
    gap: 8px;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-option.selected {
    border-color: #8b5cf6;
    transform: scale(1.1);
}

.size-options {
    display: flex;
    gap: 8px;
}

.size-btn {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
}

.size-btn.selected {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
}

.features {
    margin-bottom: 24px;
}

.features h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.features ul {
    list-style: none;
}

.features li {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
    position: relative;
    padding-left: 12px;
}

.features li:before {
    content: "•";
    color: #8b5cf6;
    position: absolute;
    left: 0;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.add-to-cart-btn {
    flex: 0 0 35%;
    background: white;
    color: #8b5cf6;
    border: 1px solid #8b5cf6;
    padding: 6px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-to-cart-btn:hover {
    background: #8b5cf6;
    color: white;
}

.visit-vendor-btn {
    flex: 0 0 35%;
    background: #8b5cf6;
    color: white;
    border: 1px solid #8b5cf6;
    padding: 6px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.visit-vendor-btn:hover {
    background: #37078b;
}

/* Toast Notification */
.toast {
    position: absolute;
    left: calc(65% - 160px); /* moved slightly left */
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
    max-width: 200px;
    border: none;
}

.toast::after {
    content: none; /* remove right arrow */
}

.toast.show {
    transform: translateY(-50%) translateX(10px);
    opacity: 1;
    visibility: visible;
}

/* Cart Page Styles */
.cart-header h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.cart-header .subheader {
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
}

.cart-actions button {
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    margin: 4px;
    min-height: 36px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-item-actions button {
    font-family: 'Cormorant Garamond', serif;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    margin: 2px;
    min-height: 28px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sidebar {
        width: 25%;
        min-width: 250px;
    }
    
    .center-panel {
        flex: 1;
    }
    
    .right-panel {
        width: 280px;
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    html, body {
        height: 100%;
        overflow: hidden;
        margin: 0;
        padding: 0;
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
    }
    
    .app-container {
        height: 100%;
        max-height: 100%;
        overflow: hidden;
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        display: flex;
        flex-direction: row;
    }
    
    .sidebar {
        width: 25%;
        min-width: 100px;
        flex-shrink: 0;
        font-size: 12px;
        padding: 0;
        border-right: none;
    }
    
    .sidebar-content {
        max-height: calc(100vh - 50px);
        overflow-y: auto;
        padding: 2px;
        border: none;
    }
    
    .session-section h3 {
        font-size: 13.2px;
        margin: 4px 0;
    }
    
    .session-title {
        font-size: 14px;
        padding: 2px 0;
    }
    
    .quick-link {
        padding: 4px 6px;
        font-size: 13.2px;
        gap: 6px;
    }
    
    /* Reduce all sidebar section headers */
    .session-section {
        margin-bottom: 6px;
    }
    
    .session-section h3 {
        font-size: 14.4px;
        padding: 2px 0;
    }
    
    .search-item, .filter-item {
        padding: 4px 6px;
        font-size: 11px;
        margin: 2px 0;
    }
    
    .delete-session-btn {
        width: 14px !important;
        height: 14px !important;
        font-size: 10px !important;
        flex-shrink: 0 !important;
        margin-left: 4px !important;
    }
    
    .search-title {
        font-size: 13.4px !important;
    }
    
    /* Reduce filter chips size */
    .filter-chip {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    /* Reduce quick refinement buttons */
    .refinement-btn,
    .sort-btn {
        padding: 4px 8px;
        font-size: 13.2px;
    }
    
    /* Right panel sizing */
    .right-panel {
        width: 60px;
        min-width: 60px;
    }
    
    .cart-icon, .favorite-icon {
        font-size: 20px;
    }
    
    .main-content {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
    }
    
    .center-panel {
        flex: 1;
        min-width: 0;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    
    .chat-container {
        padding: 2px 4px;
        height: 100%;
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        position: relative;
    }
    
    .chat-scrollable-area {
        flex: 1 1 0;
        overflow-y: auto;
        min-height: 0;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    
    .right-panel {
        width: 80px;
        min-width: 80px;
        border-left: 1px solid #e2e8f0;
        flex-shrink: 0;
    }
    
    .cart-icon {
        font-size: 24px;
    }
    
    .favorite-icon {
        font-size: 24px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 100%;
    }
    
    .product-card {
        min-height: 280px;
    }
    
    .modal-content {
        width: 95vw;
        height: 95vh;
        margin: 2.5vh auto;
    }
    
    .modal-body {
        flex-direction: column;
    }
    
    .modal-left,
    .modal-right {
        width: 100%;
    }
    
    .modal-left {
        padding-bottom: 16px;
    }
    
    .message-input-container {
        padding: 3px 4px;
        flex-shrink: 0;
        position: relative;
        z-index: 100;
        background: transparent;
        border-top: 1px solid #e2e8f0;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        min-height: 50px;
        display: flex;
        align-items: center;
    }
    
    .user-message, .ai-message {
        margin-bottom: 6px;
        max-width: 90%;
    }
    
    /* Reduce logo and banner sizes for mobile */
    .logo-oval {
        width: auto;
        min-width: 55px;
        height: 28px;
        overflow: visible;
        padding: 0 5px;
        border: none;
    }
    
    .logo-text {
        font-size: 22.78672px;
        letter-spacing: 0;
        white-space: nowrap;
    }
    
    
    .tagline {
        font-family: 'Cormorant Garamond', serif;
        font-size: 3.75px;
        margin: 1px 0 0 0;
    }
    
    .sidebar-header {
        padding: 2px 4px;
        min-height: 20px;
        border-bottom: none;
    }
    
    .sidebar-header .logo {
        padding: 0;
    }
    
    /* Ensure empty state is smaller on mobile */
    .empty-message {
        padding: 8px;
    }
    
    .empty-message h3 {
        font-family: 'Cormorant Garamond', serif;
        font-size: 12.8px;
        margin-bottom: 4px;
    }
    
    .empty-message p {
        font-family: 'Cormorant Garamond', serif;
        font-size: 11.2px;
        margin: 0;
    }
    
    /* Reduce new search button size for mobile */
    .new-search-btn-inline {
        padding: 2px 4px;
        font-size: 7px;
    }
    
    /* Reduce SMART PICKS and My Wardrobe font sizes to match Styles */
    .sidebar .refinements-section h3 {
        font-size: 8.4px;
    }
    
    .quick-links-section h3 {
        font-size: 8.4px;
    }
    
    .session-section h3 {
        font-size: 8.4px;
    }
    
    /* Sticky Banner Mobile */
    .sticky-banner {
        padding: 1px 6px;
        padding-left: 65%;
        min-height: 28px;
    }
    
    /* Theme Toggle Mobile */
    .theme-toggle-container {
        top: 4px;
        left: 4px;
    }
    
    /* Theme Toggle Mobile */
    .theme-toggle {
        width: 20px;
        height: 16px;
    }
    
    .theme-icon {
        font-size: 10px;
    }
    
    /* Toast Mobile */
    .toast {
        left: calc(65% - 160px);
        font-size: 11px;
    }
    
    .banner-link.active .banner-badge {
        top: -1px;
        right: -1px;
    }
    
    .banner-link.active {
        width: 28px;
        height: 20px;
    }
    
    /* Day Mode Mobile Active Icon Highlight */
    body.day-mode .banner-link.active {
        width: 24px;
        height: 20px;
    }
    
    body.day-mode .banner-link.active .banner-badge {
        top: -1px;
        right: -1px;
    }
    
    .banner-link {
        width: 32px;
        height: 26px;
    }
    
    .banner-icon {
        font-size: 16px;
    }
    
    .banner-badge {
        font-size: 9px;
        padding: 1px 3px;
        min-width: 10px;
        height: 10px;
        top: -1px;
        right: -1px;
        background: transparent;
        color: white !important;
    }
    
    /* Reduce badge size for mobile */
    .badge {
        font-size: 10px;
        padding: 1px 3px;
        font-weight: 700;
        font-family: 'Cormorant Garamond', serif;
        background: transparent;
        color: #e2e8f0 !important;
        position: absolute;
        top: -4px;
        right: -1px;
        min-width: 12px;
        height: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }
    
    /* Reduce message input size */
    .message-input-wrapper {
        display: flex;
        width: 100%;
        max-width: 100%;
    }
    
    .message-input {
        font-size: 13px;
        padding: 8px 12px;
        line-height: 1.3;
        height: 36px;
        min-height: 36px;
        width: calc(100% - 40px);
        border-right: none;
        border-radius: 20px 0 0 20px;
        font-family: 'Cormorant Garamond', serif;
        font-weight: 400;
    }
    
    .send-btn {
        width: 40px;
        height: 36px;
        min-height: 36px;
        font-size: 12px;
        border-radius: 0 20px 20px 0;
    }
    
    /* Reduce message content size */
    .message-content {
        font-size: 14px;
        padding: 3px 8px;
        line-height: 1.3;
    }
    
    /* Cart page mobile styles */
    .cart-header {
        padding: 8px 0;
    }
    
    .cart-header h2 {
        font-size: 14px;
    }
    
    .cart-header .subheader {
        font-size: 11px;
    }
    
    .cart-item {
        padding: 6px;
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .cart-item-info h4 {
        font-size: 11px;
        line-height: 1.2;
        margin-bottom: 2px;
    }
    
    .cart-item-info p {
        font-size: 12px;
        margin: 1px 0;
    }
    
    .cart-item-price {
        font-size: 12px;
    }
    
    /* Product cards on cart/favorites pages */
    #productGridContainer .product-card {
        min-height: 200px;
    }
    
    #productGridContainer .product-info {
        padding: 8px;
    }
    
    #productGridContainer .product-name {
        font-size: 12px;
    }
    
    #productGridContainer .product-price {
        font-size: 11px;
    }
    
    #productGridContainer .action-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    #productGridContainer .favorite-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    /* Cart page buttons */
    .cart-item-actions button {
        padding: 3px 6px;
        font-size: 12px;
        margin: 2px;
        min-height: 20px;
        line-height: 1.2;
    }
    
    .cart-actions button {
        padding: 5px 10px;
        font-size: 11px;
        margin: 3px 2px;
        min-height: 24px;
    }
    
    .product-actions button {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    /* Reduce all button font sizes on mobile */
    button {
        font-size: 11px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 5px 10px;
        font-size: 11px;
        min-height: 24px;
    }
    
    /* Force mobile styles for cart page elements */
    #productGridContainer [style*="padding: 8px 16px"] {
        padding: 4px 8px !important;
        font-size: 9px !important;
        min-height: 28px !important;
        line-height: 1.2 !important;
    }
    
    #productGridContainer [style*="padding: 8px 12px"] {
        padding: 4px 8px !important;
        font-size: 9px !important;
        min-height: 28px !important;
    }
    
    #productGridContainer [style*="font-size: 18px"] {
        font-size: 11px !important;
    }
    
    #productGridContainer [style*="font-size: 15px"] {
        font-size: 10px !important;
    }
    
    #productGridContainer [style*="font-size: 12px"] {
        font-size: 9px !important;
    }
    
    #productGridContainer [style*="font-size: 13px"] {
        font-size: 9px !important;
    }
    
    #productGridContainer [style*="font-size: 24px"] {
        font-size: 14px !important;
    }
    
    #productGridContainer [style*="font-size: 16px"] {
        font-size: 11px !important;
    }
    
    /* Reduce cart header sizes */
    #productGridContainer h2 {
        font-size: 14px !important;
    }
    
    #productGridContainer .cart-header p {
        font-size: 9px !important;
    }
    
    /* Reduce image size in cart items */
    #productGridContainer .cart-item-image {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
    }
    
    /* Reduce checkbox size */
    #productGridContainer input[type="checkbox"] {
        width: 14px !important;
        height: 14px !important;
    }
    
    /* Force smaller cart item div */
    #productGridContainer > div > div[style*="padding: 16px"] {
        padding: 8px !important;
    }
    
    #productGridContainer [style*="padding: 24px 0"] {
        padding: 12px 0 !important;
    }
    
    #productGridContainer [style*="padding: 12px"] {
        padding: 6px !important;
    }
    
    #productGridContainer [style*="padding: 16px"] {
        padding: 8px !important;
    }
    
    /* Reduce product tile sizes on mobile to match AI message width */
    .product-grid {
        max-width: 85% !important;
    }
    
    .product-card {
        width: 144px !important;
        min-height: 168px !important;
        max-width: 144px !important;
        margin: 0 !important;
        border-radius: 6px !important;
        flex-shrink: 0 !important;
    }
    
    .product-image {
        height: 108px !important;
    }
    
    .product-info {
        padding: 6px !important;
    }
    
    .product-name {
        font-size: 6px !important;
        margin-bottom: 2px !important;
    }
    
    .product-price {
        font-size: 7px !important;
    }
    
    .product-vendor {
        font-size: 5px !important;
        margin-bottom: 2px !important;
    }
    
    .action-btn {
        width: 18px !important;
        height: 18px !important;
        font-size: 10px !important;
    }
    
    .favorite-btn {
        width: 16px !important;
        height: 16px !important;
        font-size: 8px !important;
        top: 5px !important;
        left: 5px !important;
    }

    .offer-badge {
        top: 4px;
        right: 4px;
        font-size: 7px; /* reduced ~20% */
        padding: 1px 2px;
        border-radius: 8px;
    }
    
    .match-badge {
        width: 20px !important;
        height: 20px !important;
        font-size: 5px !important;
        top: 5px !important;
        right: 5px !important;
    }
    
    .match-percentage {
        font-size: 6px !important;
    }
    
    .match-text {
        font-size: 4px !important;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-container {
        padding: 16px;
    }
    
    .right-panel {
        padding: 16px;
    }
}