/**
 * Curated Products Carousel - Custom CSS
 * No external dependencies
 *
 * @version 1.1.7
 */

/* Container */
.cpc-container {
    margin: 2em 0;
    position: relative;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

/* Heading */
.cpc-heading {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 1em;
    text-transform: uppercase;
}

/* Items Container (Wrapper) */
.cpc-items-container {
    display: flex;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: grab;
    will-change: transform;
    transition: transform 0.3s ease-out;
    width: max-content;
    align-items: stretch;
}

/* Styling during active drag */
.cpc-grabbing .cpc-items-container,
.cpc-grabbing * {
    cursor: grabbing !important;
}

/* Individual Carousel Item */
.cpc-item {
    flex: 0 0 auto;
    width: 300px; /* Default width - overridden by JS */
    box-sizing: border-box;
    white-space: normal;
}

/* Cloned items */
.cpc-item.cpc-clone {
    /* No default styling needed */
}

/* Product Card Structure */
.cpc-product {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cpc-product-link {
    color: inherit;
    display: block;
    text-decoration: none;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cpc-product-image {
    aspect-ratio: 1 / 1.25;
    background-color: #f7f7f7;
    overflow: hidden;
    position: relative;
}

.cpc-product-image img {
    display: block;
    height: 100%;
    left: 0;
    object-fit: cover;
    position: absolute;
    top: 0;
    width: 100%;
}

.cpc-product-details {
    padding: 0.8em 0.7em;
    flex-grow: 1;
    display: block;
}

.cpc-product-title {
    font-size: 0.77rem !important;
    font-weight: 400 !important;
    line-height: 1.4;
    margin: 0 0 0.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: calc(1.4em * 2);
}

.cpc-product-price {
    font-size: 0.77rem !important;
    font-weight: 600;
    margin-top: auto;
}

/* Progress Bar */
.cpc-progress-track {
    position: relative;
    height: 4px;
    margin-top: 1em;
    background-color: rgba(0,0,0,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.cpc-progress-indicator {
    position: absolute;
    height: 100%;
    /* *** FIX: Force initial width to 0 via CSS *** */
    width: 0;
    background-color: #000;
    border-radius: 2px;
    top: 0;
    left: 0;
    /* Transition applies when JS changes width */
    transition: width 0.1s linear;
}

/* Style adjustments when progress bar is hidden */
.cpc-container.cpc-no-progress .cpc-progress-track {
    display: none;
}