/* KAJAL Coffee Varieties Widget - Estilos Elegantes */

:root {
    --kajal-primary: #8B6F47;
    --kajal-secondary: #D4AF37;
    --kajal-accent: #C49A6C;
    --kajal-dark: #2C2418;
    --kajal-light: #F8F6F3;
    --kajal-cream: #F4F1EB;
    --kajal-shadow: rgba(44, 36, 24, 0.1);
    --kajal-transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Container Principal */
.kajal-coffee-varieties {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Filtros */
.kajal-filters {
    margin-bottom: 3rem;
    text-align: center;
}

.filter-title {
    font-size: 1.1rem;
    color: var(--kajal-dark);
    margin-bottom: 1rem;
    font-weight: 500;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--kajal-accent);
    background: transparent;
    color: var(--kajal-dark);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--kajal-transition);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--kajal-accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 154, 108, 0.25);
}

/* Grid de Variedades */
.kajal-varieties-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.kajal-varieties-grid.columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
}

.kajal-varieties-grid.columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.kajal-varieties-grid.columns-4 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Tarjetas de Variedad */
.variety-card {
    background: white;
    border-radius: 20px;
    padding: 1.8rem;
    position: relative;
    transition: var(--kajal-transition);
    border: 1px solid rgba(196, 154, 108, 0.15);
    overflow: hidden;
    cursor: pointer;
}

.variety-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--kajal-secondary) 0%, 
        var(--kajal-accent) 50%, 
        var(--kajal-primary) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.variety-card:hover::before {
    transform: scaleX(1);
}

.variety-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--kajal-shadow);
    border-color: var(--kajal-accent);
}

/* Icono del Grano */
.variety-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.coffee-bean-icon {
    transition: var(--kajal-transition);
}

.variety-card:hover .coffee-bean-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Contenido de la Tarjeta */
.variety-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--kajal-dark);
    margin-bottom: 0.8rem;
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
}

.variety-origin,
.variety-altitude {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--kajal-primary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.variety-origin svg,
.variety-altitude svg {
    opacity: 0.7;
}

.variety-description {
    color: #666;
    line-height: 1.6;
    margin: 1rem 0;
    font-size: 0.95rem;
}

/* Características */
.variety-characteristics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.characteristic-tag {
    background: var(--kajal-cream);
    color: var(--kajal-dark);
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--kajal-accent);
}

/* Perfil de Sabor */
.variety-flavor {
    background: linear-gradient(135deg, var(--kajal-light) 0%, var(--kajal-cream) 100%);
    padding: 1rem;
    border-radius: 12px;
    margin: 1rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.variety-flavor strong {
    color: var(--kajal-dark);
    display: block;
    margin-bottom: 0.3rem;
}

/* Botón Ver Más */
.variety-more-btn {
    width: 100%;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--kajal-accent) 0%, var(--kajal-secondary) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--kajal-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.variety-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(196, 154, 108, 0.3);
}

.variety-more-btn .arrow-icon {
    transition: var(--kajal-transition);
}

.variety-more-btn:hover .arrow-icon {
    transform: translateX(3px);
}

/* Badge de Categoría */
.variety-category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.variety-category-badge.premium {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #8B4513;
}

.variety-category-badge.specialty {
    background: linear-gradient(135deg, #C49A6C, #D4AF37);
    color: white;
}

.variety-category-badge.resistant {
    background: linear-gradient(135deg, #8FBC8F, #6B8E23);
    color: white;
}

.variety-category-badge.standard {
    background: linear-gradient(135deg, #A0826D, #8B7355);
    color: white;
}

/* Modal */
.kajal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 600px;
    max-height: 80vh;
    width: 90%;
    overflow-y: auto;
    z-index: 10001;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--kajal-dark);
    z-index: 10002;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--kajal-transition);
}

.modal-close:hover {
    background: var(--kajal-cream);
}

.modal-body {
    padding: 2rem;
}

/* Animaciones de Filtro */
.variety-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.variety-card.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Loading State */
.kajal-loading {
    text-align: center;
    padding: 2rem;
    color: var(--kajal-primary);
}

.kajal-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--kajal-accent);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .kajal-coffee-varieties {
        padding: 1rem 0.5rem;
    }
    
    .kajal-varieties-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .variety-card {
        padding: 1.5rem;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .filter-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .variety-name {
        font-size: 1.2rem;
    }
    
    .variety-card {
        padding: 1rem;
    }
    
    .coffee-bean-icon {
        width: 40px;
        height: 40px;
    }
}