/**
 * WC Category Carousel - Frontend Styles
 * Layout tipo vitrina: menu lateral + carrusel de categorias enlazables.
 */

.wc-category-showcase {
    --wc-carousel-accent: #d98a16;
    --wc-carousel-text: #111111;
    --wc-carousel-muted: #777777;
    --wc-carousel-line: #8e8e8e;
    --wc-carousel-card-radius: 4px;
    display: grid;
    grid-template-columns: minmax(180px, 212px) minmax(0, 1fr);
    gap: 32px;
    align-items: stretch;
    width: 100%;
}

.wc-category-showcase.no-sidebar {
    grid-template-columns: minmax(0, 1fr);
}

.wc-category-sidebar {
    align-self: stretch;
    min-height: 290px;
    padding: 18px 20px 16px;
    background: #ffffff;
    border: 1px solid #858585;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.wc-category-sidebar h3 {
    margin: 0 0 14px;
    color: #000000;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.15;
}

.wc-category-nav {
    display: flex;
    flex-direction: column;
}

.wc-category-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 53px;
    color: #111111;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    border-bottom: 1px solid var(--wc-carousel-line);
    transition: color 180ms ease, transform 180ms ease;
}

.wc-category-nav-link:hover,
.wc-category-nav-link:focus {
    color: var(--wc-carousel-accent);
    transform: translateX(3px);
    outline: none;
}

.wc-category-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    min-width: 20px;
    color: var(--wc-carousel-accent);
    font-size: 17px;
    line-height: 1;
}

.wc-category-nav-icon svg,
.wc-category-nav-icon i {
    display: block;
    width: 1em;
    height: 1em;
}

.wc-category-icon-dot {
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 999px;
}

.wc-carousel-container {
    position: relative;
    min-width: 0;
    width: 100%;
    background: transparent;
}

.wc-swiper-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 0 0 34px;
}

.wc-swiper-carousel .swiper-wrapper {
    align-items: stretch;
}

.wc-swiper-carousel .swiper-slide {
    display: flex;
    justify-content: center;
    height: auto;
    background: transparent;
    width: auto !important;
    flex: 0 0 auto !important;
    min-width: auto !important;
}

.carousel-slide-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 260px;
    height: 100%;
    color: var(--wc-carousel-text);
    text-align: center;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

.carousel-image-frame {
    display: block;
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #f4f4f4;
    border-radius: var(--wc-carousel-card-radius);
}

.wc-category-showcase .carousel-image {
    display: block;
    width: 100%;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: center;
    border: 0;
    -webkit-user-drag: none;
    user-select: none;
    transform: scale(1);
    transition: transform 260ms ease, filter 260ms ease;
}

.carousel-category-title {
    display: block;
    margin-top: 14px;
    color: var(--wc-carousel-accent);
    font-size: 14px;
    text-transform: uppercase;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.carousel-slide-link:hover .carousel-image,
.carousel-slide-link:focus .carousel-image {
    transform: scale(1.045);
    filter: saturate(1.04);
}

.carousel-slide-link:focus {
    outline: none;
}

.carousel-slide-link:focus .carousel-image-frame {
    box-shadow: 0 0 0 3px rgba(217, 138, 22, 0.24);
}

.carousel-button-prev,
.carousel-button-next {
    position: absolute;
    top: calc(50% - 28px);
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    color: #ffffff;
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    opacity: 1;
    transform: translateY(-50%);
    transition: opacity 180ms ease, background 180ms ease, transform 180ms ease;
}

.carousel-button-prev:hover,
.carousel-button-next:hover,
.carousel-button-prev:focus,
.carousel-button-next:focus {
    background: rgba(0, 0, 0, 0.2);
    outline: none;
}

.carousel-button-prev {
    left: 10px;
}

.carousel-button-next {
    right: 10px;
}

.carousel-button-prev::before,
.carousel-button-next::before {
    display: block;
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
}

.carousel-button-prev::before {
    content: "<";
}

.carousel-button-next::before {
    content: ">";
}

.swiper-pagination {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px !important;
    display: flex;
    justify-content: center;
    gap: 7px;
}

.swiper-pagination-bullet {
    width: 7px;
    height: 7px;
    margin: 0 !important;
    background: #c8c8c8;
    opacity: 1;
    transition: width 180ms ease, background 180ms ease;
}

.swiper-pagination-bullet-active {
    width: 20px;
    border-radius: 999px;
    background: var(--wc-carousel-accent);
}

@media (max-width: 1024px) {
    .wc-category-showcase {
        grid-template-columns: minmax(158px, 190px) minmax(0, 1fr);
        gap: 24px;
    }

    .wc-category-sidebar h3 {
        font-size: 22px;
    }

    .carousel-category-title {
        margin-top: 18px;
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    .wc-category-showcase,
    .wc-category-showcase.has-sidebar {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .wc-category-sidebar {
        min-height: 0;
        padding: 14px 14px 12px;
        border-radius: 8px;
    }

    .wc-category-sidebar h3 {
        margin-bottom: 10px;
        font-size: 20px;
    }

    .wc-category-nav {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    .wc-category-nav-link {
        min-height: 38px;
        padding: 0 12px;
        gap: 8px;
        white-space: nowrap;
        border: 1px solid #e1e1e1;
        border-radius: 999px;
        font-size: 14px;
    }

    .wc-category-nav-link:hover,
    .wc-category-nav-link:focus {
        transform: none;
    }

    .wc-swiper-carousel {
        padding-bottom: 30px;
        overflow: visible;
    }

    .carousel-image-frame {
        height: 165px;
    }

    .wc-carousel-container {
        overflow: hidden;
    }

    .carousel-category-title {
        margin-top: 13px;
        font-size: 13px;
    }

    .carousel-button-prev,
    .carousel-button-next {
        top: calc(50% - 22px);
        width: 32px;
        height: 32px;
    }
}
