/* ============================================
   MODERN CAMPAIGNS PAGE - STYLES
   ============================================ */

/* Layout principal */
.campaigns-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.campaigns-header {
    background: linear-gradient(135deg, #E23FEA 0%, #8b5cf6 100%);
    color: white;
    padding: 40px 20px;
    border-radius: 16px;
    margin-bottom: 30px;
    text-align: center;
}

.campaigns-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 10px;
}

.campaigns-header p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

/* Grille de produits */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Carte produit */
.product-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* Ratio 4:3 */
    background: #f8fafc;
    overflow: hidden;
}

.product-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(16, 185, 129, 0.95);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
}

.product-info {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 20px;
    font-weight: 800;
    color: #E23FEA;
    margin-bottom: 8px;
}

.product-price-currency {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #64748b;
}

.min-order-badge {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    color: #475569;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #10b981;
    font-weight: 600;
    font-size: 12px;
}

.product-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
}

.btn-product {
    flex: 1;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary-product {
    background: linear-gradient(135deg, #E23FEA, #8b5cf6);
    color: white;
}

.btn-primary-product:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(226, 63, 234, 0.3);
}

.btn-success-product {
    background: #10b981;
    color: white;
}

.btn-success-product:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.skeleton-image {
    width: 100%;
    padding-top: 75%;
    background: #f8fafc;
}

.skeleton-content {
    padding: 18px;
}

.skeleton-line {
    height: 16px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

/* Pagination moderne */
.pagination-modern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination-modern a,
.pagination-modern span {
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: 44px;
    text-align: center;
    display: inline-block;
}

.pagination-modern a {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.pagination-modern a:hover {
    background: #E23FEA;
    color: white;
    border-color: #E23FEA;
    transform: translateY(-2px);
}

.pagination-modern .active {
    background: linear-gradient(135deg, #E23FEA, #8b5cf6);
    color: white;
    border: none;
}

.pagination-modern .disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Infinite scroll loader */
.infinite-scroll-loader {
    text-align: center;
    padding: 40px;
    display: none;
}

.infinite-scroll-loader.active {
    display: block;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top-color: #E23FEA;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-state-icon {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: #0f172a;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 16px;
    color: #64748b;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .campaigns-container {
        padding: 10px;
    }

    .campaigns-header {
        padding: 30px 15px;
    }

    .campaigns-header h1 {
        font-size: 24px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .product-info {
        padding: 12px;
    }

    .product-name {
        font-size: 14px;
    }

    .product-price {
        font-size: 18px;
    }

    .product-actions {
        flex-direction: column;
    }

    .btn-product {
        width: 100%;
    }
}

/* Lazy loading placeholder */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Filtres et recherche */
.campaigns-filters {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-label {
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:hover {
    border-color: #E23FEA;
}

.filter-select:focus {
    outline: none;
    border-color: #E23FEA;
    box-shadow: 0 0 0 3px rgba(226, 63, 234, 0.1);
}

/* Supplier information and contact */
.supplier-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.supplier-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #312e81;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.supplier-meta {
    flex: 1;
}

.supplier-meta strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
}

.supplier-meta span {
    font-size: 12px;
    color: #64748b;
}

.supplier-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.supplier-actions a {
    font-size: 12px;
    color: #6366f1;
    text-decoration: none;
}

.supplier-actions a:hover {
    text-decoration: underline;
}

.contact-quick-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.contact-quick-actions a {
    flex: 1;
    min-width: 110px;
    text-align: center;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.contact-quick-actions a:hover {
    border-color: #E23FEA;
    color: #E23FEA;
}

/* Modal product summary */
.selected-product-block {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 15px;
    background: #f8fafc;
}

.selected-product-name {
    font-weight: 700;
    color: #0f172a;
}

.selected-product-meta {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

