/* Products Page Specific Styles */

/* Product Grid Layout - Bootstrap Compatible */
.product-grid .row {
    margin: 0 -0.75rem;
}

.product-grid .col-md-4,
.product-grid .col-6 {
    padding: 0 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
}

.product-grid .product-card {
    position: relative; /* Added for social share positioning */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-height: 450px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: visible; /* Changed from hidden to visible for social share */
    border: 1px solid rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.product-grid .product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
}

.product-grid .product-image-container {
    flex-shrink: 0;
    position: relative;
    height: 220px;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-grid .product-image {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.product-grid .product-card:hover .product-image {
    transform: scale(1.05);
}

.product-grid .product-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background: white;
}

/* Product Actions */
.product-grid .product-actions {
    margin-top: auto;
}

/* Stock Info Styling */
.product-grid .stock-info {
    margin-top: 0.5rem;
}

.product-grid .stock-info small {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    display: inline-block;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.product-grid .stock-info .text-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #e67e22 !important;
    border: 1px solid #f39c12;
    box-shadow: 0 1px 3px rgba(243, 156, 18, 0.2);
}

.product-grid .stock-info .text-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #ffeaa7 100%);
    color: #c0392b !important;
    border: 1px solid #e74c3c;
    box-shadow: 0 1px 3px rgba(231, 76, 60, 0.2);
}

/* Product Price Styling */
.product-grid .product-price .current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #d4af37 !important; /* Gold color */
}

.product-grid .current-price {
    color: #d4af37 !important; /* Gold color */
}

.gold-text {
    color: #d4af37 !important; /* Gold color */
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.product-badge.new {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.product-badge.used {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
}

/* Ensure equal height cards */

/* Fix card layout */
.product-card .product-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.product-card .product-actions {
    margin-top: auto;
    padding-top: 1rem;
}

/* Filter Section */
.filter-box {
    position: sticky;
    top: 100px;
}

.filter-box .form-check-input:checked {
    background-color: var(--gold);
    border-color: var(--gold);
}

.filter-box .form-check-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

/* Search and Sort Bar */
.product-sorting .form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

.product-sorting .form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

/* Pagination */
.pagination .page-link {
    color: var(--gold);
    border-color: var(--gold-light);
}

.pagination .page-link:hover {
    color: white;
    background-color: var(--gold);
    border-color: var(--gold);
}

.pagination .page-item.active .page-link {
    background-color: var(--gold);
    border-color: var(--gold);
}

/* Dark Mode Support */
body.dark-mode .product-card {
    background: var(--dark-card-bg);
    border: 1px solid var(--dark-border);
}

body.dark-mode .product-title {
    color: var(--dark-text-primary);
}

body.dark-mode .product-specs {
    color: var(--dark-text-secondary);
}

body.dark-mode .filter-box {
    background: var(--dark-card-bg);
    border: 1px solid var(--dark-border);
}

body.dark-mode .product-sorting {
    background: var(--dark-card-bg);
    border: 1px solid var(--dark-border);
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-box {
        position: static;
        margin-bottom: 2rem;
    }
    
    .product-sorting .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .product-sorting .col-md-4 {
        text-align: center;
    }
    
    .product-grid .row {
        margin: 0 -0.5rem;
    }
    
    .product-grid .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 0 0.5rem;
    }
    
    .product-grid .product-card {
        min-height: 380px;
    }
    
    .product-grid .product-image-container {
        height: 180px;
    }
    
    .product-grid .product-image {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .product-grid .row {
        margin: 0 -0.25rem;
    }
    
    .product-grid .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 0.25rem;
        margin-bottom: 1rem;
    }
    
    .product-card .product-details {
        padding: 1rem;
    }
    
    .product-price .current-price {
        font-size: 1.1rem;
    }
    
    .product-grid .product-card {
        min-height: 320px;
    }
    
    .product-grid .product-image-container {
        height: 160px;
    }
    
    .product-grid .product-image {
        height: 160px;
    }
}
