/* Filter Styles based on reference image */

/* Filter Header */
.filter-header {
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.filter-toggle {
    font-weight: 500;
    color: #333;
}

.filter-toggle i {
    color: #0d6efd;
}

.filter-count {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Filter Options */
.filter-options {
    padding: 15px 0;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    margin-bottom: 0;
    white-space: nowrap;
    min-width: 80px;
}

.form-select {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 8px 12px;
    background-color: white;
    flex-grow: 1;
}

/* Filter Tabs - Removed */

/* Card Styles (Common for Services and Products) */
.service-card,
.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: none;
}

.service-card:hover,
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Horizontal Card Styles */
.horizontal-card {
    transition: all 0.3s ease;
}

.horizontal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.service-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px 0 0 8px;
}

.service-image-container img {
    transition: transform 0.5s ease;
}

.horizontal-card:hover .service-image-container img {
    transform: scale(1.05);
}

/* Original Card Styles */
.card-img-container {
    height: 200px;
    overflow: hidden;
}

.card-img-top {
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.service-card:hover .card-img-top,
.product-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Service specific styles */
.service-duration {
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.service-category .badge {
    font-weight: 400;
    padding: 5px 10px;
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

/* Product specific styles */
.product-status {
    bottom: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: white;
}

.product-status .in-stock {
    background-color: rgba(25, 135, 84, 0.8); /* Success color with opacity */
    padding: 5px 10px;
    border-radius: 4px;
}

.product-status .out-of-stock {
    background-color: rgba(220, 53, 69, 0.8); /* Danger color with opacity */
    padding: 5px 10px;
    border-radius: 4px;
}

.product-category .badge {
    font-weight: 400;
    padding: 5px 10px;
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

/* News specific styles */
.news-date {
    bottom: 10px;
    right: 10px;
    background-color: rgba(13, 110, 253, 0.8); /* Primary color with opacity */
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.news-category .badge {
    font-weight: 400;
    padding: 5px 10px;
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

.news-card .card-title {
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Common card styles */
.service-card .card-title,
.product-card .card-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.service-card .card-text,
.product-card .card-text {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.service-card .card-footer,
.product-card .card-footer {
    padding: 15px;
}

.service-card .price,
.product-card .price {
    font-size: 1.1rem;
}

.service-card .btn-outline-primary,
.product-card .btn-outline-primary,
.service-card .btn-primary,
.product-card .btn-primary {
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.service-card .btn-outline-primary:hover,
.product-card .btn-outline-primary:hover {
    background-color: #0d6efd;
    color: white;
}

.service-card .btn-primary:hover,
.product-card .btn-primary:hover {
    background-color: #0b5ed7;
}

/* Filter Section Styles */
.filter-section {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.filter-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    font-size: 1rem;
}

.filter-options {
    padding-left: 5px;
}

.card-header h5 {
    font-weight: 600;
    letter-spacing: 0.5px;
}

#clearAllFilters {
    font-weight: 500;
    letter-spacing: 0.5px;
    color: #0d6efd;
    padding: 0;
}

.form-check-input.auto-filter {
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
}

/* Active Filters */
#active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.active-filter {
    display: inline-flex;
    align-items: center;
    background-color: rgba(158, 138, 120, 0.1);
    border: 1px solid rgba(158, 138, 120, 0.2);
    border-radius: 20px;
    padding: 5px 12px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 0.875rem;
    color: #9E8A78;
    transition: all 0.3s ease;
}

.active-filter:hover {
    background-color: rgba(158, 138, 120, 0.2);
    transform: translateY(-2px);
}

.active-filter .filter-remove {
    margin-left: 8px;
    cursor: pointer;
    color: #9E8A78;
    transition: all 0.3s ease;
}

.active-filter .filter-remove:hover {
    color: #dc3545;
    transform: rotate(90deg);
}

/* Mobile Filter Button */
.mobile-filter-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: none;
}

/* Mobile Styles */
@media (max-width: 991.98px) {
    .mobile-filter-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .filter-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: white;
        z-index: 1050;
        overflow-y: auto;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .filter-sidebar.show {
        right: 0;
    }

    .filter-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        display: none;
    }

    .filter-backdrop.show {
        display: block;
    }
}

/* Service Features */
.service-feature {
    display: inline-flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #6c757d;
}

.service-feature i {
    font-size: 0.8rem;
}

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

    /* Filter tabs removed */

    .service-card .card-footer,
    .product-card .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .service-card .card-footer > div,
    .product-card .card-footer > div {
        display: flex;
        width: 100%;
        justify-content: space-between;
    }

    .service-card .card-footer .btn,
    .product-card .card-footer .btn {
        flex: 1;
    }

    .horizontal-card .row {
        flex-direction: column;
    }

    .service-image-container {
        border-radius: 8px 8px 0 0;
        height: 200px;
    }

    .horizontal-card .col-md-4 {
        width: 100%;
    }

    .horizontal-card .col-md-8 {
        width: 100%;
    }
}

/* Loading Indicator */
.loading-indicator {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    text-align: center;
    transition: all 0.3s ease;
}

.loading-indicator.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border: 4px solid rgba(158, 138, 120, 0.1);
    border-radius: 50%;
    border-top: 4px solid #9E8A78;
    animation: spin 1s linear infinite;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Pulse Animation for Filter Items */
.pulse-animation {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Reset Animation for Filter Items */
.reset-animation {
    animation: reset 0.5s ease-in-out;
}

@keyframes reset {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

/* Button Click Animations */
.search-button-clicked {
    animation: buttonClick 0.3s ease;
}

.clear-button-clicked {
    animation: buttonClick 0.3s ease;
}

.pagination-link-clicked {
    animation: buttonClick 0.3s ease;
}

@keyframes buttonClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Filter Selected State */
.filter-selected .form-check-label {
    color: #9E8A78;
    font-weight: 500;
}
