/* Carousel Styles */
.carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
}

.carousel-track {
    display: flex;
    gap: 20px;
    will-change: transform;
    /* transition: transform 0.1s linear; Handled by JS frame-by-frame for smoothness, or use linear transition if updating less often.
       JS frame update usually sets transform directly. No CSS transition needed for that. */
}

.carousel-card {
    flex: 0 0 220px; /* "Neat size, not big, not small" */
    max-width: 220px;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    height: 340px; /* Fixed height for neatness */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.carousel-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.carousel-image-wrapper {
    position: relative;
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.carousel-info {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.carousel-title {
    font-size: 0.95rem;
    margin: 0 0 5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #333;
    flex-grow: 1;
}

.carousel-price-block {
    margin-bottom: 8px;
    margin-top: auto; /* Push to bottom of title area */
}

.carousel-price-block .price {
    font-weight: bold;
    font-size: 1rem;
}

.carousel-price-block .old-price {
    font-size: 0.8rem;
    text-decoration: line-through;
    color: #999;
    margin-right: 5px;
}

.carousel-btn {
    width: 100%;
    font-size: 0.85rem;
    padding: 8px 0;
    font-weight: 600;
    text-transform: uppercase;
}

/* Badges for carousel */
.carousel-image-wrapper .badge {
    position: absolute;
    top: 5px;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 3px;
    color: white;
    font-weight: bold;
    z-index: 2;
}

.carousel-image-wrapper .badge-sale { left: 5px; top: 5px; background: #dc3545; }
.carousel-image-wrapper .badge-hit { left: 5px; top: 30px; background: #fd7e14; }
.carousel-image-wrapper .badge-new { left: 5px; top: 55px; background: #28a745; }

@media (max-width: 576px) {
    .carousel-card {
        flex: 0 0 180px;
        max-width: 180px;
        height: 300px;
    }
    .carousel-image-wrapper {
        height: 140px;
    }
}
