/* ========================================
   PÁGINA COMUNIDAD - Todos los comentarios
   ======================================== */

/* Hero / Stats Banner */
.comunidad-hero {
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.15), rgba(30, 35, 60, 0.4));
    border: 1px solid rgba(227, 6, 19, 0.2);
    border-radius: 16px;
    padding: 40px 30px;
    margin-bottom: 30px;
    text-align: center;
}

.comunidad-hero h1 {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.comunidad-hero h1 i {
    color: var(--primary-color);
}

.comunidad-hero p {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin: 0 0 25px 0;
}

.comunidad-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.comunidad-stat {
    text-align: center;
}

.comunidad-stat .stat-number {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color);
    display: block;
}

.comunidad-stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Comments Grid */
.comunidad-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* Comment Card */
.comunidad-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.comunidad-card:hover {
    transform: translateY(-4px);
    border-color: rgba(227, 6, 19, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Product info bar at top of card */
.comunidad-card-product {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.comunidad-card-product:hover {
    background: rgba(255, 255, 255, 0.06);
}

.comunidad-card-product-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    flex-shrink: 0;
}

.comunidad-card-product-info {
    flex: 1;
    min-width: 0;
}

.comunidad-card-product-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-white);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comunidad-card-product-price {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

.comunidad-card-product-price .original {
    color: var(--text-dim);
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 6px;
    font-size: 0.75rem;
}

.comunidad-card-category {
    font-size: 0.7rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
    text-transform: capitalize;
}

/* Comment body */
.comunidad-card-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.comunidad-card-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.comunidad-card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comunidad-card-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.comunidad-card-username {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-white);
}

.comunidad-card-time {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-left: auto;
}

.comunidad-card-text {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.6;
    flex: 1;
}

.comunidad-card-text.is-reply {
    padding-left: 14px;
    border-left: 3px solid rgba(227, 6, 19, 0.3);
}

/* Card footer with votes */
.comunidad-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.comunidad-card-votes {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.comunidad-card-votes i {
    font-size: 0.85rem;
}

.comunidad-card-votes .positive {
    color: #4ade80;
}

.comunidad-card-votes .negative {
    color: #f87171;
}

.comunidad-card-reply-badge {
    font-size: 0.75rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Load More Button */
.comunidad-load-more {
    text-align: center;
    margin: 30px 0 60px 0;
}

.comunidad-load-more-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(227, 6, 19, 0.3);
}

.comunidad-load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(227, 6, 19, 0.4);
}

.comunidad-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.comunidad-load-more-btn i.fa-spin {
    animation: spin 1s linear infinite;
}

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

/* No more comments */
.comunidad-end {
    text-align: center;
    color: var(--text-dim);
    padding: 30px;
    font-size: 0.95rem;
}

.comunidad-end i {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Card entrance animation */
.comunidad-card {
    animation: cardFadeIn 0.4s ease forwards;
    opacity: 0;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation delays for initial load */
.comunidad-card:nth-child(1) {
    animation-delay: 0.05s;
}

.comunidad-card:nth-child(2) {
    animation-delay: 0.1s;
}

.comunidad-card:nth-child(3) {
    animation-delay: 0.15s;
}

.comunidad-card:nth-child(4) {
    animation-delay: 0.2s;
}

.comunidad-card:nth-child(5) {
    animation-delay: 0.25s;
}

.comunidad-card:nth-child(6) {
    animation-delay: 0.3s;
}

/* Widget link styles */
.social-proof-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: color 0.2s;
}

.social-proof-link:hover {
    color: var(--primary-color);
}

.social-proof-view-all {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.social-proof-view-all:hover {
    opacity: 0.8;
    gap: 10px;
}

/* Responsive */
@media (max-width: 992px) {
    .comunidad-grid {
        grid-template-columns: 1fr;
    }

    .comunidad-hero {
        padding: 30px 20px;
    }

    .comunidad-hero h1 {
        font-size: 1.6rem;
    }

    .comunidad-stats {
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .comunidad-hero h1 {
        font-size: 1.3rem;
    }

    .comunidad-hero p {
        font-size: 0.95rem;
    }

    .comunidad-stat .stat-number {
        font-size: 1.4rem;
    }

    .comunidad-card-body {
        padding: 14px;
    }

    .comunidad-card-product {
        padding: 10px 14px;
    }
}