/* PRODUCT PAGES DARK MODE READABILITY FIXES */
/* Specific fixes for product displays in dark mode */

/* ===== HALAMAN PRODUK FIXES ===== */

/* Product Card Text Improvements */
body.dark-mode .product-card {
    background: var(--dark-bg-card-improved, #1e293b) !important;
    border: 1px solid #475569 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .product-card:hover {
    background: #334155 !important;
    border-color: var(--dark-accent, #d4af37) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4) !important;
}

/* Product Title - Make it much brighter */
body.dark-mode .product-title,
body.dark-mode .product-card .product-title,
body.dark-mode .product-card h5,
body.dark-mode .product-card h4 {
    color: #f8fafc !important; /* Very bright white */
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* Product Specifications - Brighter secondary text */
body.dark-mode .product-specs,
body.dark-mode .product-card .product-specs,
body.dark-mode .product-card .text-muted {
    color: #cbd5e1 !important; /* Much brighter than original */
    font-weight: 500 !important;
}

/* Product Price - Enhanced visibility */
body.dark-mode .product-price,
body.dark-mode .product-card .product-price {
    color: var(--dark-accent, #d4af37) !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3) !important;
}

/* Stock Information */
body.dark-mode .stock-info,
body.dark-mode .product-card .stock-info,
body.dark-mode .badge {
    background: rgba(212, 175, 55, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
}

/* Product Actions/Buttons */
body.dark-mode .product-actions .btn,
body.dark-mode .product-card .btn {
    background: var(--dark-accent, #d4af37) !important;
    color: #1a1a1a !important;
    border: none !important;
    font-weight: 600 !important;
}

body.dark-mode .product-actions .btn:hover,
body.dark-mode .product-card .btn:hover {
    background: #f4e17a !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4) !important;
}

/* ===== FEATURED PRODUCTS FIXES (Homepage) ===== */

/* Featured Product Card Background */
body.dark-mode .featured-product-card {
    background: var(--dark-bg-card-improved, #1e293b) !important;
    border: 1px solid #475569 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .featured-product-card:hover {
    background: #334155 !important;
    border-color: var(--dark-accent, #d4af37) !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4) !important;
}

/* Featured Product Name - Much brighter */
body.dark-mode .featured-product-card .product-name,
body.dark-mode .featured-products .product-name {
    color: #f8fafc !important; /* Very bright white */
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* Featured Product Specs - Enhanced readability */
body.dark-mode .featured-product-card .product-specs,
body.dark-mode .featured-products .product-specs {
    color: #cbd5e1 !important; /* Much brighter secondary text */
    font-weight: 500 !important;
}

/* Featured Product Price - Enhanced gold */
body.dark-mode .featured-product-card .product-price,
body.dark-mode .featured-products .product-price {
    color: var(--dark-accent, #d4af37) !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3) !important;
}

/* ===== PRODUCT GRID & LISTING FIXES ===== */

/* Product Grid Container */
body.dark-mode .product-grid {
    background: transparent !important;
}

/* Product Category Headers */
body.dark-mode .category-header,
body.dark-mode .section-title {
    color: #f8fafc !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Product Filters */
body.dark-mode .filter-box {
    background: var(--dark-bg-card-improved, #1e293b) !important;
    border: 1px solid #475569 !important;
    color: #f8fafc !important;
}

body.dark-mode .filter-box .form-label {
    color: #f8fafc !important;
    font-weight: 600 !important;
}

body.dark-mode .filter-box .form-select,
body.dark-mode .filter-box .form-control {
    background: #374151 !important;
    border: 1px solid #4b5563 !important;
    color: #f8fafc !important;
}

/* Product Sorting */
body.dark-mode .product-sorting {
    background: var(--dark-bg-card-improved, #1e293b) !important;
    border: 1px solid #475569 !important;
    color: #f8fafc !important;
}

/* ===== PAGINATION FIXES ===== */
body.dark-mode .pagination .page-link {
    background: var(--dark-bg-card-improved, #1e293b) !important;
    border: 1px solid #475569 !important;
    color: #cbd5e1 !important;
}

body.dark-mode .pagination .page-link:hover {
    background: #374151 !important;
    color: #f8fafc !important;
    border-color: var(--dark-accent, #d4af37) !important;
}

body.dark-mode .pagination .page-item.active .page-link {
    background: var(--dark-accent, #d4af37) !important;
    border-color: var(--dark-accent, #d4af37) !important;
    color: #1a1a1a !important;
}

/* ===== PRODUCT DETAILS/MODAL FIXES ===== */
body.dark-mode .product-details {
    background: var(--dark-bg-card-improved, #1e293b) !important;
    color: #f8fafc !important;
}

body.dark-mode .product-details h1,
body.dark-mode .product-details h2,
body.dark-mode .product-details h3 {
    color: #f8fafc !important;
    font-weight: 700 !important;
}

body.dark-mode .product-details p {
    color: #cbd5e1 !important;
    line-height: 1.6 !important;
}

/* ===== BREADCRUMB FIXES ===== */
body.dark-mode .breadcrumb {
    background: transparent !important;
}

body.dark-mode .breadcrumb-item {
    color: #cbd5e1 !important;
}

body.dark-mode .breadcrumb-item.active {
    color: #f8fafc !important;
    font-weight: 600 !important;
}

body.dark-mode .breadcrumb-item + .breadcrumb-item::before {
    color: #6b7280 !important;
}

/* ===== SEARCH RESULTS FIXES ===== */
body.dark-mode .search-results .product-card {
    background: var(--dark-bg-card-improved, #1e293b) !important;
    border: 1px solid #475569 !important;
}

body.dark-mode .search-no-results {
    color: #cbd5e1 !important;
    text-align: center !important;
    padding: 40px 20px !important;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
    body.dark-mode .featured-product-card .product-name {
        font-size: 0.9rem !important;
        color: #f8fafc !important;
        font-weight: 600 !important;
    }
    
    body.dark-mode .featured-product-card .product-specs {
        font-size: 0.8rem !important;
        color: #cbd5e1 !important;
    }
    
    body.dark-mode .featured-product-card .product-price {
        font-size: 1.1rem !important;
        color: var(--dark-accent, #d4af37) !important;
        font-weight: 700 !important;
    }
}

@media (max-width: 576px) {
    body.dark-mode .product-card .product-title {
        font-size: 0.9rem !important;
        color: #f8fafc !important;
    }
    
    body.dark-mode .product-card .product-specs {
        font-size: 0.8rem !important;
        color: #cbd5e1 !important;
    }
}

/* ===== HOVER STATES & ANIMATIONS ===== */
body.dark-mode .product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.dark-mode .featured-product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ===== FOCUS STATES FOR ACCESSIBILITY ===== */
body.dark-mode .product-card:focus,
body.dark-mode .featured-product-card:focus {
    outline: 2px solid var(--dark-accent, #d4af37) !important;
    outline-offset: 4px !important;
}

/* ===== LOADING STATES ===== */
body.dark-mode .product-loading {
    background: var(--dark-bg-card-improved, #1e293b) !important;
    color: #cbd5e1 !important;
}

/* ===== ERROR STATES ===== */
body.dark-mode .product-error {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid #ef4444 !important;
    color: #fca5a5 !important;
}

/* ===== ADDITIONAL CONTRAST IMPROVEMENTS ===== */

/* Any remaining product-related text elements */
body.dark-mode .product-info,
body.dark-mode .product-description,
body.dark-mode .product-features {
    color: #cbd5e1 !important;
}

body.dark-mode .product-info h5,
body.dark-mode .product-description h5,
body.dark-mode .product-features h5 {
    color: #f8fafc !important;
    font-weight: 600 !important;
}

/* Product badges and labels */
body.dark-mode .product-badge,
body.dark-mode .price-badge,
body.dark-mode .discount-badge {
    background: rgba(212, 175, 55, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
}

/* Product ratings/reviews */
body.dark-mode .product-rating {
    color: #fbbf24 !important;
}

body.dark-mode .product-reviews {
    color: #cbd5e1 !important;
}

/* Ensure all text in product sections is readable */
body.dark-mode .products-section,
body.dark-mode .featured-products-section {
    color: #f8fafc !important;
}

body.dark-mode .products-section h2,
body.dark-mode .featured-products-section h2,
body.dark-mode .products-section h3,
body.dark-mode .featured-products-section h3 {
    color: #f8fafc !important;
    font-weight: 700 !important;
}
