/* Catalog Professional Minimalist Design */
:root {
    --primary-color: #1a237e;
    --dark-blue: #0d47a1;
    --light-blue: #e3f2fd;
    --accent-gold: #ffd700;
    --success-green: #28a745;
    --warning-orange: #ff9800;
    --danger-red: #dc3545;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #e9ecef;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s ease;
}

/* Global Styles */
.catalog-section {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    min-height: 100vh;
    padding: 80px 0 3rem 0; /* Kurangi padding top dari 120px ke 80px */
}

.catalog-header {
    text-align: center;
    margin-bottom: 2rem; /* Kurangi margin bottom dari 4rem ke 2rem */
    position: relative;
    padding: 1rem 1rem; /* Kurangi padding dari 2rem ke 1rem */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.catalog-title {
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: break-word;
    hyphens: auto;
    word-break: break-word;
    padding: 0 1rem;
}

.catalog-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-light);
    font-weight: 400;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.6;
    padding: 0 1rem;
}

/* Filter Section */
.filter-section {
    margin-bottom: 3rem;
}

.filter-container {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--gray-100);
}

.filter-group {
    flex: 1;
    max-width: 320px;
}

.form-select {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    width: 100%;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.08);
}

.product-count {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: var(--gray-50);
    border-radius: 20px;
    border: 1px solid var(--gray-100);
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

/* Product Image */
.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--gray-50);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--gray-50);
    color: var(--text-light);
}

.no-image i {
    font-size: 2rem;
    opacity: 0.4;
}

/* Product Status */
.product-status {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.status-new,
.status-featured {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
    backdrop-filter: blur(8px);
}

.status-new {
    background: rgba(40, 167, 69, 0.9);
}

.status-featured {
    background: rgba(255, 193, 7, 0.9);
}

/* Product Info */
.product-info {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-category {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-link {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    align-self: flex-start;
}

.product-link:hover {
    color: var(--dark-blue);
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--gray-100);
    margin: 2rem 0;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* Loading Animation */
.loading-skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .catalog-section {
        padding: 100px 0 2rem 0;
    }

    .catalog-header {
        padding: 1rem 0.5rem;
        margin-bottom: 2rem;
    }
    
    .catalog-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
        margin-bottom: 1rem;
        padding: 0 0.5rem;
        line-height: 1.2;
    }

    .catalog-subtitle {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
        padding: 0 0.5rem;
        line-height: 1.5;
    }

    .filter-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .filter-group {
        max-width: 100%;
    }

    .product-count {
        margin-top: 0.5rem;
        text-align: center;
    }

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

    .product-info {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .catalog-section {
        padding: 90px 0 1rem 0;
    }
    
    .catalog-header {
        padding: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .catalog-title {
        font-size: clamp(1.2rem, 7vw, 2rem);
        margin-bottom: 0.8rem;
        padding: 0 0.25rem;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .catalog-subtitle {
        font-size: clamp(0.85rem, 4vw, 1rem);
        padding: 0 0.25rem;
    }

    .filter-container {
        margin: 0 0.5rem;
        padding: 0.8rem;
    }

    .form-select {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .product-count {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .products-grid {
        margin: 0 0.5rem;
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .product-info {
        padding: 0.8rem;
    }
    
    .pagination-container {
        margin: 0 0.5rem;
        text-align: center;
    }
}

/* Pagination Styles */
.pagination-container {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2.5rem;
    border: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: var(--text-light);
    font-size: 0.9rem;
}

.category-name {
    color: var(--primary-color);
    font-weight: 500;
}

.pagination {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    justify-content: center;
}

.page-item {
    display: flex;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    background: var(--white);
    border: 2px solid var(--gray-100);
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition);
    min-width: 44px;
    height: 44px;
}

.page-link:hover {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color), var(--dark-blue));
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.page-item.active .page-link {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color), var(--dark-blue));
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.page-item.disabled .page-link {
    color: var(--text-light);
    background: var(--gray-50);
    border-color: var(--gray-100);
    cursor: not-allowed;
    opacity: 0.6;
}

.page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
    background: var(--gray-50);
    color: var(--text-light);
}

.page-link i {
    font-size: 0.8rem;
}

/* Pagination Numbers */
.page-item:not(.disabled):not(.active) .page-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-blue));
    color: var(--white);
}

/* Print Styles */
@media print {
    .catalog-section {
        background: var(--white);
    }
    
    .product-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .product-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    
    .pagination-wrapper {
        display: none;
    }
}