/* Reset e stili di base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* Header */
header {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.search-container {
    display: flex;
    max-width: 500px;
}

.search-container input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-container button {
    padding: 10px 15px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-container button:hover {
    background-color: #c0392b;
}

/* Main content */
main {
    display: flex;
    padding: 30px 0;
    gap: 30px;
}

/* Filters */
.filters {
    width: 250px;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    align-self: flex-start;
}

.filters h2 {
    margin-bottom: 20px;
    font-size: 1.4rem;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #34495e;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-option input[type="checkbox"] {
    cursor: pointer;
}

.filter-option label {
    cursor: pointer;
    font-size: 0.9rem;
}

.range-filter {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-inputs input {
    width: 70px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.range-filter button, .reset-button {
    padding: 8px 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem;
}

.range-filter button:hover, .reset-button:hover {
    background-color: #2980b9;
}

.reset-button {
    width: 100%;
    margin-top: 20px;
    background-color: #95a5a6;
}

.reset-button:hover {
    background-color: #7f8c8d;
}

/* Pedals grid */
.pedals-container {
    flex: 1;
}

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

.pedal-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

.pedal-image {
    height: 200px;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pedal-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pedal-info {
    padding: 15px;
}

.pedal-manufacturer {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.pedal-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.pedal-type {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.pedal-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.pedal-price {
    font-weight: bold;
    color: #e74c3c;
}

.pedal-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pedal-rating .rating-value {
    font-weight: bold;
}

.pedal-rating .rating-stars {
    color: #f1c40f;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.close:hover {
    color: #333;
}

.modal-header {
    display: flex;
    margin-bottom: 20px;
}

.modal-image {
    width: 40%;
    padding-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.modal-basic-info {
    width: 60%;
}

.modal-manufacturer {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.modal-name {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.modal-type {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.modal-price-rating {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.modal-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e74c3c;
}

.modal-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.modal-rating .rating-value {
    font-weight: bold;
    font-size: 1.2rem;
}

.modal-rating .rating-stars {
    color: #f1c40f;
    font-size: 1.2rem;
}

.modal-details {
    margin-top: 20px;
    border-top: 1px solid #ecf0f1;
    padding-top: 20px;
}

.modal-details h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 3px;
}

.detail-value {
    font-weight: 500;
}

.modal-description {
    margin-top: 20px;
    line-height: 1.7;
}

/* No results */
#no-results {
    text-align: center;
    padding: 40px 0;
    font-size: 1.1rem;
    color: #7f8c8d;
}

.hidden {
    display: none;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    main {
        flex-direction: column;
    }

    .filters {
        width: 100%;
        margin-bottom: 20px;
    }

    .modal-header {
        flex-direction: column;
    }

    .modal-image, .modal-basic-info {
        width: 100%;
    }

    .modal-image {
        margin-bottom: 20px;
        padding-right: 0;
    }

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

/* footer link */
footer a {
    color: tan;
}
footer a:hover {
    color: teal;
}
