/* ===========================================
   JadiBatik - Product Card Styles
   =========================================== */

/* Product Card Container */
.product-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

/* Product Image */
.product-card-image {
    display: block;
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.08);
}

/* Product Body */
.product-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Product Title */
.product-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    min-height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-card-title a:hover {
    color: #8B4513;
}

/* Product Price */
.product-card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #8B4513;
    margin-bottom: 15px;
}

/* Product Actions */
.product-card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: auto;
    position: relative;
    z-index: 2;
}

.btn-add-cart {
    flex: 1;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: #fff;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-cart:hover {
    background: linear-gradient(135deg, #6B3513 0%, #8B4513 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.4);
}

.btn-add-cart i {
    font-size: 1rem;
}

.btn-wishlist {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #eee;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-wishlist:hover {
    background: #ffe4e4;
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.btn-wishlist i {
    font-size: 1.2rem;
}

/* Grid Layout for Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-card-image {
        height: 220px;
    }

    .product-card-body {
        padding: 15px;
    }

    .btn-add-cart {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .btn-wishlist {
        width: 42px;
        height: 42px;
    }
}

/* Override old styles */
.product-item .cart-concern {
    display: none !important;
}

/* ===========================================
   Pagination Fixes
   =========================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 30px 0;
    gap: 5px;
    flex-wrap: wrap;
}

.pagination li {
    display: inline-block;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #fff;
}

.pagination li a:hover {
    background: #8B4513;
    border-color: #8B4513;
    color: #fff;
}

.pagination li.active span {
    background: #8B4513;
    border-color: #8B4513;
    color: #fff;
}

.pagination li.disabled span {
    color: #ccc;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* Page info text */
.page-item:first-child .page-link,
.page-item:last-child .page-link {
    border-radius: 8px;
}

/* ===========================================
   Product Detail Page Fixes
   =========================================== */
.product-info .form-control {
    height: 50px;
    border-radius: 8px;
    border: 2px solid #ddd;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

.product-info .btn-dark {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.product-info .btn-dark:hover {
    background: linear-gradient(135deg, #6B3513 0%, #8B4513 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.4);
}

.product-info .btn-outline-dark {
    border: 2px solid #ddd;
    color: #666;
    padding: 14px 20px;
    border-radius: 10px;
    background: #fff;
    transition: all 0.3s ease;
}

.product-info .btn-outline-dark:hover {
    background: #ffe4e4;
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* Add to cart form alignment */
.product-info form.d-flex {
    gap: 12px;
}

/* ===========================================
   Product Reviews Section
   =========================================== */
.reviews-section {
    padding: 40px 0;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.reviews-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.reviews-summary {
    display: flex;
    align-items: center;
    gap: 15px;
}

.average-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-number {
    font-size: 2rem;
    font-weight: 700;
    color: #8B4513;
}

.rating-stars {
    color: #ffc107;
    font-size: 1.2rem;
}

.rating-count {
    color: #666;
    font-size: 0.9rem;
}

.review-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviewer-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #8B4513;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.reviewer-name {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.review-date {
    color: #999;
    font-size: 0.85rem;
}

.review-rating {
    color: #ffc107;
}

.review-content {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.no-reviews {
    text-align: center;
    padding: 40px;
    color: #999;
}

.no-reviews i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* Write Review Button */
.btn-write-review {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-write-review:hover {
    background: linear-gradient(135deg, #6B3513 0%, #8B4513 100%);
    transform: translateY(-2px);
    color: #fff;
}