/**
 * Premium Customer Reviews Ticker Styling
 * Sabaya Boutique
 */

.sabaya-reviews-section {
    width: 100%;
    margin: 0 auto;
    padding: 60px 0;
    background: #ffffff;
    overflow: hidden;
}

.sabaya-reviews-header {
    text-align: center;
    margin-bottom: 48px;
    padding: 0 20px;
}

.sabaya-reviews-title {
    font-family: 'Amiri-Regular', 'PPNeueWorld', serif !important;
    font-size: 32px !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #111111;
    margin: 0 0 12px 0 !important;
}

.sabaya-reviews-subtitle {
    font-family: 'SweetSansPro-Regular', sans-serif !important;
    font-size: 13px;
    color: #666666;
    letter-spacing: 0.02em;
    margin: 0 !important;
}

/* Reviews Marquee Container */
.sabaya-reviews-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

/* Gradient Fade Masks on sides */
.sabaya-reviews-container::before,
.sabaya-reviews-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.sabaya-reviews-container::before {
    left: 0;
    background: linear-gradient(to right, #ffffff 20%, rgba(255, 255, 255, 0));
}

.sabaya-reviews-container::after {
    right: 0;
    background: linear-gradient(to left, #ffffff 20%, rgba(255, 255, 255, 0));
}

/* Flex Track for Marquee */
.sabaya-reviews-track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: sabaya-marquee 35s linear infinite;
}

/* Pause scroll animation on hover to read reviews */
.sabaya-reviews-track:hover {
    animation-play-state: paused;
}

/* Review Card */
.sabaya-review-card {
    width: 480px;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
    background: #FAF9F6; /* Warm off-white */
    border: 1px solid #f0edf8;
    padding: 28px;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sabaya-review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
}

/* Image Column */
.sabaya-review-image-col {
    flex-shrink: 0;
}

.sabaya-review-avatar {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background: #eaeaea;
}

.sabaya-review-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: #e9e6df; /* warm tone to match FAF9F6 */
    color: #8c8273;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'SweetSansPro-Regular', sans-serif;
    font-weight: 600;
    font-size: 20px;
}

/* Text Content Column */
.sabaya-review-content-col {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Message Text */
.sabaya-review-text {
    font-family: 'Georgia', serif;
    font-size: 14px;
    line-height: 1.7;
    color: #333333;
    font-style: italic;
    margin: 0 0 16px 0 !important;
}

.sabaya-review-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sabaya-review-name {
    font-family: 'SweetSansPro-Regular', sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #111111;
    margin: 0 !important;
}

.sabaya-review-subline {
    font-family: 'SweetSansPro-Regular', sans-serif !important;
    font-size: 11px;
    color: #777777;
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sabaya-review-badge {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 2px;
}

.sabaya-review-badge--sur_mesure {
    background: #f7e6c4;
    color: #8c6213;
}

.sabaya-review-badge--pret_a_porter {
    background: #dbeafe;
    color: #1e40af;
}

/* Keyframes for Continuous Loop */
@keyframes sabaya-marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        /* Since track contains double the items, shifting by exactly 50% gives a seamless loop */
        transform: translate3d(-50%, 0, 0);
    }
}

/* Mobile Responsive: manual horizontal touch scroll */
@media (max-width: 768px) {
    .sabaya-reviews-container {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-left: 20px;
        padding-right: 20px;
        scrollbar-width: none; /* Hide Firefox scrollbar */
    }
    
    .sabaya-reviews-container::-webkit-scrollbar {
        display: none; /* Hide Chrome/Safari scrollbar */
    }

    .sabaya-reviews-container::before,
    .sabaya-reviews-container::after {
        width: 30px;
    }

    .sabaya-reviews-track {
        animation: none;
        gap: 16px;
        padding: 10px 0;
    }

    /* Hide the duplicated loop cards on mobile to avoid duplicates when scrolling */
    .sabaya-review-card--loop-1 {
        display: none;
    }

    .sabaya-review-card {
        width: calc(100vw - 60px);
        max-width: 380px;
        padding: 20px;
        gap: 16px;
        scroll-snap-align: center;
    }

    .sabaya-review-avatar,
    .sabaya-review-avatar-placeholder {
        width: 65px;
        height: 65px;
    }

    .sabaya-review-avatar-placeholder {
        font-size: 18px;
    }

    .sabaya-review-text {
        font-size: 13px;
        line-height: 1.6;
        margin: 0 0 12px 0 !important;
    }
}
