/**
 * Produk CSS - MyBSS
 * CSS khusus untuk halaman produk dan detail produk
 * Diperbarui dengan desain modern dan responsif
 */

/* ===== BREADCRUMB STYLING ===== */
.breadcrumb-section {
    background-color: #f8f9fa;
    padding: 15px 0;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.breadcrumb-content h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.breadcrumb {
    margin-bottom: 0;
    padding: 0;
}

.breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* ===== FILTER SIDEBAR STYLING ===== */
.filter-sidebar {
    position: sticky;
    top: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
    height: calc(100vh - 40px);
    overflow-y: auto;
    margin-bottom: 20px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.filter-header h5 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0;
    color: #333;
}

.filter-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #555;
}

.input-group .form-control {
    border-radius: 5px 0 0 5px;
}

.input-group .btn {
    border-radius: 0 5px 5px 0;
}

.category-list .form-check {
    margin-bottom: 8px;
}

.category-list .form-check-label {
    font-size: 0.9rem;
}

.price-range .form-label.small {
    font-size: 0.85rem;
    font-weight: 500;
}

.price-range .input-group-sm .form-control {
    height: calc(1.8125rem + 2px);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.price-range .input-group-sm .input-group-text {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.price-slider {
    margin-top: 15px;
    margin-bottom: 20px;
}

.price-slider .form-range {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 5px;
    outline: none;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
}

.price-slider .form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background-color: #007bff;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.price-slider .form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background-color: #007bff;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.price-display {
    font-size: 0.85rem;
    margin-top: 10px;
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
}

.form-range::-webkit-slider-thumb {
    background-color: #007bff;
}

.form-range::-moz-range-thumb {
    background-color: #007bff;
}

/* Filter buttons styling */
.filter-buttons {
    margin-top: 20px;
}

.filter-buttons .btn {
    transition: all 0.3s ease;
}

.filter-buttons .btn-primary {
    background-color: #dc3545;
    border-color: #dc3545;
}

.filter-buttons .btn-primary:hover {
    background-color: #c82333;
    border-color: #bd2130;
    transform: translateY(-2px);
}

.filter-buttons .btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

.filter-buttons .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: #fff;
    transform: translateY(-2px);
}

/* Search box styling */
.search-box {
    position: relative;
}

.search-box .form-control {
    border: 1px solid #ced4da;
    border-radius: 5px 0 0 5px;
    transition: all 0.3s ease;
}

.search-box .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.search-box .btn {
    border-radius: 0 5px 5px 0;
}

.search-box .btn:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

/* ===== PRODUCTS HEADER STYLING ===== */
.products-header {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.products-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
    color: #333;
}

.products-header .sort-options {
    display: flex;
    align-items: center;
}

.products-header .sort-options label {
    margin-right: 10px;
    margin-bottom: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.products-header .form-select {
    min-width: 200px;
    border-radius: 5px;
}

/* ===== PRODUCT GRID STYLING ===== */
.product-grid {
    margin-top: 20px;
}

/* ===== PRODUCT CARD STYLING ===== */
.product-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    border: none;
}

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

.product-image-container {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Product badge styling */
.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1;
}

