@font-face {
    font-family: "Vazir";
    src: url(../fonts/Vazir.eot);
    src: url(../fonts/Vazir.woff2) format("woff2");
    src: url(../fonts/Vazir.ttf) format("truetype");
}

body {
    font-family: "Vazir" !important;
}

:root {
    --pink: #e5345b;
}

/* --- General Styles --- */
.bg-primary {
    background-color: var(--pink) !important;
}

.text-primary {
    color: var(--pink) !important;
}

.btn:not(.nav-btns button) {
    background-color: #fff;
    color: rgb(85, 85, 85);
    padding: 10px 28px;
    border-radius: 25px;
    border: 1px solid rgb(85, 85, 85);
}

.btn:not(.nav-btns button):hover {
    background-color: var(--pink);
    color: #fff;
    border-color: var(--pink);
}

.section-title {
    position: relative;
    color: #333;
    font-weight: 700;
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #ef394e;
    margin: 10px auto 0;
}

/* --- Header & Navbar Styles --- */
.header-top .form-control {
    border-color: #f0f0f1;
    background-color: #f0f0f1;
    font-size: 0.9rem;
}

.header-top .form-control:focus {
    box-shadow: none;
    border-color: #e0e0e1;
}

.header-top .btn-light {
    background-color: #f0f0f1;
    border-color: #f0f0f1;
}

.navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f1;
}

.navbar-nav .nav-link {
    color: #5a5c69;
    font-size: 0.9rem;
    padding-right: 1rem !important;
    padding-left: 1rem !important;
}

.navbar-nav .nav-link:hover {
    color: #ef394e;
}

.dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
    padding: 0.75rem 0;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

/* --- Mega Menu Styles --- */
.mega-menu {
    border-radius: 0;
    margin-top: 0;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    left: 0;
    right: 0;
}

.category-item {
    border-radius: 4px;
    transition: all 0.2s;
}

.category-item a {
    color: #333;
    text-decoration: none;
    display: block;
    padding: 6px 10px;
}

.category-item:hover, .category-item.active {
    background-color: #f5f5f5;
}

.category-item:hover a, .category-item.active a {
    color: #ef394e;
}

.subcategory-content h6 {
    color: #333;
    font-size: 0.95rem;
}

.subcategory-content a {
    text-decoration: none;
    transition: all 0.2s;
}

.subcategory-content a:hover {
    color: #ef394e !important;
    padding-right: 5px;
}

/* --- Banner & Carousel --- */
.banner-section {
    margin-top: 20px;
    margin-bottom: 20px;
}

.carousel-item img {
    object-fit: cover;
    height: auto;
}

.carousel-indicators {
    margin-bottom: 0.5rem;
}

.carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 4px;
}

/* --- Brands Section --- */
.brands-section {
    background-color: #f8f9fa;
}

.brand-item {
    transition: all 0.3s ease;
    height: 100%;
}

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

.brand-item a {
    text-decoration: none;
    color: #333;
}

.brand-name {
    font-size: 0.9rem;
    margin-top: 8px;
    color: #666;
}

