/* ==========================================================================
   Kalon Products Showcase Widget (Más Vendidos & Oportunidades)
   ========================================================================== */

.kalon-products-showcase {
    position: relative;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Layout 1: MÁS VENDIDOS (Large Cards & Carousel / Slider)
   -------------------------------------------------------------------------- */
.kalon-ps-layout-large {
    position: relative;
    width: 100%;
}

.kalon-ps-layout-large.kalon-static-grid .kalon-ps-carousel-track {
    display: flex;
    flex-wrap: wrap;
    row-gap: 30px;
    transform: none !important;
}

.kalon-ps-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

.kalon-ps-carousel-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.kalon-ps-large-card {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 12px;
    box-sizing: border-box;
}

.kalon-ps-large-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.kalon-ps-large-inner:hover {
    text-decoration: none;
    color: inherit;
}

.kalon-ps-large-image-box {
    position: relative;
    width: 100%;
    background-color: #f5ede6;
    padding-top: 118%; /* ~ 1:1.18 aspect ratio */
    overflow: hidden;
    display: block;
    margin-bottom: 18px;
    transition: background-color 0.3s ease;
}

.kalon-ps-large-image-box img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.kalon-ps-large-inner:hover .kalon-ps-large-image-box img {
    transform: translate(-50%, -50%) scale(1.05);
}

/* Badge (e.g. "Nuevo" / "Sale") */
.kalon-ps-badge {
    position: absolute;
    top: 14px;
    right: 0;
    background-color: #8c8276;
    color: #ffffff;
    font-family: 'Kylie Boga', sans-serif;
    font-size: 13px;
    padding: 4px 16px 3px 18px;
    letter-spacing: 0.5px;
    z-index: 2;
    text-transform: capitalize;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.kalon-ps-badge.sale-badge {
    background-color: #1a1a1a;
}

/* Large Card Details */
.kalon-ps-large-info {
    text-align: center;
    padding: 0 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kalon-ps-brand {
    font-family: 'Kylie Boga', sans-serif;
    font-size: 16px;
    color: #8c8276;
    margin-bottom: 6px;
    text-transform: none;
    line-height: 1.2;
    display: block;
    transition: color 0.2s ease;
}

.kalon-ps-large-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 23px;
    letter-spacing: 1px;
    text-align: center;
    text-transform: uppercase;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 23px;
    max-height: 48px;
}

.kalon-ps-large-inner:hover .kalon-ps-large-title {
    color: #8c8276;
}

.kalon-ps-price {
    font-size: 14px;
    font-weight: 500;
    color: #2b2b2b;
    line-height: 1.3;
}

.kalon-ps-price del {
    color: #999999;
    font-size: 13px;
    margin-right: 6px;
    font-weight: 400;
}

.kalon-ps-price ins {
    text-decoration: none;
    font-weight: 600;
    color: #1a1a1a;
}

/* Navigation Arrows */
.kalon-ps-arrow {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #333333;
    transition: all 0.25s ease;
    opacity: 0.85;
    outline: none;
    box-sizing: border-box;
}

.kalon-ps-arrow:hover {
    opacity: 1;
    color: #000000;
}

.kalon-ps-arrow-prev {
    left: -32px;
}

.kalon-ps-arrow-next {
    right: -32px;
}

.kalon-ps-arrow svg {
    width: 22px;
    height: auto;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

.kalon-ps-arrow i {
    font-size: 20px;
    line-height: 1;
    color: inherit;
    display: block;
}

/* --------------------------------------------------------------------------
   Layout 2: OPORTUNIDADES (Compact Horizontal Grid)
   -------------------------------------------------------------------------- */
.kalon-ps-layout-compact {
    position: relative;
    width: 100%;
}

.kalon-ps-compact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 30px 24px;
    box-sizing: border-box;
}

.kalon-ps-compact-card {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.kalon-ps-compact-card:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-2px);
}

.kalon-ps-compact-thumb {
    position: relative;
    width: 78px;
    height: 78px;
    min-width: 78px;
    background-color: #f5ede6;
    overflow: hidden;
    margin-right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.25s ease;
}

.kalon-ps-compact-thumb img {
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.kalon-ps-compact-card:hover .kalon-ps-compact-thumb img {
    transform: scale(1.08);
}

.kalon-ps-compact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    overflow: hidden;
}

.kalon-ps-compact-info .kalon-ps-brand {
    font-family: 'Kylie Boga', sans-serif;
    font-size: 15px;
    color: #8c8276;
    margin-bottom: 2px;
    line-height: 1.2;
    text-transform: none;
}

.kalon-ps-compact-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #1a1a1a;
    line-height: 1.35;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.kalon-ps-compact-card:hover .kalon-ps-compact-title {
    color: #8c8276;
}

.kalon-ps-compact-info .kalon-ps-price {
    font-size: 13px;
    font-weight: 500;
    color: #2b2b2b;
    line-height: 1.2;
    margin-top: 1px;
}

.kalon-ps-compact-info .kalon-ps-price del {
    color: #999999;
    font-size: 12.5px;
    margin-right: 6px;
    font-weight: 400;
}

.kalon-ps-compact-info .kalon-ps-price ins {
    text-decoration: none;
    font-weight: 600;
    color: #1a1a1a;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .kalon-ps-arrow-prev {
        left: -16px;
    }
    .kalon-ps-arrow-next {
        right: -16px;
    }
    .kalon-ps-compact-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 24px 18px;
    }
}

@media (max-width: 991px) {
    .kalon-ps-large-card {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
    .kalon-ps-compact-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 22px 16px;
    }
}

@media (max-width: 767px) {
    .kalon-ps-large-card {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 0 8px;
    }
    .kalon-ps-arrow-prev {
        left: -6px;
    }
    .kalon-ps-arrow-next {
        right: -6px;
    }
    .kalon-ps-arrow svg {
        width: 18px;
        height: 28px;
    }
    .kalon-ps-compact-grid {
        grid-template-columns: 1fr;
        grid-gap: 18px;
    }
    .kalon-ps-compact-thumb {
        width: 70px;
        height: 70px;
        min-width: 70px;
    }
    .kalon-ps-large-title {
        font-size: 15px;
        line-height: 20px;
    }
}

@media (max-width: 480px) {
    .kalon-ps-large-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .kalon-ps-arrow-prev {
        left: 4px;
    }
    .kalon-ps-arrow-next {
        right: 4px;
    }
}
