/* ==========================================================================
   WooCarousel Widget – Frontend Styles
   ========================================================================== */

/* ── Wrapper ────────────────────────────────────────────────────────────── */
.wcw-carousel-wrapper {
    position: relative;
    padding: 0 50px;
    box-sizing: border-box;
}

/* ── Swiper overrides ───────────────────────────────────────────────────── */
.wcw-swiper {
    overflow: hidden;
}

/* ── Card base ──────────────────────────────────────────────────────────── */
.wcw-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.wcw-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

/* ── Image ──────────────────────────────────────────────────────────────── */
.wcw-card__image-link {
    display: block;
    text-decoration: none;
}

.wcw-card__image {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: #f5f5f5;
}

.wcw-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.wcw-card:hover .wcw-card__image img {
    transform: scale(1.05);
}

/* Category overlay */
.wcw-card__image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
}

/* ── Badges ─────────────────────────────────────────────────────────────── */
.wcw-card__badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    gap: 5px;
}

.wcw-badge {
    display: inline-block;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 3px;
    line-height: 1.5;
}

.wcw-badge--sale {
    background-color: #e74c3c;
    color: #fff;
}

.wcw-badge--new {
    background-color: #27ae60;
    color: #fff;
}

/* ── Card body ───────────────────────────────────────────────────────────── */
.wcw-card__body {
    padding: 14px 15px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.wcw-card__title {
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;
}

.wcw-card__title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.wcw-card__title a:hover {
    color: #2271b1;
}

/* ── Price / Rating ──────────────────────────────────────────────────────── */
.wcw-card__price {
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.wcw-card__price del {
    opacity: 0.5;
    font-weight: 400;
    margin-right: 4px;
}

.wcw-card__rating {
    line-height: 1;
}

.wcw-card__rating .star-rating {
    font-size: 13px;
}

/* ── Count (category) ───────────────────────────────────────────────────── */
.wcw-card__count {
    margin: 0;
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

/* ── Add to Cart / Shop Now button ──────────────────────────────────────── */
.wcw-card__atc {
    margin-top: auto;
}

.wcw-card__btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background-color: #2271b1;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.wcw-card__btn:hover {
    background-color: #135e96;
    color: #fff;
    transform: translateY(-1px);
}

/* WooCommerce native Add-to-Cart inside our wrapper */
.wcw-card__atc .button {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* ── Navigation arrows ───────────────────────────────────────────────────── */
.wcw-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #333;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
}

.wcw-nav-btn:hover {
    background-color: #555;
}

.wcw-nav-btn.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.wcw-nav-prev {
    left: 0;
}

.wcw-nav-next {
    right: 0;
}

.wcw-nav-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #fff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Pagination dots ─────────────────────────────────────────────────────── */
.wcw-swiper .swiper-pagination {
    position: relative;
    margin-top: 18px;
    bottom: auto;
}

.wcw-swiper .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background-color: #ccc;
    opacity: 1;
    transition: background-color 0.2s, transform 0.2s;
}

.wcw-swiper .swiper-pagination-bullet-active {
    background-color: #2271b1;
    transform: scale(1.3);
}

/* ── No arrows mode ──────────────────────────────────────────────────────── */
.wcw-carousel-wrapper:not(:has(.wcw-nav-btn)) {
    padding: 0;
}

/* Fallback for browsers without :has */
.wcw-carousel-wrapper.wcw-no-arrows {
    padding: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .wcw-carousel-wrapper {
        padding: 0 36px;
    }
    .wcw-nav-btn {
        width: 32px;
        height: 32px;
    }
    .wcw-nav-btn svg {
        width: 14px;
        height: 14px;
    }
}
