/* Variables */
:root {
    --primary: #f25c05;
    --primary-hover: #d84d00;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --success: #10B981;
    --warning: #F59E0B;
}

/* Reset y estilos generales */
body {
    background-color: var(--bg-light);
    color: var(--text-primary);
    font-family: Arial, sans-serif;
}

/* Header y navegación */
.dashboard-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.dashboard-logo span {
    background: var(--primary);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

.search-bar {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.search-bar:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(242, 92, 5, 0.1);
}

/* Botón nuevo flyer */
.new-flyer-btn {
    background-color: var(--primary) !important;
    color: white !important;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.new-flyer-btn:hover {
    background-color: var(--primary-hover) !important;
}

/* Información del negocio */
.business-info-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.business-avatar {
    width: 64px;
    height: 64px;
    background: var(--bg-light);
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    overflow: hidden;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.business-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.business-name {
    font-size: 1.25rem;
    font-weight: bold;
    color: #343a40;
    margin-bottom: 0.25rem;
}

.business-email {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.plan-badge {
    background-color: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.plan-free {
    background-color: #6B7280 !important; /* Gray color for free plan */
}

.verified-badge {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Estadísticas */
.stats-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.stats-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-value {
    font-weight: bold;
    color: var(--text-primary);
}

/* Grid de flyers */
.flyers-section {
    margin-top: 2rem;
}

.flyers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.flyers-title {
    font-size: 1.1rem;
    font-weight: bold;
}

.flyer-count {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.flyer-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.flyer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.flyer-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

/* Status labels - aparecen una vez arriba del flyer */
.flyer-status {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 1;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: white;
    font-weight: 500;
}

.status-published {
    background-color: #10B981; /* Verde intenso para publicado */
}

.status-draft {
    background-color: #6B7280; /* Gris para borrador */
}

.flyer-image-container {
    position: relative;
    overflow: visible;
    border-radius: 8px 8px 0 0;
    background: #fff;
}

.flyer-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.flyer-card:hover .flyer-image-container::after {
    opacity: 1;
}

.flyer-image {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    display: block;
}

.flyer-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.flyer-card:hover .flyer-actions {
    opacity: 1;
    transform: translateX(0);
}

.flyer-actions .btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: none;
    transition: all 0.2s ease;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.flyer-actions .btn:hover {
    transform: scale(1.1);
    background: white;
}

/* Animación escalonada para los botones */
.flyer-actions .btn:nth-child(1) {
    transition-delay: 0.1s;
}

.flyer-actions .btn:nth-child(2) {
    transition-delay: 0.2s;
}

/* Eliminada esta sección duplicada - usando la definición anterior */

.flyer-details {
    padding: 1rem;
    background: white;
    border-radius: 0 0 8px 8px;
}

@media (max-width: 575.98px) {
    .flyer-details {
        padding: 0;
    }
}

.flyer-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.flyer-date {
    font-size: 0.9rem;
}

.flyer-like-section {
    text-align: center;
}

.like-btn {
    color: #6B7280 !important;
    font-size: 1rem;
    transition: all 0.2s ease;
    text-decoration: none !important;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.like-btn:hover {
    color: var(--primary) !important;
    transform: scale(1.05);
}

.like-btn.liked {
    color: var(--primary) !important;
}

.like-btn.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.likes-count {
    font-weight: 600;
    margin-left: 0.25rem;
}

.follow-btn {
    color: #6B7280 !important;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-color: var(--primary) !important;
}

.follow-btn:hover {
    color: white !important;
    background-color: var(--primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.follow-btn.following {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.follow-btn.following:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.follow-btn.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.followers-info {
    margin-top: 0.5rem;
}

/* Category Filter Buttons */
.category-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
    justify-content: center;
}

.category-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: #f9f9f9;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-btn:hover,
.category-btn.active {
    background: #f25c05;
    color: white;
    border-color: #f25c05;
}

/* Responsive */
@media (max-width: 768px) {
    .business-info-card {
        flex-direction: column;
        text-align: center;
    }

    
    .stats-card {
        margin-top: 1rem;
    }

    .category-filter-buttons {
        justify-content: center;
    }

    
}
