/* Reset viewport spacing */
* {
    box-sizing: border-box;
}

html {
    scrollbar-gutter: stable;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #fde2dc;
    color: #222;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    gap: 24px;
}

/* Carousel images */
.carousel-slide {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Carousel layout */
.carousel {
    width: calc(100% - 48px);
    max-width: 1900px;
    margin: 0 auto;
    position: relative;
    padding: 0 24px;
    box-sizing: border-box;
    flex: 0 0 auto;
    max-height: 350px;
}

.carousel-inner {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #ddd;
}

.carousel-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 350px;
    max-height: 350px;
    opacity: 0.4;
    z-index: 5;
    pointer-events: none;
}

.carousel-slides {
    position: relative;
}

.carousel-slide {
    display: none;
    min-height: 320px;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    display: flex;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 30;
}

.carousel-btn.prev {
    left: 12px;
}

.carousel-btn.next {
    right: 12px;
}

.carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.carousel-indicators span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.carousel-indicators span.active {
    background: #fff;
}

/* Cards container */
.main-content-wrapper {
    width: calc(100% - 48px);
    max-width: 1900px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    padding: 0 24px;
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.filters-container {
    width: 30%;
    background: #000;
    border-radius: 8px;
    padding: 20px;
    flex-shrink: 0;
    overflow-y: auto;
    max-height: 25vh;
    text-align: center;
}

.filters-container h3 {
    color: #fff;
    margin: 0 0 20px 0;
    padding: 8px 0;
}

.filter-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    justify-items: start;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    background: transparent;
    padding: 0;
    border: none;
    cursor: pointer;
    font-weight: 500;
    justify-content: flex-start;
    text-align: left;
}

.filter-option input[type="radio"] {
    accent-color: #000;
}

.filter-option:first-child {
    grid-column: auto;
}

/* Cards container */
.cards-container {
    width: 70%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    overflow-y: auto;
    scrollbar-gutter: stable;
    align-content: start;
}

.card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.card-image {
    background: #ccc;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-bottom: 12px;
    color: #666;
    font-weight: bold;
    overflow: hidden;
}

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

.card-image-link {
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.card-image-link:hover .card-image {
    opacity: 0.8;
    transform: scale(1.05);
}

.card h3 {
    margin: 8px 0;
    font-size: 18px;
}

.card p {
    color: #666;
    font-size: 14px;
    margin: 8px 0 12px;
}

.card .price {
    font-weight: bold;
    font-size: 16px;
    color: #27ae60;
}

.card a.btn {
    display: inline-block;
    text-decoration: none;
}

.btn {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background: #0056b3;
}

.link-dettagli {
    color: #007bff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 550;
    cursor: pointer;
    transition: color 0.3s ease;
    display: block;
    text-align: left;
    margin-top: 10px;
}

.link-dettagli:hover {
    color: #0056b3;
    text-decoration: underline;
}
