/* Product Components Shared Styles */

/* Product Grid Layout */
.product-grid-container {
    margin: 0 -10px;
}

.product-grid-container .product-layout {
    padding: 0 10px;
    margin-bottom: 20px;
}

/* Pagination Loading Indicator */
#pagination-loading {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

#pagination-loading i {
    color: #007bff;
}

#pagination-loading p {
    color: #6c757d;
    margin: 0;
    font-size: 14px;
}

/* Pagination Styles */
.pagination {
    justify-content: center;
    margin: 20px 0;
}

.pagination .page-link {
    color: #007bff;
    border: 1px solid #dee2e6;
    margin: 0 2px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Product Card */
.product-card {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Product Image */
.product-card .image {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.product-card .image img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.product-card:hover .image img {
    transform: scale(1.05);
}

/* Lazy Loading Placeholder */
.lazy-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 24px;
    border-radius: 8px;
}

/* Lazy Loading Animation */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy.loaded {
    opacity: 1;
}

/* Manufacturer Logo */
.product-card .img-brand {
    padding: 10px;
    text-align: center;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
}

.product-card .img-brand img {
    max-height: 30px;
    width: auto;
    margin-top: 5px;
}

/* Product Description */
.product-card .desc-category {
    padding: 15px;
    background: #fff;
}

/* Product Options/Colors */
.product-card .color-row {
    padding: 0 15px 15px;
    background: #fff;
}

.product-card .color-li {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

.product-card .color-li li img {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.product-card .color-li li img:hover {
    transform: scale(1.2);
}

.product-card .name-category a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    display: block;
    margin-bottom: 8px;
}

.product-card .name-category a:hover {
    color: #007bff;
}

.product-card .desc-category p {
    color: #6c757d;
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
}

/* Product Options/Colors */
.product-card .color-row {
    padding: 0 15px 15px;
    background: #fff;
}

.product-card .color-li {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

.product-card .color-li li img {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.product-card .color-li li img:hover {
    transform: scale(1.2);
}

/* Product Price */
.product-card .price__product {
    padding: 15px;
    background: #fff;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.product-card .price-product {
    font-size: 18px;
    font-weight: bold;
    color: #28a745;
}

.product-card .price-old {
    font-size: 14px;
    color: #6c757d;
    text-decoration: line-through;
    margin-right: 10px;
}

.product-card .offer {
    background: #dc3545;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

/* Special Offer Badge */
.product-card .off {
    background: #ffc107;
    color: #212529;
    text-align: center;
    padding: 8px;
    margin: 0;
    font-size: 12px;
    font-weight: bold;
    border-radius: 0 0 8px 8px;
}

/* Countdown Timer */
.countdown-timer {
    background: #fff;
    padding: 15px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.countdown-number {
    background: #dc3545;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 6px;
    display: block;
    margin-bottom: 5px;
    min-width: 35px;
    text-align: center;
}

.countdown-label {
    font-size: 10px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
}

/* Out of Stock */
.product-card .price-product .text-muted {
    color: #6c757d !important;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-card .desc-category {
        padding: 10px;
    }
    
    .product-card .price__product {
        padding: 10px;
    }
    
    .product-card .name-category a {
        font-size: 13px;
    }
    
    .product-card .price-product {
        font-size: 16px;
    }
    
    .product-grid-container {
        margin: 0 -5px;
    }
    
    .product-grid-container .product-layout {
        padding: 0 5px;
        margin-bottom: 15px;
    }
    
    /* Mobile countdown adjustments */
    .countdown-timer {
        padding: 10px;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .countdown-item {
        min-width: 40px;
    }
    
    .countdown-number {
        font-size: 14px;
        padding: 3px 6px;
        min-width: 30px;
    }
    
    .countdown-label {
        font-size: 9px;
    }
}

/* Grid Breakpoints */
@media (min-width: 576px) {
    .product-grid-container .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 768px) {
    .product-grid-container .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .product-grid-container .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 992px) {
    .product-grid-container .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    
    .product-grid-container .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* Loading Animation */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy.loaded {
    opacity: 1;
}

/* Performance Optimizations */
.product-card {
    will-change: transform;
    transform: translateZ(0);
}

.product-card .image img {
    will-change: transform;
    transform: translateZ(0);
}

/* Lazy Loading Performance */
.lazy {
    will-change: opacity;
    transform: translateZ(0);
}

/* Image Hover Effects */
.product-card:hover .image img {
    transform: translateZ(0) scale(1.05);
}

/* Universal Product Display Styles */
.product-display {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-display:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Timer Styles */
.timer {
    background: #fff;
    padding: 10px;
    border-top: 1px solid #e9ecef;
}

.timer .soon {
    font-size: 14px;
    color: #dc3545;
    font-weight: bold;
}

/* Vehicle Tolerance Styles (List View) */
.vehicle-tolerance {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.vehicle-tolerance:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vehicle-tolerance__icon-box {
    display: block;
    text-align: center;
    margin-bottom: 15px;
}

.vehicle-tolerance__icon-box img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.vehicle-tolerance__content {
    text-align: center;
    margin-bottom: 15px;
}

.vehicle-tolerance__title {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
}

.vehicle-tolerance__sub-title {
    display: block;
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
}

.vehicle-tolerance__price-holder {
    text-align: center;
}

.vehicle-tolerance__price {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
}

.lbl-pro {
    font-weight: bold;
    color: #495057;
    margin-right: 5px;
}

/* Responsive adjustments for universal products */
@media (max-width: 768px) {
    .product-display .desc-category {
        padding: 10px;
    }
    
    .product-display .price__product {
        padding: 10px;
    }
    
    .vehicle-tolerance__title {
        font-size: 14px;
    }
    
    .vehicle-tolerance__sub-title {
        font-size: 12px;
    }
}
