/* =============================================
   Custom Carousel — custom-carousel.css
   3 slides visible · smooth CSS transitions
============================================= */

/* ---- wrapper ---- */
.cc-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 0 32px;
    font-family: inherit;
}

/* ---- viewport (clips the track) ---- */
.cc-viewport {
    overflow: hidden;
    width: 100%;
    flex: 1;
}

/* ---- sliding track ---- */
.cc-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.45, 0.05, 0.25, 1);
    will-change: transform;
}

/* ---- individual slide ---- */
.cc-slide {
    /* 3 per row with 16px gutters */
    flex: 0 0 calc(33.333% - 11px);
    margin-right: 16px;
    box-sizing: border-box;
}
.cc-slide:last-child { margin-right: 0; }

/* ---- card ---- */
.cc-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.cc-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.16);
    transform: translateY(-3px);
}

/* ---- image ---- */
.cc-card__img-wrap {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #f0f0f0;
}
.cc-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.cc-card:hover .cc-card__img-wrap img {
    transform: scale(1.04);
}

/* ---- caption ---- */
.cc-card__body {
    padding: 16px 18px 18px;
}
.cc-card__title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}
.cc-card__desc {
    margin: 0;
    font-size: 0.875rem;
    color: #555;
    line-height: 1.5;
}

/* ---- nav buttons ---- */
.cc-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #1a1a2e;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s, transform 0.2s, opacity 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.cc-btn svg {
    width: 20px;
    height: 20px;
}
.cc-btn:hover {
    background: #e63946;
    transform: scale(1.08);
}
.cc-btn:active { transform: scale(0.96); }
.cc-btn:disabled,
.cc-btn[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}
.cc-btn--prev { margin-right: 12px; }
.cc-btn--next { margin-left: 12px; }

/* ---- dot indicators ---- */
.cc-dots {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.cc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    border: none;
    padding: 0;
}
.cc-dot.is-active {
    background: #1a1a2e;
    transform: scale(1.3);
}

/* ---- drag cursor ---- */
.cc-viewport       { cursor: grab; user-select: none; }
.cc-is-dragging .cc-viewport { cursor: grabbing; }
.cc-is-dragging .cc-card     { pointer-events: none; }


@media (max-width: 900px) {
    .cc-slide {
        flex: 0 0 calc(50% - 8px);
    }
}
@media (max-width: 580px) {
    .cc-slide {
        flex: 0 0 100%;
        margin-right: 0;
    }
    .cc-btn {
        width: 36px;
        height: 36px;
    }
}
