:root {
    --color-primary: #3BB77E;
    --color-secondary: #FDC040;
    --color-danger: #F74B81;
    --color-dark: #253D4E;
    --color-text: #7E7E7E;
    --color-heading: #253D4E;
    --color-grey-1: #F2F3F4;
    --color-grey-2: #E5E5E5;
    --font-family-sans-serif: 'Lato', sans-serif;
}

body {
    font-family: var(--font-family-sans-serif);
    color: var(--color-text);
    background-color: #FFF;
    font-size: 16px;
    line-height: 1.6;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-heading);
    font-weight: 700;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--color-dark);
    text-decoration: none;
}

.section-padding {
    padding: 10px 0;
}

.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #2f9265;
    border-color: #2f9265;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.25rem rgba(59, 183, 126, 0.25);
}

.main-header {
    border-bottom: 1px solid var(--color-grey-1);
}

.product-card {
    border: 1px solid var(--color-grey-2);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    background-color: #fff;
}

.product-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

.product-card .product-img {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background-color: #f5f5f5;
}

.product-card .product-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
}


.product-card .product-info {
    padding: 0px;
}

.product-card .product-category {
    font-size: 12px;
    color: var(--color-text);
}

.product-card .product-title {
    font-size: 16px;
    font-weight: 600;
    margin-top: 5px;
    margin-bottom: 10px;
}

.product-card .product-price {
    font-size: 18px !important;
    font-weight: 700;
    color: var(--color-primary) !important;
}

.seller-card {
    border: 1px solid var(--color-grey-1);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.seller-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.seller-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.main-footer {
    background-color: var(--color-grey-1);
    padding: 40px 0;
    margin-top: 50px;
}

.dashboard-sidebar {
    background-color: var(--color-dark);
    color: #fff;
    min-height: 100vh;
}

.dashboard-sidebar .nav-link {
    color: #adb5bd;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: all 0.2s ease;
}

.dashboard-sidebar .nav-link:hover,
.dashboard-sidebar .nav-link.active {
    background-color: var(--color-primary);
    color: #fff;
}

.dashboard-content {
    padding: 30px;
}

.stat-card {
    border-radius: 10px;
    padding: 20px;
    color: #fff;
}

.stat-card.bg-primary {
    background-color: var(--color-primary) !important;
}

.stat-card.bg-secondary {
    background-color: var(--color-secondary) !important;
}

.stat-card.bg-danger {
    background-color: var(--color-danger) !important;
}

.stat-card.bg-dark {
    background-color: var(--color-dark) !important;
}


.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--color-grey-2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

button.btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

button.btn-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -8px;
    margin-top: -8px;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 15px 0;
    }

    .main-header .navbar-nav {
        margin-top: 15px;
    }
}


.carousel-item-fixed-height {
    height: 200px;
    
    background-color: #f8f9fa;
}


@media (min-width: 768px) {
    .carousel-item-fixed-height {
        height: 400px;
    }
}
.seller-banner-img {
    height: 150px; 
    object-fit: cover;
}

@media (min-width: 768px) {
    .seller-banner-img {
        height: 300px;
    }
}
.carousel-item-fixed-height img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    
}


.product-gallery .main-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    
    background-color: #f8f9fa;
}

.product-gallery .main-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
  
}

.product-gallery .thumbnail-images .thumb-item {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.product-gallery .thumbnail-images .thumb-item:hover,
.product-gallery .thumbnail-images .thumb-item.active {
    border-color: var(--color-primary);
}

.product-gallery .thumbnail-images .thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.category-swiper .swiper-slide {
    height: auto;
    
}

.category-swiper .card {
    border: none;
    
    background-color: #f8f9fa;
    
    height: 100%;
    
}

.category-swiper .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}


.category-filter a {
    text-decoration: none;
    color: var(--color-text);
    display: block;
    padding: 4px 0;
}

.category-filter a:hover {
    color: var(--color-primary);
}

.category-filter a.fw-bold {
    color: var(--color-primary);
}

.category-filter .collapse-toggle::after {
    content: '\f078';
    
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    float: right;
    transition: transform 0.2s ease-in-out;
}

.category-filter a[aria-expanded="true"]::after {
    transform: rotate(-180deg);
}


.rating-stars {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rating-stars input {
    display: none;
}

.rating-stars label {
    color: #ccc;
    cursor: pointer;
    font-size: 2rem;
    transition: color 0.2s;
}

.rating-stars input:checked~label,
.rating-stars label:hover,
.rating-stars label:hover~label {
    color: #f9d71c;
    
}


.vip-badge {
    color: #0d6efd;
    
    font-size: 0.8em;
    vertical-align: middle;
    margin-left: 5px;
}


[dir="rtl"] .vip-badge {
    margin-left: 0;
    margin-right: 5px;
}

.product-action-1 {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 1;
    
    z-index: 10;
    
}

.fa-regular,
.fa-heart {
    font-size: 2em !important;
    transition: 1ms;
}

.fa-solid,
.fa-heart {
    font-size: 1.6em !important;
    transition: 1ms;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--color-danger);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 10;
}

#search-results .list-group-item {
    display: flex;
    align-items: center;
    border: none;
    border-bottom: 1px solid #f0f0f0;
}

#search-results .list-group-item:last-child {
    border-bottom: none;
}

#search-results .search-result-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 15px;
    
}

[dir="rtl"] #search-results .search-result-img {
    margin-right: 0;
    margin-left: 15px;
    
}

.search-result-img {
    width: 30%;
    height: 30%;
}

.deal-card {
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    color: #fff; 
}


.deal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-image: var(--bg-image); 
    z-index: 1;
    transition: transform 0.3s ease;
}

.deal-card:hover::before {
    transform: scale(1.05); 
}

.deal-card .deal-content { z-index: 2; }
.deal-card .subtitle { font-size: 0.8rem; font-weight: bold; text-transform: uppercase; }
.deal-card h3, .deal-card h4, .deal-card h5 { font-weight: 800; }
.deal-card .shop-now-btn { background-color: white; color: black; padding: 0.5rem 1.5rem; border-radius: 99px; margin-top: 1rem; display: inline-block; }
.deal-card .shop-now-link { font-weight: bold; text-decoration: underline; }

.large-card { min-height: 410px; }
.medium-card { min-height: 200px; color: #212529; } 
.small-card { min-height: 200px; color: #212529; }