/* Custom Product Showcase Slider — Frontend */
.cpss-wrapper {
    position: relative;
    padding: 20px 0;
    overflow: hidden;
}

.cpss-slider-outer {
    display: flex;
    align-items: stretch;
    position: relative;
}

/* Arrows outside slider */
.cpss-arrow {
    flex-shrink: 0;
    width: 40px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 0;
}
.cpss-arrow:hover { opacity: 1; }
.cpss-arrow svg { width: 28px; height: 28px; }

/* Arrow alignment */
.cpss-arrows-left .cpss-slider-outer { justify-content: flex-start; }
.cpss-arrows-center .cpss-slider-outer { justify-content: center; }
.cpss-arrows-right .cpss-slider-outer { justify-content: flex-end; }

/* Swiper container */
.cpss-swiper {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* Card */
.cpss-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.cpss-img-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 125%; /* 4:5 ratio */
    overflow: hidden;
    background: #f5f5f5;
}
.cpss-img-wrap img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sale badge */
.cpss-sale-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e53935;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
    padding: 5px 8px;
    border-radius: 4px;
    z-index: 2;
    animation: cpss-fade-in 0.3s ease;
}
@keyframes cpss-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Info row */
.cpss-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 2px 0;
    gap: 8px;
}
.cpss-title {
    font-size: 13px;
    font-weight: 500;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.cpss-price {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    flex-shrink: 0;
}
.cpss-price del {
    color: #999;
    font-weight: 400;
    margin-right: 4px;
}
.cpss-price ins {
    text-decoration: none;
}

/* Greyed out placeholder products (admins only) */
.cpss-greyed {
    opacity: 0.35;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 767px) {
    .cpss-arrow { width: 30px; }
    .cpss-arrow svg { width: 22px; height: 22px; }
}
