/* WooCommerce Category Showcase - Public Styles (scoped to avoid breaking theme layout) */

/* Isolate our block so theme flex/grid is not affected */
.wcs-showcase-wrapper {
    display: block;
    width: 100%;
    margin-top: 0;
    margin-bottom: 30px;
    box-sizing: border-box;
}

/* ──────────────────────────────
   Single flex container: Banner + Carousel (40% / 60%, or full width banner)
   ────────────────────────────── */
.wcs-hero-flex {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    overflow: hidden;
    min-height: 260px;
    gap: 10px;
}

/* Banner: 40% when carousel present, 100% when alone */
.wcs-hero-flex .wcs-banner-panel {
    flex: 0 0 40%;
    min-width: 0;
    position: relative;
}

.wcs-hero-flex:not(:has(.wcs-carousel-panel)) .wcs-banner-panel {
    flex: 1 1 100%;
}

.wcs-hero-flex .wcs-banner-inner {
    width: 100%;
    height: 100%;
    min-height: 260px;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Carousel: 60% when banner present */
.wcs-hero-flex .wcs-carousel-panel {
    flex: 1 1 60%;
    min-width: 0;
    position: relative;
}

.wcs-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, .65) 0%, rgba(0, 0, 0, .3) 100%);
    display: flex;
    align-items: center;
    padding: 24px;
}

.wcs-banner-content h3 {
    color: #fff;
    font-size: 1.6rem;
    margin: 0 0 10px;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

.wcs-banner-content p {
    color: rgba(255, 255, 255, .85);
    font-size: 0.9rem;
    margin: 0 0 16px;
    line-height: 1.4;
}

/* CTA as underlined link (MECCA-style) */
.wcs-banner-cta {
    color: #fff !important;
    text-decoration: underline !important;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.wcs-banner-cta:hover {
    opacity: 0.9;
    color: #fff !important;
}

/* Carousel: multiple cards with image + label */
.wcs-hero-flex .wcs-carousel {
    width: 100%;
    min-height: 260px;
    overflow: hidden;
    position: relative;
}

.wcs-carousel .swiper-wrapper {
    transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.wcs-carousel .swiper-slide {
    height: auto;
    width: auto;
    box-sizing: border-box;
    flex-shrink: 0;
}

.wcs-carousel-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    color: inherit;
    overflow: hidden;
}

.wcs-carousel-card-img {
    flex: 1 1 auto;
    min-height: 180px;
    overflow: hidden;
    background: #f5f5f5;
}

.wcs-carousel-card-img img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    display: block;
}

.wcs-carousel-card-label {
    padding: 12px 14px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #222;
}

.wcs-carousel .swiper-button-prev,
.wcs-carousel .swiper-button-next {
    align-items: center;
    border: none;
    box-sizing: border-box;
    cursor: pointer;
    display: inline-flex;
    font-weight: 400;
    outline: none;
    margin: 0;
    padding: 12px;
    position: absolute;
    text-align: center;
    text-decoration: none;
    transition: background-color 400ms ease-in-out 0s;
    padding: 1.5rem 1.6rem;
    color: #333;
    background: #fff;
    width: 4.4rem;
    height: 4.4rem;
    transform: translateY(-50%);
    margin: 0;
    top: 50%;
    z-index: 20;
    pointer-events: auto;
}

.wcs-carousel .swiper-button-prev {
    left: 0;
}

.wcs-carousel .swiper-button-next {
    right: 0;
}

.wcs-carousel .swiper-button-prev svg,
.wcs-carousel .swiper-button-next svg {
    height: auto;
    width: 0.4rem;
}

.wcs-carousel .swiper-button-prev:hover,
.wcs-carousel .swiper-button-next:hover {
    background: #e0e0e0;
    color: #111;
}



/* Legacy full-slide swiper (when no carousel class) */
.wcs-swiper:not(.wcs-carousel) {
    width: 100%;
    height: 100%;
    min-height: 250px;
}

.wcs-swiper:not(.wcs-carousel) .swiper-slide {
    overflow: hidden;
}

.wcs-swiper:not(.wcs-carousel) .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ──────────────────────────────
   Heading Section (Category name + Tagline)
   ────────────────────────────── */
.wcs-heading-section {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
}

.wcs-category-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    margin: 0;
    line-height: 1.2;
}

.wcs-category-tagline {
    font-size: 1rem;
    color: #222;
    margin: 0;
}

/* ──────────────────────────────
   Category navigation links
   ────────────────────────────── */
.wcs-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.wcs-category-links a {
    color: #222;
    text-decoration: none;
}

.wcs-category-links a:hover {
    text-decoration: underline;
}

/* ──────────────────────────────
   Child Categories Grid
   ────────────────────────────── */
.wcs-child-categories {
    margin-bottom: 24px;
}

.wcs-child-grid {
    display: grid;
    gap: 16px;
}

.wcs-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.wcs-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.wcs-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.wcs-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.wcs-cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

.wcs-child-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none !important;
    color: inherit;
    padding: 12px 8px 14px;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    background: #fff;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.wcs-child-item:hover {
    border-color: #aaa;
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    text-decoration: none !important;
}

.wcs-child-thumb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
    border: 2px solid #f0f0f0;
    background: #f9f9f9;
}

.wcs-child-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wcs-child-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
    margin-bottom: 4px;
}

.wcs-child-count {
    font-size: 0.78rem;
    color: #888;
}

/* ──────────────────────────────
   Responsive
   ────────────────────────────── */
@media (max-width: 768px) {
    .wcs-hero-flex {
        flex-direction: column;
    }

    .wcs-hero-flex .wcs-banner-panel {
        flex: 0 0 auto;
        min-height: 180px;
    }

    .wcs-hero-flex .wcs-banner-inner,
    .wcs-hero-flex .wcs-carousel {
        min-height: 200px;
    }

    .wcs-hero-flex .wcs-carousel {
        padding: 0 36px;
    }

    .wcs-carousel-card-img,
    .wcs-carousel-card-img img {
        min-height: 140px;
    }

    .wcs-heading-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .wcs-category-title {
        font-size: 1.6rem;
    }

    .wcs-cols-4,
    .wcs-cols-5,
    .wcs-cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {

    .wcs-cols-3,
    .wcs-cols-4,
    .wcs-cols-5,
    .wcs-cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .wcs-banner-content h3 {
        font-size: 1.2rem;
    }
}