
/* Base Styles */
:root {
    --primary-color: #E63E30;
    --secondary-color: #F68B24;
    --dark-color: #333333;
    --light-color: #F8F9FA;
    --text-color: #333333;
    --text-muted: #6c757d;
    --border-color: #E1E1E1;
}

/* Category Banner */
.category-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

/* Filter Panel Styling */
.filter-panel {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.filter-heading {
    font-size: 20px;
    font-weight: 600;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.filter-section {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-title {
    position: relative;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 15px;
    padding-bottom: 8px;
}

.filter-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.filter-toggle {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 14px;
}

/* Product Card Styling */
.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    border: none;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

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

.product-img-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 5px 15px;
    border-radius: 20px;
    z-index: 5;
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-radius: 50%;
    color: #333;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.3;
    min-height: 42px;
}

.product-title a {
    color: var(--dark-color);
    text-decoration: none;
}

.product-title a:hover {
    color: var(--primary-color);
}

.product-rating {
    color: #FFB800;
    font-size: 14px;
    margin-bottom: 8px;
}

.rating-count {
    color: var(--text-muted);
    font-size: 13px;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: baseline;
}

.original-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 14px;
    margin-left: 8px;
    font-weight: 400;
}

.btn-add-to-cart {
    width: 100%;
    padding: 10px;
    background-color: #E63E30;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    margin-top: auto;
}

.btn-add-to-cart:hover {
    background-color: #d63226;
    color: white;
}

/* Sort Dropdown */
.sort-dropdown {
    min-width: 180px;
}

.sort-btn {
    width: 100%;
    text-align: left;
    border: 1px solid #ddd;
    background-color: white;
    color: #333;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sort-dropdown .dropdown-menu {
    width: 100%;
    padding: 0;
    border-radius: 4px;
    margin-top: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
}

.sort-dropdown .dropdown-item {
    padding: 10px 15px;
    font-size: 14px;
}

.sort-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.sort-dropdown .dropdown-item.active {
    background-color: transparent;
    color: var(--primary-color);
    font-weight: 600;
}

/* Popular Products Widget */
.popular-product-item {
    display: flex;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.popular-product-item:hover {
    transform: translateY(-3px);
}

.popular-product-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.popular-product-item:hover .popular-product-img {
    transform: scale(1.05);
}

/* Other Categories Section */
.category-card {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    margin-bottom: 20px;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover .category-img {
    transform: scale(1.05);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.category-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #fff;
}

.category-count {
    font-size: 0.875rem;
    opacity: 0.9;
    color: #fff;
}

/* Mobile Filter Container */
.mobile-filter-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-filter-container.active {
    transform: translateX(0);
}

.mobile-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.close-filter-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Filter Button (Mobile) */
.filter-btn {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 15px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Toasts */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: white;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 9999;
    max-width: 300px;
    transition: all 0.3s ease;
}

.toast-content {
    display: flex;
    align-items: center;
}

.toast-content i {
    font-size: 18px;
    margin-right: 10px;
}

.toast-close {
    background: none;
    border: none;
    padding: 0;
    margin-left: 10px;
    font-size: 16px;
    cursor: pointer;
}

/* 2-Column Grid for Mobile */
.products-grid-mobile {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 1.5rem;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .product-title {
        font-size: 15px;
        min-height: 38px;
    }

    .product-price {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .btn-add-to-cart {
        padding: 8px;
        font-size: 13px;
    }

    .product-badge {
        font-size: 12px;
        padding: 3px 10px;
    }

    .product-info {
        padding: 12px;
    }
}

@media (max-width: 767px) {
    .products-grid-mobile {
        gap: 8px;
    }

    .product-title {
        font-size: 14px;
        min-height: 36px;
        margin-bottom: 5px;
    }

    .action-btn {
        width: 32px;
        height: 32px;
    }
}

/* Animations for Better UX */
.btn-pressed {
    transform: scale(0.95);
}

/* Custom Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.page-item:first-child .page-link,
.page-item:last-child .page-link {
    border-radius: 4px;
}

.page-link {
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    color: var(--dark-color);
    background-color: #fff;
    border-radius: 4px;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-link:hover {
    color: var(--primary-color);
    background-color: #f8f9fa;
}
