/* AI Commerce Hub - Custom Styles */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --xpndai-color: #fbbf24;
    --xpndai-dark: #f59e0b;
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* XPNDAI Demo Styles */
.xpndai-demo-banner {
    border-bottom: 3px solid var(--xpndai-color);
    position: relative;
    overflow: hidden;
}

.xpndai-demo-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.xpndai-feature-card {
    background: white;
    border-radius: 12px;
    border: 2px solid #f3f4f6;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.xpndai-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--xpndai-color), var(--xpndai-dark));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.xpndai-feature-card:hover::before {
    transform: scaleX(1);
}

.xpndai-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(251, 191, 36, 0.15);
    border-color: var(--xpndai-color);
}

.xpndai-demo-info {
    border: 2px solid var(--xpndai-color);
    position: relative;
}

.xpndai-demo-info::before {
    content: 'DEMO';
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--xpndai-color);
    color: #1f2937;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
}

/* Enhanced Badge Styles */
.badge.bg-warning {
    background-color: var(--xpndai-color) !important;
    color: #1f2937 !important;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
}

.main-content {
    margin-top: 76px; /* Account for fixed navbar */
    min-height: calc(100vh - 200px);
}

/* Voice Assistant Widget Styles */
.voice-assistant-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 10px;
}

/* Hide ElevenLabs branding */
elevenlabs-convai::part(powered-by),
elevenlabs-convai::part(branding),
elevenlabs-convai [data-testid*="powered"],
elevenlabs-convai [data-testid*="branding"],
elevenlabs-convai .powered-by,
elevenlabs-convai .branding {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
}

.voice-trigger-btn {
    transition: all 0.3s ease;
}

.voice-trigger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Navigation Styles */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-bg);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.min-vh-50 {
    min-height: 50vh;
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon i {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon i {
    transform: scale(1.1);
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.price {
    font-size: 1.25rem;
    color: var(--primary-color) !important;
}

/* Product Detail Page */
.product-detail-image img {
    max-height: 500px;
    width: 100%;
    object-fit: cover;
}

.feature-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.feature-item:hover {
    background-color: #f1f5f9 !important;
    border-color: var(--primary-color);
}

/* Cart Styles */
.cart-item {
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.quantity-controls input {
    max-width: 80px;
}

.cart-summary {
    border: 1px solid #e2e8f0;
}

.summary-line {
    padding: 0.5rem 0;
}

.summary-total {
    padding: 1rem 0;
    font-size: 1.1rem;
}

/* Category Filter */
.category-filter .btn {
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-filter .btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-width: 2px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Voice CTA Styles */
.voice-cta, .voice-assistant-cart {
    border: 2px dashed #e2e8f0;
    transition: all 0.3s ease;
}

.voice-cta:hover, .voice-assistant-cart:hover {
    border-color: var(--primary-color);
    background-color: #f8fafc;
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Empty States */
.empty-cart {
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 2rem 0;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .voice-assistant-widget {
        bottom: 10px;
        right: 10px;
        padding: 8px;
    }
    
    .cart-item .row > div {
        margin-bottom: 1rem;
    }
    
    .cart-item .text-end {
        text-align: start !important;
    }
}

@media (max-width: 576px) {
    .hero-section .btn {
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    border-color: var(--primary-color);
}

/* Print Styles */
@media print {
    .navbar,
    .voice-assistant-widget,
    .voice-cta,
    .voice-assistant-cart {
        display: none !important;
    }
}