/* Catalog Page Styles */

/* Page Header (New) */
.products-page-header {
    background-color: #F5F9FF; /* Updated background */
    padding-top: 40px;
    padding-bottom: 56px;
    position: relative;
    z-index: 5;
}

.products-header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
}

.products-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #64748B;
    margin-bottom: 24px;
}

.products-breadcrumbs a,
.products-breadcrumbs .breadcrumb-link {
    color: #334155;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: color 0.2s;
}

.products-breadcrumbs a:hover {
    color: #193B7B;
}

.products-breadcrumbs .sep {
    color: #CBD5E1;
    display: flex;
    align-items: center;
}

.products-breadcrumbs .current {
    color: #64748B;
}

.products-page-title {
    font-size: 40px;
    font-weight: 600;
    /* Updated color with gradient */
    background: linear-gradient(180deg, #14284E 5.65%, #2E5CB4 92.34%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #14284E; /* Fallback */
    
    margin-bottom: 16px;
    line-height: 1.1;
    text-align: center;
}

.products-page-description {
    max-width: 700px;
    margin: 0 auto;
    color: #334155;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
}

/* Catalog Grid Section */
.catalog-content-section {
    padding: 40px 0 100px;
    background-color: #fff;
}

.catalog-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Filters */
.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: flex-start;
}

.catalog-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background-color: transparent; /* Transparent background */
    border: 1px solid #94A3B8; /* Inactive border color */
    border-radius: 8px; /* More square radius */
    color: #64748B; /* Inactive text color */
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.catalog-filter-btn:hover {
    background-color: transparent;
    color: #13519C;
    border-color: #13519C;
}

.catalog-filter-btn.active {
    background-color: transparent; /* Transparent background */
    color: #13519C; /* Active text color */
    border-color: #13519C; /* Active border color */
}

/* Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 60px;
}

.catalog-card {
    background: #fff;
    /* Removed border */
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: box-shadow 0.3s ease; /* Removed transform transition */
    display: flex;
    flex-direction: column;
    padding: 8px; /* Minimal padding */
}

.catalog-card:hover {
    /* Removed transform */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    /* Removed border-color */
}

.catalog-card-image-box {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    background-color: #F8FAFC;
    overflow: hidden;
    border-radius: 12px; /* Added radius to image box */
}

.catalog-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.catalog-card:hover .catalog-card-img {
    transform: scale(1.05);
}

.catalog-card-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog-card-placeholder::after {
    content: '';
    width: 40px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.5;
}

.catalog-card-tags {
    position: absolute;
    bottom: 12px; /* Changed from top to bottom */
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 2;
    top: auto; /* Reset top */
}

.catalog-tag {
    background: #F5F9FF; /* Updated background */
    /* Removed backdrop-filter */
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 300; /* Updated font-weight */
    color: #0C3C75; /* Updated color */
    box-shadow: none; /* Removed shadow */
}

.catalog-card-content {
    padding: 16px 8px 8px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.catalog-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #0F172A;
    margin: 0 0 16px;
    line-height: 1.4;
}

.catalog-card-client {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column; /* Changed to column */
    align-items: flex-start;
    gap: 4px;
    font-size: 14px;
}

.catalog-card-client .label {
    color: #898989;
    font-weight: 300;
    font-size: 12px;
}

.catalog-card-client .value {
    color: #334155;
    font-weight: 500;
}

.catalog-card-details {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 0;
    border-top: none; /* Removed border */
}

.detail-item {
    display: flex;
    flex-direction: column; /* Changed to column */
    align-items: flex-start;
    gap: 4px;
    font-size: 13px;
}

.detail-item .label {
    color: #898989;
    font-weight: 300;
    font-size: 12px;
}

.detail-item .value {
    color: #475569;
    font-weight: 500;
}

/* Pagination */
.catalog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.catalog-load-more-wrapper {
    display: flex;
    gap: 8px; /* Gap between two buttons */
}

/* Base style for both buttons */
.catalog-load-more-btn,
.catalog-load-more-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid #13519C;
    border-radius: 8px;
    color: #13519C;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* Text button specific */
.catalog-load-more-btn {
    padding: 10px 24px;
    font-size: 16px;
    font-weight: 500;
}

/* Icon button specific */
.catalog-load-more-icon {
    padding: 10px;
    width: 44px; /* Ensure square-ish shape */
    height: 44px;
}

.catalog-load-more-btn:hover,
.catalog-load-more-icon:hover {
    background-color: transparent;
    border-color: #13519C;
    opacity: 0.8;
}

.catalog-load-more-icon svg {
    transition: transform 0.3s ease;
}

.catalog-load-more-icon:hover svg {
    transform: translateY(2px);
}

/* Responsive */
@media (max-width: 1200px) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .products-page-header {
        padding-top: 32px;
    }
    
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .catalog-content-section {
        padding: 40px 0 80px;
    }
}

@media (max-width: 768px) {
    .products-page-header {
        padding-top: 24px;
    }
    .products-breadcrumbs {
        margin-bottom: 20px;
    }
    
    .products-header-container,
    .catalog-container {
        padding: 0 20px;
    }
    
    .products-page-title {
        font-size: 36px;
    }
    
    .catalog-filters {
        gap: 8px;
        margin-bottom: 32px;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 4px; /* Hide scrollbar potentially or show */
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }
    
    .catalog-filters::-webkit-scrollbar {
        display: none;
    }
    
    .catalog-filter-btn {
        padding: 10px 20px;
        font-size: 14px;
        flex-shrink: 0;
    }
}

@media (max-width: 576px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.catalog-grid.loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.catalog-load-more-wrapper.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.catalog-load-more-wrapper.loading .catalog-load-more-icon svg {
    animation: spin 1s linear infinite;
}

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