/**
 * CC Related Products Module
 * Frontend styles for related products display
 *
 * @author Carlos Casado
 * @copyright Carlos Casado
 * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0
 */

/* Section */
.cc-relatedproducts {
    margin: 2.5rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e9ecef;
}

/* Title */
.cc-relatedproducts__title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    color: #232323;
    text-align: center;
}

/* Carousel Wrapper */
.cc-relatedproducts__carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Carousel Container */
.cc-relatedproducts__carousel {
    overflow: hidden;
    flex: 1;
    position: relative;
}

/* Track */
.cc-relatedproducts__track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    gap: 1rem;
}

/* Slide */
.cc-relatedproducts__slide {
    flex: 0 0 calc(25% - 0.75rem);
    min-width: 0;
}

/* Navigation Buttons */
.cc-relatedproducts__nav {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #f8f9fa;
    color: #232323;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cc-relatedproducts__nav:hover {
    background: #232323;
    color: #fff;
    transform: scale(1.05);
}

.cc-relatedproducts__nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.cc-relatedproducts__nav svg {
    width: 20px;
    height: 20px;
}

/* Dots Navigation */
.cc-relatedproducts__dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.cc-relatedproducts__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dee2e6;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.cc-relatedproducts__dot:hover {
    background: #adb5bd;
}

.cc-relatedproducts__dot.active {
    background: #232323;
    transform: scale(1.2);
}

/* Grid Mode */
.cc-relatedproducts__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.cc-relatedproducts__item {
    min-width: 0;
}

/* Product Card Enhancements */
.cc-relatedproducts .product-miniature {
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cc-relatedproducts .product-miniature:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 1199px) {
    .cc-relatedproducts__slide {
        flex: 0 0 calc(33.333% - 0.67rem);
    }

    .cc-relatedproducts__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .cc-relatedproducts__slide {
        flex: 0 0 calc(50% - 0.5rem);
    }

    .cc-relatedproducts__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cc-relatedproducts__nav {
        width: 38px;
        height: 38px;
    }

    .cc-relatedproducts__nav svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 575px) {
    .cc-relatedproducts {
        margin: 1.5rem 0;
        padding: 1.5rem 0;
    }

    .cc-relatedproducts__title {
        font-size: 1.25rem;
    }

    .cc-relatedproducts__slide {
        flex: 0 0 calc(100% - 0rem);
    }

    .cc-relatedproducts__grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .cc-relatedproducts__nav {
        width: 34px;
        height: 34px;
    }

    .cc-relatedproducts__carousel-wrapper {
        gap: 0.25rem;
    }
}