/**
 * Reviews Gallery CSS
 * Customer photos gallery, carousel thumbnails
 * 
 * Split from index.css - see CSS_SPLIT_PLAN_NO_IMPORT.md
 */

/* Galeria comună cu pozele clienților */
.customer-photos-gallery {
    margin-bottom: 15px;
}

.customer-photos-gallery h3 {
    font-size: var(--font-size-lg);
    color: var(--brand-color-primary);
    margin-bottom: var(--space-1);
    margin-top: var(--space-2);
    font-weight: 600;
}

.photos-carousel-container {
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
}

.photos-carousel {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
    overscroll-behavior-x: contain; /* Previne scroll pe pagina principală */
    cursor: grab; /* Cursor pentru drag pe desktop */
}

.photos-carousel.dragging {
    cursor: grabbing;
    scroll-behavior: auto; /* Dezactivează smooth scroll în timpul drag-ului */
    user-select: none; /* Previne selecția textului */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.photos-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.photo-item {
    position: relative;
    flex: 0 0 auto;
    width: auto;
    min-width: 100px;
    max-width: 180px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    margin-right: 15px;
}

.photo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.photo-item .image-container {
    position: relative;
    overflow: hidden;
    width: auto;
    max-height: 150px;
    margin: 0 auto;
}

.photo-item img {
    width: auto;
    max-height: 160px;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
}

.photo-item .photo-info {
    padding: 10px 8px 8px 8px;
    background: white;
    text-align: center;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.photo-item .reviewer-name {
    font-size: 14px !important;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.2;
    word-wrap: break-word;
    max-width: 100%;
}

.photo-item .photo-rating {
    display: flex;
    justify-content: center;
    gap: 2px;
}

.photo-item .photo-rating .star-icon {
    width: 16px;
    height: 16px;
}

.photo-item:hover img {
    transform: scale(1.05);
}


/* Layout carusel poze: prima 140x140, apoi perechi 60x60 cu gap 20px */
.photos-carousel { align-items: stretch; }
.photos-carousel .photo-column {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    margin-right: 8px;
}
.photos-carousel .photo-column.large { width: 160px; }
.photos-carousel .photo-column.pair { width: 76px; gap: 8px; }

/* Normalizează item-urile din carusel și dimensiunile cerute */
.photos-carousel .photo-item {
    margin-right: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 0; /* fără border ca să nu micșoreze imaginea efectivă */
    min-width: 0; /* override min-width:100px global */
    max-width: none;
    display: block; /* evită comportamentul flex al clasei globale */
}
.photos-carousel .photo-column.large .photo-item { width: 160px; height: 160px; }
.photos-carousel .photo-column.pair .photo-item { width: 76px; height: 76px; }
.photos-carousel .photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photos-carousel .photo-info { display: none; }

/* =====================================================================
   RESPONSIVE - Gallery section
   ===================================================================== */

@media (max-width: 768px) {
    .photo-item {
        min-width: 110px;
        max-width: 160px;
        margin-right: 12px;
    }
    
    .photo-item .image-container {
        max-height: 120px;
    }
    
    .photo-item img {
        max-height: 120px;
    }
    
    .photo-item .reviewer-name {
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .photo-item {
        min-width: 100px;
        max-width: 140px;
        margin-right: 10px;
    }
    
    .photo-item .image-container {
        max-height: 150px;
        max-width: 120px;
    }
    
    .photo-item img {
        max-height: 160px;
        max-width: 160px;
    }
    
    .photo-item .reviewer-name {
        font-size: 12px !important;
    }
    
    .photo-item .photo-rating .star-icon {
        width: 16px;
        height: 16px;
    }
}

/* --- Overrides finale pentru dimensiuni exacte în caruselul cu poze --- */
.customer-photos-gallery .photos-carousel .photo-item { min-width: 0 !important; max-width: none !important; border: 0 !important; padding: 0 !important; box-sizing: border-box; display: block; }
.customer-photos-gallery .photos-carousel .photo-column { margin-right: 8px !important; }
.customer-photos-gallery .photos-carousel .photo-column.large .photo-item { width: 160px !important; height: 160px !important; }
.customer-photos-gallery .photos-carousel .photo-column.pair { width: 76px !important; gap: 8px !important; margin-right: 8px !important; }
.customer-photos-gallery .photos-carousel .photo-column.pair .photo-item { width: 76px !important; height: 76px !important; }
.customer-photos-gallery .photos-carousel .photo-item img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; }
