/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    font-weight: 400;
    margin-bottom: 20px;
}

.main-nav {
    margin-top: 20px;
}

.admin-link {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-link:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-1px);
}

/* Filters */
.filters {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.range-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-input input {
    width: 100px;
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.range-input input:focus {
    outline: none;
    border-color: #3498db;
}

.range-input span {
    color: #7f8c8d;
    font-weight: 500;
}

.filter-group input[type="checkbox"] {
    margin-right: 8px;
}

.search-btn, .reset-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.search-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.search-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
    transform: translateY(-1px);
}

.reset-btn {
    background: #ecf0f1;
    color: #7f8c8d;
    border: 2px solid #bdc3c7;
}

.reset-btn:hover {
    background: #d5dbdb;
    border-color: #95a5a6;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
}

/* Company info */
.company-info {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.company-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 12px;
}

.company-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.product-title {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Advantages */
.advantages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.advantage-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    transition: all 0.2s ease;
}

.advantage-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.advantage-badge[data-code="top-product"] {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.advantage-badge[data-code="first-loan-0"] {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

.advantage-badge[data-code="get-0"] {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

.advantage-badge[data-code="3-minutes"] {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

.advantage-badge[data-code="top-speed"] {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.advantage-badge[data-code="card-money"] {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.advantage-badge[data-code="interest-free"] {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

.advantage-badge[data-code="free-subscription"] {
    background: linear-gradient(135deg, #16a085, #138d75);
    box-shadow: 0 2px 8px rgba(22, 160, 133, 0.3);
}

/* Amount */
.amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
}

/* Product details */
.product-details {
    margin-bottom: 24px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: 500;
}

.detail-value {
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 600;
}

.detail-value.highlight {
    color: #e74c3c;
    font-weight: 700;
}

.detail-value.success {
    color: #27ae60;
    font-weight: 700;
}

/* Action button */
.action-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.action-btn:active {
    transform: translateY(0);
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* No results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .range-input {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .product-card {
        padding: 20px;
    }
}

/* Company logo colors */
.logo-webbankir { background: linear-gradient(135deg, #f39c12, #e67e22); }
.logo-moneyman { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.logo-oneclick { background: linear-gradient(135deg, #e67e22, #d35400); }
.logo-cashtoyou { background: linear-gradient(135deg, #3498db, #2980b9); }
.logo-zaimer { background: linear-gradient(135deg, #2ecc71, #e67e22); }
.logo-bystrodengi { background: linear-gradient(135deg, #3498db, #2980b9); }
.logo-boostra { background: linear-gradient(135deg, #2c3e50, #34495e); }
.logo-lime { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.logo-yukki { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.logo-payps { background: linear-gradient(135deg, #3498db, #2980b9); }

/* Lead Modal */
.lead-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.lead-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lead-modal-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.lead-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.lead-modal-close:hover {
    color: #333;
}

.lead-modal-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 16px;
    text-align: center;
}

.lead-modal-text {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: center;
}

.lead-modal-content .form-group {
    margin-bottom: 20px;
}

.lead-modal-content label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.lead-modal-content input[type="text"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.lead-modal-content input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
}

.lead-modal-content .checkbox-group {
    margin-bottom: 24px;
}

.lead-modal-content .checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
    margin-bottom: 0;
}

.lead-modal-content .checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #3498db;
}

.lead-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.lead-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f6fa8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.lead-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 600px) {
    .lead-modal-content {
        padding: 30px 20px;
    }
    
    .lead-modal-content h2 {
        font-size: 24px;
    }
    
    .lead-modal-text {
        font-size: 14px;
    }
}
