/* =============================================
   WooCommerce Category Slider v5 – slider.css
   ============================================= */

/* ---- Sticky container — breaks out of any theme wrapper ---- */
.wcs-sticky-wrap {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 8px 0 4px;

    /* Full viewport width regardless of parent container */
    width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box;

    /* Break out of centered/padded theme containers */
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    left: 0;
    right: 0;

    animation: wcsFadeIn 0.3s ease both;
}

.wcs-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

/* ---- Bar: full-width single row ---- */
.wcs-bar {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* ---- The single scrollable track ---- */
.wcs-track {
    display: flex;
    align-items: flex-start; /* tops aligned; chevron uses margin trick */
    gap: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 6px 36px 10px;
    width: 100%;
    box-sizing: border-box;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    /* RTL: inherit page direction */
    direction: inherit;
}
.wcs-track::-webkit-scrollbar { display: none; }
.wcs-track.is-dragging { cursor: grabbing; scroll-behavior: auto; }

/* ============================================================
   CHEVRON  — vertically centred at circle mid
   ============================================================ */
.wcs-chevron {
    flex-shrink: 0;
    color: #bbb;
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    padding: 0 3px;
    user-select: none;
    /* align with circle centre: circle height ÷ 2 minus half icon height */
    margin-top: 20px; /* (54px circle / 2) - (20px font / 2) ≈ 17px, +3 visual tweak */
    align-self: flex-start;
}

/* ============================================================
   SEPARATOR between breadcrumb and subcats
   ============================================================ */
.wcs-sep {
    flex-shrink: 0;
    width: 1px;
    height: 54px;
    background: #e0e0e0;
    margin: 0 10px;
    margin-top: 6px; /* align with circle top */
    align-self: flex-start;
}

/* ============================================================
   BREADCRUMB ITEMS  (purple tint)
   ============================================================ */
.wcs-bc-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none !important;
    flex-shrink: 0;
    width: 68px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    padding: 0 4px;
    border-radius: 10px;
    transition: opacity 0.15s;
}
.wcs-bc-item:hover  { opacity: 0.8; }
.wcs-bc-item:active { opacity: 0.6; }

.wcs-bc-thumb {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #96588a, #7a4570);
    border: 2.5px solid #96588a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: box-shadow 0.2s;
}
.wcs-bc-thumb img  { width: 100%; height: 100%; object-fit: cover; }
.wcs-bc-thumb span {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    line-height: 1;
}

/* current step: glow ring */
.wcs-bc-item.wcs-bc-current .wcs-bc-thumb {
    box-shadow: 0 0 0 3px rgba(150,88,138,0.3);
}
.wcs-bc-item.wcs-bc-current .wcs-bc-label {
    font-weight: 800;
    color: #96588a;
}

.wcs-bc-label {
    font-size: 11px;
    font-weight: 600;
    color: #7a4570;
    text-align: center;
    line-height: 1.3;
    width: 100%;
    /* 2 lines max */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em; /* reserve 2-line space so all items align */
}

/* ============================================================
   REGULAR SUBCATEGORY ITEMS
   ============================================================ */
.wcs-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none !important;
    color: #333;
    flex: 0 0 auto;
    width: 68px;
    position: relative;
    transition: transform 0.15s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: rgba(150,88,138,0.15);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
    padding: 0 4px;
}
.wcs-item:hover  { transform: translateY(-2px); opacity: 0.85; }
.wcs-item:active { transform: scale(0.95); opacity: 0.7; }

.wcs-thumb {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f0;
    border: 2.5px solid #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
    flex-shrink: 0;
}
.wcs-item:hover .wcs-thumb { border-color: #96588a; }
.wcs-thumb img { width: 100%; height: 100%; object-fit: cover; }

.wcs-placeholder {
    font-size: 20px;
    font-weight: 700;
    color: #96588a;
    text-transform: uppercase;
    line-height: 1;
}

.wcs-label {
    font-size: 11px;
    font-weight: 500;
    color: #555;
    text-align: center;
    line-height: 1.3;
    width: 100%;
    /* 2 lines max */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.wcs-count {
    position: absolute;
    top: 0;
    right: 2px;
    background: #96588a;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50px;
    padding: 1px 4px;
    line-height: 1.6;
}

/* ============================================================
   SCROLL ARROWS
   ============================================================ */
.wcs-wrapper .wcs-arrow {
    position: absolute !important;
    top: 27px !important;      /* circle centre: padding-top(6) + circle(54)/2 = 33 → fine-tune */
    transform: translateY(-50%) !important;
    bottom: auto !important;
    margin: 0 !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 0 !important;
    z-index: 10 !important;
    border-radius: 50% !important;
    border: 1px solid #ddd !important;
    background: rgba(255,255,255,0.97) !important;
    box-shadow: 0 1px 6px rgba(0,0,0,0.13) !important;
    cursor: pointer !important;
    font-size: 18px !important;
    color: #666 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    transition: background 0.2s, color 0.2s, opacity 0.2s !important;
    float: none !important;
}
.wcs-wrapper .wcs-arrow-left  { left: 2px !important;  right: auto !important; }
.wcs-wrapper .wcs-arrow-right { right: 2px !important; left: auto !important; }

/* RTL: flip arrows */
[dir="rtl"] .wcs-wrapper .wcs-arrow-left  { right: 2px !important; left: auto !important; }
[dir="rtl"] .wcs-wrapper .wcs-arrow-right { left: 2px !important;  right: auto !important; }

.wcs-wrapper .wcs-arrow:hover {
    background: #96588a !important;
    color: #fff !important;
    border-color: #96588a !important;
}
.wcs-wrapper .wcs-arrow.wcs-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* edge fades */
.wcs-bar::before,
.wcs-bar::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 42px;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.2s;
}
.wcs-bar::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1) 30%, transparent);
}
.wcs-bar::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1) 30%, transparent);
}
[dir="rtl"] .wcs-bar::before {
    left: auto; right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1) 30%, transparent);
}
[dir="rtl"] .wcs-bar::after {
    right: auto; left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1) 30%, transparent);
}
.wcs-bar.wcs-at-start::before { opacity: 0; }
.wcs-bar.wcs-at-end::after    { opacity: 0; }

/* touch screens: no arrows needed */
@media (hover: none) and (pointer: coarse) {
    .wcs-wrapper .wcs-arrow { display: none !important; }
    .wcs-track { padding-left: 8px !important; padding-right: 8px !important; cursor: default; }
    .wcs-bar::before, .wcs-bar::after { display: none; }
}

/* ---- animation ---- */
@keyframes wcsFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- responsive ---- */
@media (max-width: 480px) {
    .wcs-bc-thumb, .wcs-thumb { width: 46px; height: 46px; }
    .wcs-bc-thumb span, .wcs-placeholder { font-size: 17px; }
    .wcs-bc-label, .wcs-label { font-size: 10px; }
    .wcs-bc-item, .wcs-item { width: 58px; }
    .wcs-chevron { font-size: 16px; margin-top: 16px; }
    .wcs-sep { height: 46px; }
    .wcs-wrapper .wcs-arrow { top: 23px !important; }
}
