/**
 * PUBLIC COLLECTIONS BLOCK - Estilos para colecciones públicas
 */

.public-collections-section {
    margin: 32px 0;
    padding: 0 16px;
}

.public-collections-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.public-collections-title {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.public-collections-title > i {
    font-size: 1.5rem;
    color: #8b5cf6;
    margin-top: 2px;
}

.public-collections-title-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.public-collections-title h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.public-collections-subtitle {
    font-size: 0.8125rem;
    color: #666;
    margin: 0;
    font-weight: 400;
}

.btn-view-all-collections {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border: none;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-view-all-collections:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-view-all-collections i {
    font-size: 1rem;
}


/* Scroll horizontal de tarjetas */
.public-collections-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.public-collections-scroll::-webkit-scrollbar {
    height: 4px;
}

.public-collections-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 2px;
}

.public-collections-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

/* Tarjeta de colección - Desktop: 5 tarjetas visibles */
.public-collection-card {
    flex-shrink: 0;
    width: calc((100% - 64px) / 5); /* 5 tarjetas con 4 gaps de 16px */
    min-width: 160px;
    max-width: 220px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    scroll-snap-align: start;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.public-collection-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.public-collection-cover {
    position: relative;
    aspect-ratio: 1;
    background: #f0f0f0;
}

.public-collection-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.public-collection-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 2rem;
}

.public-collection-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
}

.public-collection-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: white;
    font-weight: 500;
}

.public-collection-info {
    padding: 12px;
}

.public-collection-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.public-collection-author {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #666;
}

.public-collection-author i {
    font-size: 0.875rem;
    color: #8b5cf6;
}


/* ========================================
   MODAL VER TODAS LAS COLECCIONES
   ======================================== */

.all-collections-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.all-collections-modal.active {
    opacity: 1;
    visibility: visible;
}

.all-collections-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.all-collections-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
}

.all-collections-modal.active .all-collections-content {
    transform: scale(1) translateY(0);
}

.all-collections-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.all-collections-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.all-collections-header h3 i {
    color: #8b5cf6;
}

.all-collections-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.all-collections-close:hover {
    background: #e5e5e5;
    color: #333;
}

.all-collections-close i {
    font-size: 1.25rem;
}

.all-collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 24px;
    overflow-y: auto;
}

/* Tarjeta en modal */
.all-collections-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.all-collections-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.all-collections-card-cover {
    position: relative;
    aspect-ratio: 1;
    background: #f0f0f0;
}

.all-collections-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.all-collections-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 2rem;
}

.all-collections-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
}

.all-collections-card-overlay span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: white;
    font-weight: 500;
}

.all-collections-card-info {
    padding: 12px;
}

.all-collections-card-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.all-collections-card-info span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #666;
}

.all-collections-card-info span i {
    color: #8b5cf6;
}


/* ========================================
   RESPONSIVE
   ======================================== */

/* Desktop grande - tarjetas más anchas */
@media (min-width: 1200px) {
    .public-collection-card {
        width: calc((100% - 64px) / 5);
        max-width: 240px;
    }
}

@media (max-width: 768px) {
    .public-collections-section {
        margin: 24px 0 32px 0;
    }
    
    .public-collections-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
    }
    
    .public-collections-title {
        flex: 1;
    }
    
    .public-collections-title h3 {
        font-size: 1rem;
    }
    
    .public-collections-subtitle {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    .btn-view-all-collections {
        padding: 5px 10px;
        font-size: 0.7rem;
        border-radius: 14px;
        gap: 3px;
        margin-top: 2px;
        flex-shrink: 0;
    }
    
    .btn-view-all-collections i {
        font-size: 0.8rem;
    }
    
    .public-collection-card {
        width: 150px;
        min-width: 150px;
        max-width: 150px;
    }
    
    /* Modal fullscreen en mobile */
    .all-collections-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }
    
    .all-collections-header {
        padding: 16px;
    }
    
    .all-collections-header h3 {
        font-size: 1.125rem;
    }
    
    .all-collections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .public-collection-card {
        width: 140px;
        min-width: 140px;
        max-width: 140px;
    }
    
    .public-collection-info {
        padding: 10px;
    }
    
    .public-collection-name {
        font-size: 0.8125rem;
    }
}
