/* =========================================
   Category Carousel Widget — Styles
   ========================================= */

.ccw-wrapper {
    position: relative;
    width: 100%;
}

.ccw-carousel-outer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ccw-carousel-outer .ccw-swiper {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.ccw-swiper .swiper-wrapper {
    align-items: stretch;
}

/* =========================================
   Card Item
   ========================================= */
.ccw-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    padding: 10px 8px;
    transition: transform 0.2s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ccw-item:hover {
    transform: translateY(-2px);
}

/* =========================================
   Image Wrap — base
   ========================================= */
.ccw-item-image-wrap {
    width: 120px;
    height: 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    flex-shrink: 0;
    transition: box-shadow 0.2s ease;
}

.ccw-item-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================================
   Shape modifiers
   ========================================= */

/* Circle */
.ccw-shape-circle .ccw-item-image-wrap {
    border-radius: 50%;
}

/* Square — no radius */
.ccw-shape-square .ccw-item-image-wrap {
    border-radius: 0;
}

/* Rounded rectangle — radius set via Elementor slider */
.ccw-shape-rounded .ccw-item-image-wrap {
    border-radius: 16px; /* fallback; overridden by Elementor */
}

/* Plain rectangle — no radius, different aspect ratio by default */
.ccw-shape-rect .ccw-item-image-wrap {
    border-radius: 0;
}

/* =========================================
   No-image placeholder
   ========================================= */
.ccw-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
}

.ccw-no-image svg {
    width: 38%;
    height: 38%;
    color: #bbb;
}

/* =========================================
   Title
   ========================================= */
.ccw-item-title {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
    transition: color 0.2s ease;
}

/* =========================================
   Navigation Buttons
   ========================================= */
.ccw-btn-prev,
.ccw-btn-next {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #333;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    color: #333;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.ccw-btn-prev svg,
.ccw-btn-next svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    pointer-events: none;
}

.ccw-btn-prev:hover,
.ccw-btn-next:hover {
    background: #333;
    color: #fff;
}

.ccw-btn-prev.swiper-button-disabled,
.ccw-btn-next.swiper-button-disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* =========================================
   Pagination
   ========================================= */
.ccw-pagination {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.ccw-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    opacity: 1;
    cursor: pointer;
    transition: background 0.2s, width 0.2s;
    display: inline-block;
}

.ccw-pagination .swiper-pagination-bullet-active {
    background: #333;
    width: 20px;
    border-radius: 4px;
}

/* =========================================
   Mobile
   ========================================= */
@media (max-width: 767px) {
    .ccw-btn-prev,
    .ccw-btn-next {
        width: 30px;
        height: 30px;
    }

    .ccw-btn-prev svg,
    .ccw-btn-next svg {
        width: 14px;
        height: 14px;
    }

    .ccw-item-title {
        font-size: 12px;
    }
}
