/* 
 * Custom Product Catalog Styling
 * Color scheme: #927b00 (gold), #000000 (black), #FFFFFF (white)
 */

/* Top navbar with white background */
.navbar-light.bg-white {
    background-color: #FFFFFF !important;
    border-bottom: 2px solid #927b00;
    box-shadow: 0 2px 10px rgba(146, 123, 0, 0.1);
}

/* Page title styling */
.page-title {
    color: #000000;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #927b00, #000000);
    border-radius: 2px;
}

/* Product Grid Container */
.products-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 3rem 0;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(146, 123, 0, 0.1);
    margin-bottom: 2rem;
}

/* Enhanced Product Cards */
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: #ffffff;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #927b00, #000000);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    box-shadow: 0 6px 25px rgba(146, 123, 0, 0.15);
}

/* Product Image Container */
.product-image-container {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(45deg, #f8f9fa, #ffffff);
}

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

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

/* Enhanced Price Overlay */
.price-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #927b00;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(146, 123, 0, 0.3);
    backdrop-filter: blur(10px);
}

/* Product Content */
.product-card .card-body {
    padding: 1.5rem;
    background: #ffffff;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    min-height: 2.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 0.95rem;
    color: #555555;
    margin-bottom: 1.25rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.5rem;
}

/* Enhanced Buttons */
.btn-custom-outline {
    background: transparent;
    border: 2px solid #927b00;
    color: #927b00;
    font-weight: 600;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-custom-outline:hover {
    background: #927b00;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(146, 123, 0, 0.3);
}

.btn-custom-primary {
    background: #927b00;
    border: none;
    color: #ffffff;
    font-weight: 600;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-custom-primary:hover {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

/* Ensure pill shape for all add-to-cart button states */
.add-to-cart-btn,
.add-to-cart-btn:hover,
.add-to-cart-btn:focus,
.add-to-cart-btn:active,
.add-to-cart-btn:disabled,
.add-to-cart-btn[disabled],
.add-to-cart-btn.btn-success,
.add-to-cart-btn.btn-secondary,
.add-to-cart-btn.btn-danger {
    border-radius: 25px !important;
}

/* Quantity Input */
.quantity-input {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-weight: 600;
    color: #000000;
    transition: border-color 0.3s ease;
}

.quantity-input:focus {
    border-color: #927b00;
    box-shadow: 0 0 0 0.2rem rgba(146, 123, 0, 0.25);
}

/* Stock Indicators */
.stock-warning {
    color: #dc3545;
    font-weight: 600;
}

.stock-low {
    color: #fd7e14;
    font-weight: 600;
}

/* Enhanced Pagination */
.pagination {
    margin-bottom: 0;
    justify-content: center;
}

.pagination .page-link {
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    color: #927b00;
    background-color: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    color: #ffffff;
    background: #927b00;
    border-color: #927b00;
    box-shadow: 0 4px 15px rgba(146, 123, 0, 0.3);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #e9ecef;
    cursor: not-allowed;
}

.pagination .page-link:hover:not(.disabled) {
    color: #ffffff;
    background: #927b00;
    border-color: #927b00;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(146, 123, 0, 0.2);
}

/* Load More Button for Mobile */
.btn-load-more {
    background: linear-gradient(135deg, #927b00, #000000);
    border: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    border-radius: 30px;
    box-shadow: 0 6px 25px rgba(146, 123, 0, 0.3);
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: linear-gradient(135deg, #000000, #927b00);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

/* End of Results Message */
.end-message {
    color: #666666;
    font-size: 1.1rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-top: 2rem;
}

/* Mobile Responsive Adjustments */
@media (max-width: 767.98px) {
    .page-title {
        font-size: 2rem;
    }
    
    .products-wrapper {
        padding: 2rem 0;
        border-radius: 15px;
    }
    
    .product-image-container {
        height: 220px;
    }
    
    .product-card {
        border-radius: 12px;
        margin-bottom: 1.5rem;
    }
    
    .product-card:hover {
        box-shadow: 0 4px 20px rgba(146, 123, 0, 0.12);
    }
    
    .btn-load-more {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
}

/* Tablet Responsive */
@media (min-width: 768px) and (max-width: 991.98px) {
    .product-image-container {
        height: 240px;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .product-image-container {
        height: 300px;
    }
    
    .products-wrapper {
        padding: 4rem 0;
    }
}

/* Loading States and Animations */
.loading-product-card {
    opacity: 0.7;
    pointer-events: none;
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth loading animation for new products */
.new-product {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Metadata Information */
.metadata {
    margin-bottom: 1.5rem; /* One line of whitespace below */
    padding: 0.5rem 0;
    border-top: 1px solid #f0f0f0;
}

.metadata .retail-price,
.metadata .stock-price,
.metadata .volume-info,
.metadata .creation-date-info,
.metadata .best-before-info,
.metadata .quantity-info,
.metadata .price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.125rem; /* Reduced horizontal space between lines */
    font-size: 0.75em; /* Set font size to 0.75em as requested */
    line-height: 1.2;
}

.metadata .price .price-caption,
 .metadata .price .price-value {
    color: #000000;
    font-weight: 600;
}

.metadata .quantity-info {
    margin-bottom: 0; /* No margin for last line */
}

.metadata .price-caption {
    color: #666666;
    font-weight: 500;
    font-size: inherit; /* Inherit the 0.75em from parent */
}

.metadata .price-value {
    color: #927b00; /* Use brand gold color for all metadata values */
    font-weight: 600;
    font-size: inherit; /* Inherit the 0.75em from parent */
}

/* Expired BBD date styling */
.metadata .price-value.expired-date {
    color: #dc3545 !important; /* Red color for expired dates */
}

/* Filters and Sorting Section */
.filters-sorting-section {
    background-color: #927b00;
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(146, 123, 0, 0.2);
}

.filter-label {
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.filter-select {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.9);
    color: #333333;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.filter-select:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    background-color: #ffffff;
}

.filter-spinner {
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    z-index: 10;
}

.filter-spinner .spinner-border {
    color: #927b00;
    width: 1rem;
    height: 1rem;
}

.filter-info {
    text-align: right;
    font-weight: bold;
    font-size: 1rem;
    color: white;
}

.filter-info span {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
}

/* Mobile responsive filters */
@media (max-width: 767.98px) {
    .filters-sorting-section {
        padding: 1rem;
    }
    
    .filter-info {
        text-align: center;
        margin-top: 1rem;
    }
    
    .filter-info span {
        font-size: 0.9rem;
    }
}

/* Remove default Bootstrap styling where needed */
.container-fluid.custom-products {
    background: #f8f9fa;
    padding: 2rem 0;
    min-height: 80vh;
}

/* Subtle gradient background */
body {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}
