/* Range Preisvergleich - Stylesheet */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2c5f2d;
    --primary-dark: #1a3a1b;
    --accent: #ff6b35;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --border: #dddddd;
    --success: #28a745;
    --shadow: rgba(0,0,0,0.1);
}

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

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

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

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

/* Header */
header {
    background: var(--primary);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 2px 8px var(--shadow);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

header h1 a {
    color: white;
    text-decoration: none;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Search Box */
.search-box {
    background: white;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
}

.search-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
}

@media (max-width: 768px) {
    .search-row {
        grid-template-columns: 1fr;
    }
}

.search-input,
.filter-select {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
}

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

/* Buttons */
.btn,
.btn-search {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: inline-block;
    text-align: center;
    transition: background 0.2s;
}

.btn:hover,
.btn-search:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: #e55a2b;
}

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

.product-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px var(--shadow);
}

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

.product-image-placeholder {
    width: 100%;
    height: 200px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.category {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.badge-best {
    background: var(--success);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.price-range {
    font-size: 1.5rem;
    color: var(--accent);
    margin: 1rem 0;
}

.shop-count {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.no-price {
    color: var(--text-light);
    font-style: italic;
    margin: 1rem 0;
}

/* Product Detail */
.product-detail {
    background: white;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
}

.product-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .product-header {
        grid-template-columns: 1fr;
    }
}

.product-image-large {
    width: 100%;
    border-radius: 8px;
}

.product-image-placeholder-large {
    width: 100%;
    height: 300px;
    background: var(--bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
}

.product-meta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.product-meta p {
    margin-bottom: 0.5rem;
}

.description {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg);
    border-radius: 4px;
}

.ean {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Price Table */
.price-table {
    margin: 1.5rem 0;
}

.price-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
    border-radius: 4px;
    align-items: center;
}

@media (max-width: 768px) {
    .price-row {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.price-row.best-price {
    background: #f0f9f0;
    border-color: var(--success);
}

.price-shop strong {
    font-size: 1.1rem;
}

.price-amount strong {
    font-size: 1.5rem;
    color: var(--accent);
}

.last-updated {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 8px;
    margin: 2rem 0;
}

/* Footer */
footer {
    background: var(--text);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

footer a {
    color: white;
}

footer a:hover {
    color: var(--accent);
}

/* Admin Styles */
.admin-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 20px;
}

.admin-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

table th {
    background: var(--bg);
    font-weight: 600;
}

table tr:hover {
    background: var(--bg);
}

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

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}