/* --- Service Section --- */
.Home_service__drkmn {
    background: linear-gradient(90deg, #131141 0%, #111d47 100%) !important;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.Home_serviceTitle__avCV_ .font-25 {
    font-size: 1.5rem;
}

.Home_serviceTitle__avCV_ .font-13 {
    font-size: 0.95rem;
}

.Home_homeBrandRow__hJoKb a {
    text-decoration: none;
    display: block;
    text-align: center;
}

.Home_homeBrandRowImage__tKlWy {
    max-width: 92px;
    max-height: 62px;
    margin: 0 auto;
    display: block;
    background: #fff;
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.Home_homeBrandRow__hJoKb a:hover .Home_homeBrandRowImage__tKlWy {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.Home_HomeBrandRowH2__Ke2uG {
    font-size: 1rem;
    color: #fff;
    margin-top: 0.5rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* --- Filter Styles --- */
.filter-section h6 {
    font-size: 1rem;
    color: #333;
}

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

.form-range::-webkit-slider-thumb {
    background: var(--pink);
}

.form-range::-moz-range-thumb {
    background: var(--pink);
}

.form-range::-ms-thumb {
    background: var(--pink);
}


/*
=====================================
    Mobile Specific Styles
=====================================
*/

/* General mobile adjustments */
@media (max-width: 991.98px) {
    .Home_service__drkmn {
        border-radius: 0;
        margin-bottom: 1rem;
    }
    .Home_serviceTitle__avCV_ .font-25 {
        font-size: 1.2rem;
    }
}

@media (max-width: 767.98px) {
    /*
     * REVISION 1: Add padding to the bottom of the body.
     * This creates space for the fixed bottom navbar and prevents
     * content from being hidden underneath it.
     */
    body {
        padding-bottom: 70px; /* Adjust if your bottom-nav height is different */
    }

    .carousel-item img {
        max-height: 200px;
    }

    /*
     * REVISION 2: Removed redundant 'margin-bottom' from .main-content.
     * The padding on the body now handles this spacing correctly.
     */
    .main-content {
        margin-bottom: 0 !important;
    }
}

@media (max-width: 575.98px) {
    .brand-item {
        padding: 10px !important;
    }
    .brand-name {
        font-size: 0.8rem;
    }
    .Home_HomeBrandRowH2__Ke2uG {
        font-size: 0.85rem;
    }
    .Home_serviceTitle__avCV_ .font-25 {
        font-size: 1rem;
    }
}


/*
=====================================
    Mobile Bottom Nav & Filter
=====================================
*/

/* General rule for the bottom navigation bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030; /* Set a consistent z-index */
    background-color: white;
    border-top: 1px solid #eee;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    /*
     * REVISION 3: Added transform for better rendering performance on mobile.
     * This helps prevent "jank" or "flickering" during scrolling on some browsers.
     */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.bottom-nav .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.bottom-nav .navbar-nav {
    width: 100%;
    margin: 0;
}

/* Mobile filter styles */
.filter-mobile-btn {
    display: none; /* Hidden by default */
}

.offcanvas-header {
    padding: 1rem 1.5rem;
}

.offcanvas-body {
    padding-top: 0.5rem;
}

/* Show mobile-only elements and hide desktop elements on small screens */
@media (max-width: 767.98px) {
    .filter-mobile-btn {
        display: block;
        z-index: 1040;
    }
    .offcanvas-bottom {
        z-index: 1060 !important;
    }
}

/* Hide mobile-only elements on large screens */
@media (min-width: 768px) {
    .filter-mobile-btn,
    .offcanvas-bottom,
    .bottom-nav {
        display: none !important;
    }
}
/*
=====================================
    CSS for Similar Products Slider
=====================================
*/

.similar-products-slider {
  display: flex;                  /* 1. آیتم‌ها را در یک ردیف افقی قرار می‌دهد */
  overflow-x: auto;               /* 2. اسکرول افقی را فعال می‌کند */
  scroll-snap-type: x mandatory;  /* 3. اسکرول را به آیتم‌ها "اسنپ" یا متصل می‌کند */
  scroll-behavior: smooth;          /* 4. اسکرول را نرم می‌کند */
  -webkit-overflow-scrolling: touch; /* 5. تجربه اسکرول بهتر در iOS */
  padding-bottom: 1rem;           /* 6. فضایی برای نوار اسکرول (اگر نمایش داده شود) */
}

/* مخفی کردن نوار اسکرول برای ظاهر تمیزتر */
.similar-products-slider::-webkit-scrollbar {
  display: none;
}
.similar-products-slider {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.slide-item {
  flex: 0 0 80%;                  /* 7. هر آیتم ۸۰٪ عرض صفحه را اشغال می‌کند و کوچک نمی‌شود */
  scroll-snap-align: start;       /* 8. ابتدای هر آیتم را به ابتدای کانتینر اسنپ می‌کند */
  margin-left: 1rem;              /* 9. فاصله بین آیتم‌ها */
}
.slide-item:first-child {
  margin-left: 0; /* حذف فاصله از آیتم اول */
}

/* در صفحه‌های بزرگتر (دسکتاپ)، به حالت گرید برمی‌گردیم */
@media (min-width: 768px) {
  .similar-products-slider {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* نمایش ۴ ستون */
    gap: 1.5rem; /* فاصله بین ستون‌ها */
    overflow-x: hidden; /* غیرفعال کردن اسکرول افقی */
  }

  .slide-item {
    flex-basis: auto; /* بازنشانی تنظیمات flex */
    width: 100%; /* عرض آیتم به گرید واگذار می‌شود */
    margin-left: 0;
  }
}
