/* CSS untuk Halaman Produk Baru */

/* Header Halaman */
.page-header {
    background-color: #f5f5f5;
    padding: 30px 0;
    margin-bottom: 30px;
    text-align: center;
    background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-bottom: 1px solid #e0e0e0;
}

.page-header h1 {
    margin: 0;
    font-size: 32px;
    color: #333;
    font-weight: 700;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}

.page-header p {
    margin: 10px 0 0;
    color: #555;
    font-size: 16px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Bagian Produk */
.products-section {
    padding: 30px 0 60px;
}

/* Grid Produk */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

/* Kartu Produk */
.product-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Gambar Produk */
.product-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    overflow: hidden;
    position: relative;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    background-color: #f8f8f8; /* Latar belakang untuk gambar transparan */
}

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

/* Badge Produk */
.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.product-badge.new {
    background-color: #4caf50;
    color: white;
}

/* Informasi Produk */
.product-info {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #d32f2f;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 12px;
    color: #666;
}

.product-category, .product-brand {
    display: inline-block;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #d32f2f;
    margin-bottom: 15px;
}

.price {
    display: block;
}

/* Aksi Produk */
.product-actions {
    display: flex;
    gap: 10px;
}

.add-to-cart {
    flex-grow: 1;
    background-color: #d32f2f;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.add-to-cart:hover {
    background-color: #b71c1c;
}

.add-to-wishlist {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-wishlist:hover {
    background-color: #ffebee;
    color: #d32f2f;
}

/* Pesan Tidak Ada Produk */
.no-products {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    margin: 30px 0;
}

.no-products p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.no-products .btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.no-products .btn-primary {
    background-color: #d32f2f;
    color: #fff;
    border: 1px solid #d32f2f;
}

.no-products .btn-primary:hover {
    background-color: #b71c1c;
    border-color: #b71c1c;
}

/* Paginasi */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a, 
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    margin: 0 5px 5px;
    padding: 0 10px;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
}

.pagination a:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.pagination .active {
    background-color: #d32f2f;
    color: #fff;
    border-color: #d32f2f;
}

.pagination .disabled {
    color: #aaa;
    cursor: not-allowed;
    background-color: #f8f8f8;
}

.pagination .ellipsis {
    border: none;
    background: transparent;
    min-width: 20px;
    padding: 0;
    margin: 0;
}

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

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .pagination a, 
    .pagination span {
        min-width: 30px;
        height: 30px;
        margin: 0 2px 5px;
        font-size: 13px;
    }
}