.product-badge .badge {
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.badge-new {
    background-color: #28a745;
    color: #fff;
}

.badge-sale {
    background-color: #dc3545;
    color: #fff;
}

.badge-featured {
    background-color: #ffc107;
    color: #212529;
}

/* Card body styling */
.card-body {
    padding: 20px;
}

/* Product info styling */
.product-title {
    height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 10px;
}

.product-title a {
    color: #212529;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s ease;
}

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

.product-rating {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.product-rating .stars {
    color: #ffc107;
    display: flex;
    gap: 2px;
}

.product-rating .rating-count {
    color: #6c757d;
    font-size: 0.8rem;
    margin-left: 5px;
}

.product-category {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.product-category a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-category a:hover {
    color: #007bff;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #212529;
}

.original-price {
    font-size: 0.9rem;
    color: #6c757d;
    text-decoration: line-through;
}

.discount-percent {
    background-color: #dc3545;
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

.product-description {
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* Product actions styling */
.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    font-size: 0.9rem;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn i {
    margin-right: 5px;
}

.btn-primary {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-primary:hover {
    background-color: #c82333;
    border-color: #bd2130;
    transform: translateY(-2px);
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: #fff;
    transform: translateY(-2px);
}

/* ===== PAGINATION STYLING ===== */
.pagination-container {
    margin-top: 30px;
    margin-bottom: 60px;
}

.pagination {
    justify-content: center;
}

.page-item .page-link {
    color: #007bff;
    border-color: #dee2e6;
    transition: all 0.3s ease;
}

.page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.page-item .page-link:hover {
    background-color: #e9ecef;
    color: #0056b3;
}

/* ===== RESPONSIVE STYLING ===== */
@media (max-width: 991.98px) {
    .filter-sidebar {
        position: static;
        height: auto;
        margin-bottom: 30px;
    }
    
    .products-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .products-header .sort-options {
        margin-top: 15px;
        width: 100%;
    }
    
    .products-header .form-select {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .product-image-container {
        height: 180px;
    }
    
    .product-title {
        height: 44px;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

@media (max-width: 575.98px) {
    .product-image-container {
        height: 160px;
    }
    
    .product-title {
        font-size: 0.9rem;
        height: 40px;
    }
    
    .current-price {
        font-size: 1rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 5px;
    }
}

/* ===== PRODUCT DETAIL PAGE STYLING ===== */
.product-detail-section {
    padding: 30px 0 60px;
}

.product-gallery {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.main-image {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.main-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.thumbnail-slider {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
    overflow-x: auto;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail.active {
    border-color: #007bff;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-detail {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

.product-info-detail .product-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    height: auto;
}

.product-meta {
    margin: 20px 0;
}

.meta-item {
    display: flex;
    margin-bottom: 10px;
}

.meta-label {
    font-weight: 600;
    width: 120px;
    color: #495057;
}

.meta-value {
    color: #212529;
}

.meta-value.in-stock {
    color: #28a745;
    font-weight: 600;
}

.meta-value.out-of-stock {
    color: #dc3545;
    font-weight: 600;
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.quantity-label {
    font-weight: 600;
    margin-right: 15px;
    color: #495057;
}

.quantity-input-group {
    display: flex;
    align-items: center;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.quantity-btn.minus {
    border-radius: 5px 0 0 5px;
}

.quantity-btn.plus {
    border-radius: 0 5px 5px 0;
}

.quantity-btn:hover {
    background-color: #e9ecef;
}

.quantity-input {
    width: 60px;
    height: 40px;
    border: 1px solid #ced4da;
    border-left: none;
    border-right: none;
    text-align: center;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.action-buttons .btn {
    flex: 1;
    padding: 12px 20px;
}

.out-of-stock-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    display: flex;
    align-items: center;
}

.out-of-stock-message i {
    font-size: 1.2rem;
    margin-right: 10px;
}

.product-details-tabs {
    margin-top: 40px;
}

.nav-tabs {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: #495057;
}

.nav-tabs .nav-link.active {
    color: #007bff;
    border-bottom: 2px solid #007bff;
}

.tab-content {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

.product-description-content {
    color: #495057;
    line-height: 1.6;
}

.product-specifications table {
    width: 100%;
}

.product-specifications th {
    width: 30%;
    color: #495057;
}

.related-products {
    margin-top: 60px;
}

.related-products h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #212529;
    text-align: center;
}

@media (max-width: 991.98px) {
    .main-image {
        height: 350px;
    }
}

@media (max-width: 767.98px) {
    .main-image {
        height: 300px;
    }
    
    .product-info-detail {
        padding: 20px;
    }
    
    .product-info-detail .product-title {
        font-size: 1.3rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 575.98px) {
    .main-image {
        height: 250px;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .product-info-detail .product-title {
        font-size: 1.2rem;
    }
    
    .meta-item {
        flex-direction: column;
    }
    
    .meta-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .tab-content {
        padding: 20px;
    }
}