/* ==========================================================================
   WC Product Category Slider - Frontend Styles
   Matching screenshot design: circular pink backgrounds, centered images,
   category names below, and pink arrow navigation buttons.
   ========================================================================== */

/* Loading State — hide slider content until JS initializes to prevent layout shift */
.wccs-wrapper:not(.wccs-initialized) .wccs-slider-container {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wccs-wrapper:not(.wccs-initialized) .wccs-slider-viewport {
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

.wccs-wrapper:not(.wccs-initialized) .wccs-arrow {
    visibility: hidden;
}

.wccs-wrapper:not(.wccs-initialized) .wccs-slider-container::after {
    content: '';
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--wccs-arrow-color, #e91e63);
    border-radius: 50%;
    animation: wccs-spin 0.7s linear infinite;
    position: absolute;
}

@keyframes wccs-spin {
    to { transform: rotate(360deg); }
}

/* Fade-in when initialized */
.wccs-wrapper.wccs-initialized .wccs-slider-viewport {
    animation: wccs-fadeIn 0.3s ease;
}

.wccs-wrapper.wccs-initialized .wccs-arrow {
    animation: wccs-fadeIn 0.3s ease;
}

@keyframes wccs-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Wrapper */
.wccs-wrapper {
    width: 100%;
    margin: 40px auto;
    padding: 0 15px;
    box-sizing: border-box;
    position: relative;
}

/* Title */
.wccs-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--wccs-text-color, #333);
    margin: 0 0 30px;
    letter-spacing: -0.3px;
}

/* Slider Container */
.wccs-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Viewport - hides overflow */
.wccs-slider-viewport {
    overflow: hidden;
    flex: 1;
    position: relative;
}

/* Track - flex row of slides */
.wccs-slider-track {
    display: flex;
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
    transition-duration: var(--wccs-transition-speed, 400ms);
    will-change: transform;
}

/* Individual Slide */
.wccs-slide {
    flex: 0 0 calc(100% / var(--wccs-items-desktop, 5));
    padding: 0 calc(var(--wccs-gap, 20px) / 2);
    box-sizing: border-box;
    min-width: 0;
}

/* Slide Link / Container */
/* Slide Link / Container */
.wccs-slide-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    color: inherit;
    cursor: pointer;
    border-bottom: none !important;
    box-shadow: none !important;
    transform: none !important;
}

a.wccs-slide-link,
a.wccs-slide-link:link,
a.wccs-slide-link:visited,
a.wccs-slide-link:hover,
a.wccs-slide-link:focus,
a.wccs-slide-link:active {
    text-decoration: none !important;
    color: inherit !important;
    border-bottom: none !important;
    box-shadow: none !important;
    outline: none !important;
    background-image: none !important;
    transform: none !important;
}

/* Circle Container — adaptive: fills available slide width */
.wccs-circle {
    width: 75%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 12px;
    border: none;
    position: relative;
    box-shadow: none !important;
}

/* Circle Background visible only when enabled from settings */
.wccs-has-circle .wccs-circle {
    background-color: var(--wccs-circle-bg, #fce4ec);
    border: var(--wccs-circle-border, 0px) solid var(--wccs-circle-border-color, #f8bbd0);
}

.wccs-slide-link:hover .wccs-circle,
.wccs-has-circle .wccs-slide-link:hover .wccs-circle {
    box-shadow: none !important;
}

/* Square shape variant */
.wccs-shape-square .wccs-circle {
    border-radius: 12px;
}

.wccs-shape-square .wccs-category-image {
    border-radius: 12px;
}

/* Category Image - Always 1:1 square with cover fit */
.wccs-category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: block;
    transform: none !important;
}

.wccs-slide-link:hover .wccs-category-image {
    transform: none !important;
}
.wccs-category-name {
    font-size: var(--wccs-font-size, 14px);
    font-weight: var(--wccs-font-weight, 600);
    color: var(--wccs-text-color, #333);
    text-align: center;
    line-height: 1.4;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    background-image: none !important;
}

/* Navigation Arrows */
.wccs-arrow {
    width: var(--wccs-arrow-size, 44px);
    height: var(--wccs-arrow-size, 44px);
    min-width: var(--wccs-arrow-size, 44px);
    border-radius: 50%;
    background-color: var(--wccs-arrow-color, #e91e63);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
    padding: 0;
    outline: none;
    z-index: 2;
    flex-shrink: 0;
}

.wccs-arrow:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(233, 30, 99, 0.4);
}

.wccs-arrow:active {
    transform: scale(0.95);
}

.wccs-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.wccs-arrow svg {
    width: calc(var(--wccs-arrow-size, 30px) * 0.45);
    height: calc(var(--wccs-arrow-size, 30px) * 0.45);
    stroke: #fff;
    fill: none;
    display: block;
}

/* Touch/Swipe Support */
.wccs-slider-viewport.wccs-grabbing {
    cursor: grabbing;
}

.wccs-slider-viewport.wccs-grabbing .wccs-slider-track {
    transition-duration: 0ms !important;
}

/* No Categories Message */
.wccs-no-categories {
    text-align: center;
    color: #999;
    font-size: 16px;
    padding: 40px 20px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablet: 600px - 1023px */
@media screen and (max-width: 1023px) {
    .wccs-slide {
        flex: 0 0 calc(100% / var(--wccs-items-tablet, 3));
    }

    .wccs-wrapper {
        margin: 30px auto;
    }

    .wccs-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
}

/* Mobile: < 600px */
@media screen and (max-width: 599px) {
    .wccs-slide {
        flex: 0 0 calc(100% / var(--wccs-items-mobile, 2));
    }

    .wccs-wrapper {
        margin: 20px auto;
        padding: 0 10px;
    }

    .wccs-title {
        font-size: 20px;
        margin-bottom: 18px;
    }

    .wccs-slider-container {
        gap: 6px;
    }

    .wccs-category-name {
        font-size: calc(var(--wccs-font-size, 14px) * 0.9);
    }

    .wccs-circle {
        margin-bottom: 8px;
    }
}

/* Small Mobile: < 400px */
@media screen and (max-width: 399px) {
    .wccs-category-name {
        font-size: 12px;
    }
}

/* Print Styles */
@media print {
    .wccs-arrow {
        display: none !important;
    }

    .wccs-slider-track {
        transform: none !important;
        flex-wrap: wrap;
    }

    .wccs-slide {
        flex: 0 0 20%;
    }
}
