/**
 * Estilos para el carrusel de productos complementarios
 * Compatible con Tailwind CSS
 */

/* Variables de color */
:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --background-light: #f4f4f5;
    --card-light: #ffffff;
    --btn-bg-light: #e0f2fe;
}

/* Ocultar scrollbar */
.hide-scroll::-webkit-scrollbar {
    display: none;
}

.hide-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Line clamp */
.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Limitar descripción de productos a 4 líneas */
.complementary-products-section .product-description {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    max-height: 6rem; /* 4 líneas * 1.5 line-height = 6rem */
}

/* Forzar que cualquier p dentro de la descripción respete el límite */
.complementary-products-section .product-description p {
    display: inline;
    margin: 0;
}

.complementary-products-section .product-description br {
    display: none;
}

/* Colores personalizados */
.text-primary {
    color: var(--primary) !important;
}

.text-primary-dark {
    color: var(--primary-dark) !important;
}

.bg-btn-bg-light {
    background-color: var(--btn-bg-light);
}

.bg-card-light {
    background-color: var(--card-light);
}

.bg-background-light {
    background-color: var(--background-light);
}

/* Cursor grab para carrusel */
.complementary-carousel {
    cursor: grab;
    scroll-behavior: auto; /* Desactivar smooth scroll para mejor arrastre */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling en iOS */
}

.complementary-carousel:active {
    cursor: grabbing;
    scroll-behavior: auto;
}

.complementary-carousel.dragging {
    cursor: grabbing;
    user-select: none;
}

/* Prevenir selección de texto mientras se arrastra */
.complementary-carousel * {
    user-select: none;
    -webkit-user-drag: none;
}

/* Restablecer selección para enlaces y botones */
.complementary-carousel a,
.complementary-carousel button {
    user-select: auto;
    pointer-events: auto;
}

/* Animaciones suaves */
.complementary-products-section .group:hover {
    transform: translateY(-0.25rem);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .complementary-products-section h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .complementary-products-section .flex-none {
        width: 20rem;
    }
}

/* Asegurar que los iconos de Material Icons se muestren correctamente */
.material-icons-round {
    font-family: 'Material Icons Round';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Ajustes para integración con Divi */
.complementary-products-section {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Asegurar que los botones se vean bien en mobile */
.complementary-products-section .bg-btn-bg-light {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.complementary-products-section .bg-btn-bg-light:hover {
    background-color: #bae6fd;
    text-decoration: none;
}

