/* Robot Tools Search Engine - Styles */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --border: #e2e8f0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

header .subtitle {
    color: var(--secondary);
    font-size: 1.1rem;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--secondary);
    font-size: 0.9rem;
}

/* Search Form */
.search-form {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.search-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-row {
    display: flex;
    gap: 1rem;
}

.filter-select {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Results */
.results {
    margin-top: 2rem;
}

.results h2 {
    margin-bottom: 1rem;
    color: var(--dark);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--secondary);
    background: white;
    border-radius: 12px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.product-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.product-manufacturer {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

.product-category {
    font-size: 0.75rem;
    background: var(--light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--secondary);
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.product-model {
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.product-spec {
    font-size: 0.85rem;
    color: var(--secondary);
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success);
    margin-top: 0.75rem;
}

.product-availability {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-availability.in_stock {
    background: #dcfce7;
    color: #166534;
}

.product-availability.limited {
    background: #fef3c7;
    color: #92400e;
}

.product-availability.out_of_stock {
    background: #fee2e2;
    color: #991b1b;
}

.product-availability.discontinued {
    background: #f3f4f6;
    color: #6b7280;
}

.product-availability.unknown {
    background: #f3f4f6;
    color: #6b7280;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert code {
    background: rgba(0,0,0,0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Footer */
footer {
    margin-top: 3rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--secondary);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .stats-bar {
        gap: 1.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .search-row {
        flex-direction: column;
    }

    .filter-row {
        flex-direction: column;
    }
}
