/* src/public/style.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    color: #7f8c8d;
}

.search-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.input-group input {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.input-group button {
    padding: 12px 24px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.input-group button:hover {
    background: #2980b9;
}

.service-selector {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.service-selector label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.hidden {
    display: none;
}

#loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.results-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #7f8c8d;
    position: relative;
}

.tab-btn.active {
    color: #3498db;
    font-weight: bold;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #3498db;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.service-results {
    margin-bottom: 30px;
}

.service-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.service-header h3 {
    margin: 0;
    color: #2c3e50;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.product-image {
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

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

.product-info {
    padding: 15px;
}

.product-name {
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 5px;
}

.original-price {
    text-decoration: line-through;
    color: #95a5a6;
    font-size: 14px;
    margin-bottom: 5px;
}

.product-details {
    display: flex;
    justify-content: space-between;
    color: #7f8c8d;
    font-size: 14px;
}

.out-of-stock {
    color: #e74c3c;
    font-weight: bold;
}

.error-message {
    color: #e74c3c;
    padding: 15px;
    background: #fadbd8;
    border-radius: 4px;
    text-align: center;
}

@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
    
    .input-group input, .input-group button {
        width: 100%;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
}