* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.9;
}

.cart-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1rem;
    user-select: none;
}

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

/* Shopping Cart Sidebar */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    background: #667eea;
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.empty-cart {
    text-align: center;
    color: #999;
    padding: 3rem 1rem;
}

.cart-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.cart-item-info h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: #667eea;
    font-weight: 600;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.cart-item-controls button {
    background: #667eea;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
}

.cart-item-controls button:hover {
    background: #5568d3;
}

.cart-item-controls .remove-btn {
    background: #e74c3c;
    margin-left: auto;
}

.cart-item-controls .remove-btn:hover {
    background: #c0392b;
}

.cart-item-controls span {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.cart-footer {
    border-top: 2px solid #eee;
    padding: 1.5rem;
}

.cart-total {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* Main Content */
main {
    padding: 2rem 0;
}

.hero {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.hero h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.hero p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.demo-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature {
    background: #f0f3ff;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    color: #667eea;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Example Queries */
.try-examples {
    margin-top: 2rem;
}

.examples-title {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1rem;
    font-weight: 600;
}

.example-queries {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.example-chip {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.example-chip:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Categories Section */
.categories {
    margin-bottom: 3rem;
}

.categories h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.category-card.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.category-card h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: inherit;
}

.category-card p {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0;
}

.category-card.active p {
    opacity: 0.95;
}

/* Products Section */
.products {
    margin-bottom: 2rem;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.products h3, .products-header h3 {
    font-size: 1.8rem;
    color: #333;
    margin: 0;
}

.clear-filter {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #999;
    font-size: 1.1rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

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

.product-card.highlight {
    animation: highlight-pulse 2s;
}

@keyframes highlight-pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
    50% { box-shadow: 0 0 30px rgba(102, 126, 234, 0.8); transform: scale(1.02); }
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1.25rem;
}

.product-category {
    display: inline-block;
    background: #f0f3ff;
    color: #667eea;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
    height: 2.4em;
    overflow: hidden;
}

.price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    height: 3em;
    overflow: hidden;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #f0f3ff;
}

/* Product Detail Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    position: relative;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
}

.close-modal:hover {
    color: #000;
}

.product-detail {
    padding: 2rem;
    text-align: center;
}

.product-detail img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.product-detail h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.detail-category {
    display: inline-block;
    background: #f0f3ff;
    color: #667eea;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1rem;
}

.detail-description {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: #333;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 3000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer p {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .category-card {
        padding: 1rem 0.5rem;
    }

    .category-icon {
        font-size: 2rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .demo-features {
        flex-direction: column;
        gap: 0.5rem;
    }

    .example-queries {
        flex-direction: column;
    }

    .example-chip {
        width: 100%;
        text-align: center;
    }

    .products-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .cart-sidebar.open {
        right: 0;
    }
}
