/* Custom CSS for Products Page */

/* Fix for isotope-grid to use Bootstrap grid instead of absolute positioning */
.isotope-grid {
    /* Use Bootstrap's flexbox grid instead of isotope absolute positioning */
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -15px !important;
    margin-right: -15px !important;
    /* Disable any isotope positioning */
    height: auto !important;
    position: relative !important;
    transform: none !important;
}

.isotope-grid > * {
    /* Override any isotope positioning */
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    /* Bootstrap column padding */
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin-bottom: 30px !important;
    /* Disable isotope transitions */
    transition: none !important;
}

/* Specific column width controls */
.isotope-grid > .col-sm-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
}

.isotope-grid > .col-md-4 {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
}

.isotope-grid > .col-lg-3 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
}

/* Responsive breakpoints */
@media (max-width: 767.98px) {
    .isotope-grid > .col-sm-6,
    .isotope-grid > .col-md-4,
    .isotope-grid > .col-lg-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

@media (max-width: 575.98px) {
    .isotope-grid > .col-sm-6,
    .isotope-grid > .col-md-4,
    .isotope-grid > .col-lg-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .isotope-grid > .col-md-4,
    .isotope-grid > .col-lg-3 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }
}

@media (min-width: 992px) {
    .isotope-grid > .col-lg-3 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
}

/* Override block2-btn absolute positioning for better grid alignment */
.isotope-grid .block2-pic {
    position: relative;
    overflow: hidden;
}

.isotope-grid .block2-btn {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.isotope-grid .block2-pic:hover .block2-btn {
    bottom: 20px;
    opacity: 1;
    visibility: visible;
}

/* Ensure consistent card heights */
.isotope-grid .block2 {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.isotope-grid .block2-txt {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.isotope-grid .block2-txt-child1 {
    flex-grow: 1;
}

/* Stock Label Styling */
.block2-label {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
}

.mt-23 {
    margin-top: 100px;
}

.block2-label-stock {
    background: #f39c12;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.block2-label-sold {
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Product Stock Info */
.product-stock-info {
    margin-top: 8px;
}

.text-success {
    color: #27ae60 !important;
}

.text-warning {
    color: #f39c12 !important;
}

.text-danger {
    color: #e74c3c !important;
}

.text-muted {
    color: #7f8c8d !important;
}

/* Add to Cart Button */
.btn-addcart-b2 {
    transition: all 0.3s ease;
}

.btn-addcart-b2:hover {
    transform: scale(1.1);
}

/* Pagination Styling */
.pagination-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.pagination-wrapper .pagination {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.pagination-wrapper .page-link {
    color: #2c3e50;
    border: 1px solid #e0e6ed;
    padding: 10px 15px;
    margin: 0 2px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination-wrapper .page-link:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-wrapper .page-item.active .page-link {
    background-color: #2c3e50;
    border-color: #2c3e50;
    color: white;
}

/* Filter Active State */
.how-active1 {
    background: #2c3e50;
    color: white !important;
}

.filter-link {
    padding: 4px 8px;
}

.filter-link-active {
    color: #3498db !important;
    font-weight: 600;
    padding: 4px 8px;
}

/* Search and Filter Panels */
.panel-search {
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 15px;
}

.panel-filter {
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 15px;
}

/* No Products Found Styling */
.zmdi-hc-5x {
    font-size: 5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-tope-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-tope-group .category-filter {
        margin: 5px 0;
        width: 100%;
        text-align: left;
    }

    .flex-w.flex-sb-m {
        flex-direction: column;
    }

    .flex-w.flex-c-m.m-tb-10 {
        margin-top: 20px;
        justify-content: flex-start;
    }
}

@media (max-width: 576px) {
    .col-sm-6 {
        max-width: 100%;
        flex: 0 0 100%;
    }

    .block2-txt-child1 {
        width: 100%;
    }

    .d-flex.align-items-center.justify-content-between {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Hover effects for product cards */
.block2:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.block2 {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

/* Category filter buttons styling */
.category-filter {
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-filter:hover {
    background: #34495e;
    color: white !important;
}
