/* AECO Tools & Products - Frontend Styles */
/* Matching AECO.digital gradient design #7bb52b #8ac932 */

.aeco-products-directory {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Directory Header */
.aeco-directory-header {
    background: linear-gradient(135deg, #6B4FBB 0%, #2E8BC0 50%, #00D4AA 100%);
    padding: 60px 40px;
    border-radius: 16px;
    margin-bottom: 30px;
    text-align: center;
    color: white;
}

.directory-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 16px 0;
    color: white;
    line-height: 1.2;
    text-align: center;
}

.directory-subtitle {
    font-size: 1.25rem;
    margin: 0;
    opacity: 0.95;
    font-weight: 400;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .aeco-directory-header {
        padding: 40px 24px;
    }
    
    .directory-title {
        font-size: 2rem;
    }
    .directory-subtitle {
        font-size: 1.1rem;
    }
}

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

@media (max-width: 768px) {
    .aeco-products-grid {
        grid-template-columns: 1fr;
    }
}

/* Product Card */
.aeco-product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid #f0f0f0;
}

.aeco-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(123, 181, 43, 0.15);
    border-color: #7bb52b;
}

/* Logo Emoji - Top Left */
.product-logo {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 2.5rem;
    line-height: 1;
    z-index: 2;
    background: white;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Product Content */
.product-content {
    padding: 24px;
    padding-top: 90px; /* Space for logo */
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Product Header */
.product-header {
    margin-bottom: 12px;
}

.product-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.product-name a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-name a:hover {
    color: #7bb52b;
}

.company-name {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
    margin-bottom: 16px;
}

.company-name a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.company-name a:hover {
    color: #7bb52b;
}

/* Product Category Badge */
.product-category-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid #bbf7d0;
}

/* Product Description */
.product-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
    flex: 1;
}

/* Score Section */
.product-score-section {
    background: linear-gradient(135deg, #f0f0ff 0%, #e8e8ff 100%);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    border-left: 4px solid #712baf;
}

.score-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #712baf;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.score-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #712baf;
    line-height: 1;
}

.score-max {
    font-size: 1.2rem;
    font-weight: 600;
    color: #999;
}

/* Key Features */
.product-features {
    margin-bottom: 20px;
}

.features-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    padding: 6px 0 6px 24px;
    position: relative;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.5;
}

.features-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #7bb52b;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Product Actions */
.product-actions {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.view-audit-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #2E8BC0 0%, #00D4AA 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 139, 192, 0.2);
    letter-spacing: 0.3px;
}

.view-audit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 139, 192, 0.3);
    background: linear-gradient(135deg, #2E8BC0 0%, #00E5BB 100%);
}

/* No Results */
.aeco-no-results,
.aeco-no-products {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
}

/* Filter Section (if needed) */
.aeco-filter-section {
    background: white;
    padding: 24px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.aeco-filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 16px;
    align-items: flex-end;
}

@media (max-width: 1024px) {
    .aeco-filters {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .aeco-filters {
        grid-template-columns: 1fr;
    }
}

.aeco-search-box,
.aeco-filter-group,
.aeco-sort-group,
.aeco-reset-group {
    display: flex;
    flex-direction: column;
}

.aeco-search-box label,
.aeco-filter-group label,
.aeco-sort-group label,
.aeco-reset-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
    font-size: 0.9rem;
}

#aeco-search,
select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

#aeco-search:focus,
select:focus {
    outline: none;
    border-color: #7bb52b;
}

.aeco-reset-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #7bb52b 0%, #8ac932 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 46px;
    font-family: inherit;
}

.aeco-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 181, 43, 0.3);
}

/* Loading State */
.aeco-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.aeco-loading:before {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top-color: #7bb52b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Badge Styles */
.product-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.product-badge.featured {
    background: #fef3c7;
    color: #92400e;
}

.product-badge.trending {
    background: #fee2e2;
    color: #991b1b;
}

/* Pagination - HORIZONTAL LAYOUT */
.aeco-pagination {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    padding: 0 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.page-link:hover:not(.disabled):not(.current) {
    border-color: #7bb52b;
    background: #f0fdf4;
    color: #166534;
    transform: translateY(-2px);
}

.page-link.current {
    background: linear-gradient(135deg, #7bb52b 0%, #8ac932 100%);
    border-color: #7bb52b;
    color: white;
    cursor: default;
}

.page-link.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #999;
}

.page-link.prev-link,
.page-link.next-link {
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0 20px;
}

.page-link.dots {
    border: none;
    background: transparent;
    cursor: default;
    pointer-events: none;
    font-weight: 700;
}

@media (max-width: 640px) {
    .aeco-pagination {
        gap: 6px;
    }
    
    .page-link {
        min-width: 44px;
        height: 44px;
        padding: 0 12px;
        font-size: 0.9rem;
    }
}
