/* ========== PAGINATION STYLES ========== */
.pagination {
    margin: 1.5rem 0 1rem 0;
}

.pagination .page-link {
    color: #008020;
    border: 1px solid #dee2e6;
    padding: 0.4rem 0.65rem;
    transition: all 0.3s ease;
    margin: 0 2px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.pagination .page-link:hover {
    background-color: #008020;
    border-color: #008020;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 128, 32, 0.3);
}

.pagination .page-item.active .page-link {
    background-color: #008020;
    border-color: #008020;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 128, 32, 0.4);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
    opacity: 0.5;
}

/* ========== LOADING SPINNER ========== */
.spinner-border {
    border-width: 0.15em;
}

.spinner-border.text-primary {
    border-color: #008020;
    border-right-color: transparent;
}

/* ========== PRODUCT CARD STYLES (COMPACT) ========== */
.product-item {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem !important;
}

.product-item:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-5px);
}

.product-img {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    height: 260px;
}

.product-img img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 260px !important;
    object-fit: cover;
}

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

/* Product Overlay */
.product-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.product-item:hover .product-overlay {
    opacity: 1 !important;
}

.product-overlay .btn {
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.product-item:hover .product-overlay .btn {
    transform: translateY(0);
}

/* ========== CARD BODY COMPACT ========== */
.product-item .card-body {
    padding: 0.5rem !important;
}

.product-item .card-body h6 {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    height: 34px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.product-item .card-body h6 a {
    transition: color 0.3s ease;
}

.product-item .card-body h6 a:hover {
    color: #008020 !important;
}

.product-item .card-body p {
    margin-bottom: 0.25rem;
    line-height: 1.1;
}

.product-item .card-body h5 {
    font-size: 1rem;
    line-height: 1;
}

/* ========== COMPACT SPACING ========== */
.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

.p-2 {
    padding: 0.5rem !important;
}

.pb-1 {
    padding-bottom: 0.25rem !important;
}

/* ========== PRICE STYLING ========== */
.product-item h5 {
    margin: 0;
}

.product-item .card-body small del {
    font-size: 0.75rem;
    opacity: 0.65;
}

.text-primary {
    color: #008020 !important;
}

/* ========== BADGE STYLES (COMPACT) ========== */
.badge {
    font-size: 0.65rem !important;
    padding: 0.3em 0.5em !important;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-danger {
    background: linear-gradient(135deg, #00a539 0%, #008020 100%); /* Vert dégradé */
    box-shadow: 0 2px 4px rgba(0, 128, 32, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, #00cc40 0%, #00a539 100%); /* Vert dégradé alternatif */
    color: #212529;
    box-shadow: 0 2px 4px rgba(0, 204, 64, 0.3);
}

.badge-secondary {
    background: linear-gradient(135deg, #00661a 0%, #004d14 100%); /* Vert foncé dégradé */
    box-shadow: 0 2px 4px rgba(0, 102, 26, 0.3);
}

/* ========== STAR RATINGS (COMPACT) ========== */
.text-warning {
    color: #00cc40 !important; /* Vert pour les étoiles */
}

.text-warning i {
    font-size: 0.7rem;
    margin-right: 0px;
}

/* ========== BUTTONS ========== */
.btn-primary {
    background: linear-gradient(135deg, #008020 0%, #00661a 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(135deg, #00661a 0%, #004d14 100%) !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(0, 128, 32, 0.4) !important;
}

.btn-outline-primary {
    color: #008020;
    border-color: #008020;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: #008020 !important;
    border-color: #008020 !important;
    color: #fff !important;
}

.btn-light {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.btn-light:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.btn-sm {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
}

/* ========== OVERLAY BUTTON STYLES ========== */
.product-overlay .btn {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
}

.product-overlay .btn i {
    margin: 0 !important;
    font-size: 0.9rem;
}

/* ========== FILTER SECTION ========== */
.filter-checkbox {
    cursor: pointer;
}

.custom-control-label {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.custom-control-input:checked ~ .custom-control-label {
    color: #008020;
    font-weight: 600;
}

.custom-control-label:hover {
    color: #008020;
}

#reset-filters {
    transition: all 0.3s ease;
}

#reset-filters:hover {
    background-color: #00661a;
    color: #fff;
    border-color: #00661a;
    transform: translateY(-2px);
}

/* ========== DROPDOWN STYLES ========== */
.dropdown-menu {
    border: 1px solid #dee2e6;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
}

.dropdown-item {
    transition: all 0.2s ease;
    padding: 0.4rem 1.25rem;
    font-size: 0.85rem;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #008020;
    padding-left: 1.75rem;
}

.dropdown-item i {
    width: 18px;
    font-size: 0.8rem;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* ========== NO RESULTS MESSAGE ========== */
.text-center.py-5 i {
    opacity: 0.5;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.5;
    }
}

/* ========== RESPONSIVE STYLES ========== */
@media (max-width: 992px) {
    .product-img,
    .product-img img {
        height: 240px !important;
    }
}

@media (max-width: 768px) {
    .pagination {
        font-size: 0.85rem;
    }

    .pagination .page-link {
        padding: 0.3rem 0.5rem;
        margin: 0 1px;
        font-size: 0.85rem;
    }

    .product-img,
    .product-img img {
        height: 220px !important;
    }

    .product-item .card-body h6 {
        font-size: 0.8rem;
        height: 32px;
    }

    .product-item h5 {
        font-size: 0.95rem;
    }

    .product-item .card-body {
        padding: 0.4rem !important;
    }
}

@media (max-width: 576px) {
    .product-img,
    .product-img img {
        height: 200px !important;
    }

    .pagination .page-link {
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }

    .badge {
        font-size: 0.6rem !important;
        padding: 0.25em 0.45em !important;
    }

    .product-item .card-body {
        padding: 0.35rem !important;
    }

    .product-item .card-body h6 {
        font-size: 0.75rem;
        height: 30px;
    }

    .product-item h5 {
        font-size: 0.9rem;
    }

    .text-warning i {
        font-size: 0.65rem;
    }
}

/* ========== SCROLLBAR STYLING ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #008020;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00661a;
}

/* ========== ALERT STYLES ========== */
.alert {
    border-radius: 8px;
    border: none;
    margin-bottom: 1rem;
}

.alert-danger {
    background-color: #d1f0d8;
    color: #00380c;
}

.alert-link {
    color: #002306;
    font-weight: 600;
    text-decoration: underline;
}

.alert-link:hover {
    color: #001803;
}

/* ========== VENDOR INFO (COMPACT) ========== */
.product-item .fa-store-alt {
    color: #008020;
    font-size: 0.65rem;
}

/* ========== CATEGORY TAG (COMPACT) ========== */
.product-item .card-body p.text-muted {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    color: #6c757d;
    font-size: 0.65rem !important;
}

/* ========== TEXT TRUNCATION ========== */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== BORDER RADIUS ========== */
.card {
    border-radius: 8px;
    overflow: hidden;
}

.card-header {
    border-radius: 8px 8px 0 0;
}

/* ========== SHADOW EFFECTS ========== */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.product-item.shadow-sm:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}

/* ========== LINE HEIGHT COMPACT ========== */
.product-item .card-body {
    line-height: 1.1;
}

.product-item .card-body h6 {
    line-height: 1.2;
}

.product-item .card-body p,
.product-item .card-body small {
    line-height: 1.1;
}

/* ========== CUSTOM CHECKBOX & RADIO STYLES ========== */
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #008020;
    border-color: #008020;
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(0, 128, 32, 0.25);
}

/* ========== LOADING STATE ========== */
.loading-overlay {
    position: relative;
}

.loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

/* ========== REMOVE CARD FOOTER ========== */
.product-item .card-footer {
    display: none !important;
}

/* ========== COMPACT HEADER ========== */
.col-12.pb-1 .d-flex {
    margin-bottom: 0.75rem !important;
}

.col-12.pb-1 .d-flex span {
    font-size: 0.85rem;
}

/* ========== SMALLER FONTS GLOBALLY ========== */
.product-item * {
    letter-spacing: 0;
}

.product-item small {
    font-size: 0.7rem !important;
}

/* ========== TIGHTER SPACING ========== */
.product-item .mb-1 {
    margin-bottom: 0.15rem !important;
}

/* ========== PRICE ALIGNMENT ========== */
.product-item h5,
.product-item small {
    vertical-align: middle;
}