/* =================================== */
/* ===== KOOSHA TEJARAT STYLES ===== */

/* =================================== */

:root {
    --primary-color: #D32F2F; /* Red */
    --primary-light: #E57373; /* Light Red */
    --primary-dark: #B71C1C; /* Dark Red */
    --secondary-color: #212529; /* Black/Dark Gray */
    --secondary-light: #424242; /* Lighter Gray */
    --secondary-dark: #000000; /* Black */
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
}

@font-face {
    font-family: 'vazir';
    src: url('./../font/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: Vazir, Arial, sans-serif;
    background-color: #f1f2f6; /* A very light gray background for contrast */
    font-size: 16px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}
a:hover {
    color: var(--primary-dark);
}


/* --- Base Sections --- */
section {
    padding: 60px 0;
}
.section_header {
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}
.section_title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}
.section_title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}
.section_link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.section_link i {
    margin-right: 5px;
}
.section_link:hover {
    color: var(--primary-dark);
}

/* --- Topbar --- */
/* --- Topbar (بهبود شده) --- */
.topbar_wrapper {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    padding: 0.4rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(211, 47, 47, 0.3);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}
.topbar_wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/assets/template/site-theme/img/pattern.svg');
    background-size: 60px 60px;
    opacity: 0.4;
    pointer-events: none;
}
.topbar_wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(211,47,47,0.1) 25%, 
        transparent 50%, 
        rgba(211,47,47,0.1) 75%, 
        transparent 100%);
    pointer-events: none;
}

.topbar_container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar_info {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.topbar_info_item {
    display: flex;
    align-items: center;
}
.topbar_info_item i {
    color: var(--primary-color);
    margin-left: 0.4rem;
}
.topbar_action {
    display: flex;
    align-items: center;
}
.topbar_action_item {
    display: flex;
    align-items: center;
    color: #eee;
    text-decoration: none;
    padding: 0 0.6rem;
    transition: all 0.3s ease;
    font-size: 0.75rem;
}
.topbar_action_item:hover {
    color: var(--primary-color);
}
.topbar_action_item i {
    margin-left: 0.3rem;
}

/* --- Mobile Topbar --- */
.mobile_topbar {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    color: #fff;
    padding: 8px 0;
    position: relative;
    overflow: hidden;
}
    .mobile_topbar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: url('/assets/template/site-theme/img/pattern.svg');
        background-size: 60px 60px;
        opacity: 0.3;
        pointer-events: none;
    }
.mobile_topbar_container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mobile_topbar_phone a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}
.mobile_topbar_phone i {
    background-color: var(--primary-color);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    font-size: 12px;
}

/* --- Header --- */
.header_wrapper {
    background-color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1020;
}
.header_container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
}
.header_logo_link {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.header_logo_img {
    width: 60px;
    height: auto;
    margin-left: 15px;
}
.sidebar_menu_logo_text {
    font-weight: bold;
    font-size: 1.5rem;
}
.sidebar_menu_logo_text span:first-child {
    color: var(--secondary-dark);
}
.sidebar_menu_logo_text span:last-child {
    color: var(--secondary-color);
}
.header_logo_subtitle {
    color: #777;
    font-size: 0.8rem;
    margin: 0;
}
.header_search_section {
    display: flex;
    justify-content: center;
}
.header_search_form {
    position: relative;
    width: 100%;
    max-width: 500px;
}
.header_search_input {
    width: 100%;
    height: 45px;
    border: 1px solid var(--gray-300);
    border-radius: 25px;
    padding: 0 20px 0 50px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background-color: var(--gray-100);
}
.header_search_input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
    background-color: white;
    outline: none;
}
.header_search_button {
    position: absolute;
    left: 5px;
    top: 5px;
    width: 35px;
    height: 35px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}
.header_search_button:hover {
    background-color: var(--primary-dark);
}
.header_contact_section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* --- Login Button --- */
.header_login_section {
    display: flex;
    align-items: center;
    margin-left: 15px;
}
.header_login_btn {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 25px;
    color: var(--secondary-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
}
.header_login_btn:hover {
    background-color: var(--primary-color);
    color: white;
}
.header_login_btn i {
    margin-left: 8px;
    font-size: 1rem;
}

.header_cart_section {
    display: flex;
    align-items: center;
    margin-left: 15px; /* Use margin-left in RTL */
}
.header_cart_btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}
.header_cart_btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}
.cart_badge {
    position: absolute;
    top: -2px;
    right: -5px;
    background-color: var(--secondary-dark);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}
.mobile_menu_toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background-color: white;
    color: var(--primary-color);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* --- Main Navigation --- */
.main_nav_wrapper {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    position: relative;
    overflow: hidden;
}
    .main_nav_wrapper::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: url('/assets/template/site-theme/img/pattern.svg');
        background-size: 60px 60px;
        opacity: 0.4;
        pointer-events: none;
    }
.main_nav_wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-color) 20%, 
        var(--primary-color) 80%, 
        transparent 100%);
    pointer-events: none;
}
.main_nav_container {
    display: flex;
    justify-content: start;
    align-items: center;
    height: 50px;
    position: relative;
}
.desktop_menu_toggle {
    display: flex;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
    border: none;
    height: 100%;
    padding: 0 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}
.desktop_menu_toggle:hover {
    background-color: var(--primary-dark);
}
.desktop_menu_toggle i {
    margin-left: 10px;
}
.main_nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}
.main_nav_item {
    height: 100%;
}
.main_nav_link {
    color: white;
    text-decoration: none;
    padding: 0 0.9rem;
    height: 100%;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    font-size: 0.95rem;
}
.main_nav_link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.main_nav_link:hover::after, .main_nav_link.active::after {
    transform: scaleX(1);
}
.main_nav_link.active {
    background-color: rgba(0, 0, 0, 0.3);
}
.secondary_nav {
    margin-right: auto;
    display: flex;
}
.secondary_nav_item {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0 15px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}
.secondary_nav_item:hover {
    color: white;
}
.secondary_nav_item i {
    margin-left: 8px;
}


/* --- Sidebar Menu --- */
.sidebar_menu_overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1030;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.sidebar_menu_overlay.active {
    opacity: 1;
    visibility: visible;
}
.sidebar_menu {
    position: fixed;
    top: 0;
    right: -320px; /* Start off-screen */
    width: 320px;
    height: 100vh;
    background-color: white;
    z-index: 1031;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}
.sidebar_menu.active {
    right: 0;
}
.sidebar_menu_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid var(--gray-200);
}
.sidebar_menu_logo {
    display: flex;
    align-items: center;
}
.sidebar_menu_logo_img {
    width: 40px;
}
.sidebar_menu_close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}
.sidebar_menu_body {
    flex: 1;
    overflow-y: auto;
}
.sidebar_menu_tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
}
.sidebar_menu_tab {
    flex: 1;
    padding: 15px 10px;
    text-align: center;
    background: none;
    border: none;
    font-weight: 500;
    color: #777;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}
.sidebar_menu_tab.active {
    color: var(--primary-color);
}
.sidebar_menu_tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}
.sidebar_menu_content {
    display: none;
    padding: 15px 0;
}
.sidebar_menu_content.active {
    display: block;
}
.sidebar_categories {
    list-style: none;
    padding: 0; margin: 0;
}
.sidebar_category_item {
    border-bottom: 1px solid var(--gray-200);
}
.sidebar_category_link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
}
.sidebar_category_icon {
    width: 40px;
    height: 40px;
    background-color: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    color: var(--primary-color);
}
.sidebar_menu_nav {
    list-style: none;
    padding: 0; margin: 0;
}
.sidebar_menu_nav_item {
    border-bottom: 1px solid var(--gray-200);
}
.sidebar_menu_nav_link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}
.sidebar_menu_nav_link:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}
.sidebar_menu_nav_link.active {
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
    background-color: rgba(211, 47, 47, 0.05);
}
.sidebar_menu_nav_link .menu-icon {
    margin-left: 15px;
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

/* --- Homepage Slider --- */
.slider_section {
    padding: 30px 0;
}
#mainSlider .carousel-item {
    height: 450px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}
#mainSlider .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#mainSlider .main_slider_content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.main_slider_title { font-weight: 700; font-size: 2.5rem; }
.main_slider_text { font-size: 1.1rem; }
.main_slider_item
.main_slider_content {
    max-width: 500px;
    color: white;
    position: relative;
    z-index: 3;
    background: linear-gradient(
        135deg,
        rgba(0,0,0,0.6) 0%,
        rgba(211,47,47,0.3) 30%,
        rgba(0,0,0,0.4) 70%,
        rgba(0,0,0,0.7) 100%
    );
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.1);
}
.main_slider_title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 
        0 2px 4px rgba(0,0,0,0.8),
        0 0 20px rgba(211,47,47,0.3);
}
.main_slider_text {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.95;
    text-shadow: 
        0 1px 3px rgba(0,0,0,0.7),
        0 0 10px rgba(0,0,0,0.5);
}


.side_banner {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    display: block;
    height: 215px; /* Half of main slider for balance */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.side_banner:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.side_banner_img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.3s ease;
}
.side_banner:hover .side_banner_img {
    transform: scale(1.05);
    filter: brightness(1.1);
}
.side_banner_content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.6), rgba(0,0,0,0.1));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    color: white;
    transition: all 0.3s ease;
}
.side_banner_title {
     font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(211, 47, 47, 0.3);
}
.side_banner_subtitle {
    font-size: 1rem;
       font-weight: 700;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 20px rgba(211, 47, 47, 0.3);
}


/* --- About Section */

/* === بخش هدف ما فشرده‌تر === */
.purpose-section {
  padding: 50px 0; /* کاهش پدینگ بالا و پایین */
  background-color: #f8f9fa;
  position: relative;
  overflow: hidden;
}

/* کارت اصلی */
.purpose-card.compact {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.purpose-card.compact:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(211, 47, 47, 0.15);
}

/* بخش تصویر */
.purpose-image-wrapper {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.purpose-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.purpose-card:hover .purpose-image {
  transform: scale(1.05);
}

.purpose-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.3));
}

/* بخش محتوا */
.purpose-content {
  padding: 25px; /* کاهش پدینگ */
  height: 100%;
  display: flex;
  flex-direction: column;
}

.purpose-lead {
  font-size: 1.4rem; /* کاهش سایز فونت */
  font-weight: 600;
  color: #333;
  margin-bottom: 15px; /* کاهش فاصله */
  line-height: 1.3;
  position: relative;
}



.purpose-text {
  font-size: 0.95rem; /* کاهش سایز فونت */
  line-height: 1.7;
  color: #555;
  margin-bottom: 15px; /* کاهش فاصله */
}

/* ویژگی‌ها */
.purpose-features {
  margin-bottom: 20px; /* کاهش فاصله */
}

.purpose-feature {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; /* کاهش سایز آیکون */
  height: 30px; /* کاهش سایز آیکون */
  border-radius: 50%;
  background: rgba(211, 47, 47, 0.1);
  color: var(--primary-color, #d32f2f);
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.purpose-feature span {
  font-size: 0.9rem; /* کاهش سایز فونت */
}

.purpose-feature:hover .feature-icon {
  background: var(--primary-color, #d32f2f);
  color: white;
  transform: scale(1.1);
}

/* دکمه */
.purpose-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px; /* کاهش پدینگ دکمه */
  background: var(--primary-color, #d32f2f);
  color: white;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem; /* کاهش سایز فونت */
  margin-top: auto;
  align-self: flex-start;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.purpose-btn i {
  transition: transform 0.3s ease;
}

.purpose-btn:hover {
  background: var(--primary-dark, #b71c1c);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(211, 47, 47, 0.4);
  color: white;
  text-decoration: none;
}

.purpose-btn:hover i {
  transform: translateX(-5px);
}

/* ریسپانسیو */
@media (max-width: 992px) {
  .purpose-image-wrapper {
    height: 220px; /* کاهش ارتفاع تصویر در حالت موبایل */
  }
  
  .purpose-content {
    padding: 20px;
  }
  
  .purpose-lead {
    font-size: 1.3rem;
  }
}

@media (max-width: 576px) {
  .purpose-section {
    padding: 40px 0;
  }
  
  .purpose-content {
    padding: 20px 15px;
  }
  
  .purpose-lead {
    font-size: 1.2rem;
  }
  
  .purpose-text {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
  }
  
  .purpose-feature span {
    font-size: 0.85rem;
  }
}
/* --- Homepage Category Section --- */
.category-section {
    padding: 60px 0;
}
.category-card {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    color: var(--dark-color);
    height: 100%;
}
.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    color: var(--primary-color);
}
.category-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}
.category-card:hover .category-icon {
    transform: scale(1.1);
}
.category-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* --- Featured Products Section (Improved) --- */
/* ========================
   FEATURED PRODUCTS SECTION
   ======================== */

.featured_products_section {
    padding: 60px 0;
    background: #f8f9fa;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 3rem !important;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* ========================
   PRODUCT CARD STYLES
   ======================== */

.product_card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 320px;
    display: flex;
    flex-direction: column;
}

.product_card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ========================
   PRODUCT IMAGE STYLES
   ======================== */

.product_image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #f5f5f5;
}

.product_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product_card:hover .product_image img {
    transform: scale(1.05);
}

.product_actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product_card:hover .product_actions {
    opacity: 1;
}

.action-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* ========================
   PRODUCT INFO STYLES
   ======================== */

.product_info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product_title {
    margin-bottom: 8px;
}

.product_title a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
    height: 2.6em;
}

.product_title a:hover {
    color: var(--primary-color);
}

.product_price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-family: 'Vazir', sans-serif;
}

/* ========================
   ADD TO CART BUTTON
   ======================== */

.add-to-cart-btn {
background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ========================
   VIEW ALL PRODUCTS BUTTON
   ======================== */

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    font-weight: 600;
    font-family: 'Vazir', sans-serif;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ========================
   RESPONSIVE STYLES
   ======================== */

@media (max-width: 992px) {
    .product_card {
        height: 300px;
    }
    
    .product_image {
        height: 160px;
    }
}

@media (max-width: 768px) {
    .featured_products_section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem !important;
    }
    
    .product_card {
        height: 280px;
        margin-bottom: 20px;
    }
    
    .product_image {
        height: 150px;
    }
    
    .product_info {
        padding: 12px;
    }
    
    .product_title a {
        font-size: 0.9rem;
    }
    
    .product_price {
        font-size: 1rem;
    }
    
    .add-to-cart-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* موبایل - 2 کارت در هر سطر */
@media (max-width: 576px) {
    .featured_products_section {
        padding: 30px 0;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .product_card {
        height: 260px;
        margin-bottom: 15px;
    }
    
    .product_image {
        height: 140px;
    }
    
    .product_info {
        padding: 10px;
    }
    
    .product_title a {
        font-size: 0.85rem;
        line-height: 1.2;
    }
    
    .product_price {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .add-to-cart-btn {
        font-size: 0.75rem;
        padding: 5px 8px;
        gap: 3px;
    }
    
    .action-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .btn-outline-primary {
        padding: 10px 25px !important;
        font-size: 0.9rem;
    }
}


/* ========================
   ADD TO CART BUTTON
   ======================== */

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, #c62828 0%, #8b0000 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211,47,47,0.3);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

/* ========================
   VIEW ALL PRODUCTS BUTTON
   ======================== */

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    font-weight: 600;
    font-family: 'Vazir', sans-serif;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-outline-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-outline-primary:hover::before {
    left: 0;
}

.btn-outline-primary:hover {
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(211,47,47,0.2);
}

/* ========================
   RESPONSIVE STYLES
   ======================== */

@media (max-width: 768px) {
    .featured_products_section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem !important;
    }
    
    .product_image {
        height: 200px;
    }
    
    .product_info {
        padding: 20px 15px;
    }
    
    .product_title a {
        font-size: 1rem;
    }
    
    .product_price {
        font-size: 1.1rem;
    }
    
    .add-to-cart-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .product_card {
        margin-bottom: 20px;
    }
    
    .btn-outline-primary {
        padding: 12px 30px !important;
        font-size: 0.95rem;
    }
}

/* --- Why Us Section --- */
.why-us-section {
    padding: 60px 0;
    background-color: white;
}
.feature-box {
    text-align: center;
    padding: 25px;
    border: 1px solid var(--gray-300);
    border-radius: 15px;
    background-color: var(--gray-100);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.feature-box:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.feature-box:hover .icon {
    color: var(--primary-dark);
}
.feature-box .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: color 0.3s ease;
}
.feature-box h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.feature-box p {
    color: #666;
    font-size: 0.9rem;
}

/* ============================================================================ */
/* --- Footer --- */
.site-footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/assets/template/site-theme/img/pattern.svg');
    background-size: 60px 60px;
    opacity: 0.3;
    pointer-events: none;
}
.site-footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-color) 20%, 
        var(--primary-color) 80%, 
        transparent 100%);
    pointer-events: none;
}
.footer-top {
    padding: 60px 0 40px;
    position: relative;
}
.footer-logo p {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
}
.footer-about {
    font-size: 0.9rem;
    line-height: 1.8;
}
.footer-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}
.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}
.footer-menu {
    list-style: none;
    padding: 0;
}
.footer-menu li {
    margin-bottom: 10px;
}
.footer-menu a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}
.footer-menu a:hover {
    color: #fff;
    padding-right: 5px;
}
.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.contact-item i {
    color: var(--primary-color);
    margin-left: 10px;
}
.contact-link {
    color: rgba(255, 255, 255, 0.8);
}
.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}
.copyright p, .footer-designer p {
    margin: 0;
    font-size: 0.9rem;
}
.footer-designer a {
    color: var(--primary-color);
    font-weight: 500;
}
.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Modal Styles --- */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.modal-header {
    border-bottom: 2px solid var(--primary-color);
    background-color: var(--gray-100);
    border-radius: 15px 15px 0 0;
}
.modal-title {
    color: var(--primary-color);
    font-weight: 600;
}
.modal-footer {
    border-top: 1px solid var(--gray-200);
}
.accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background-color: rgba(211, 47, 47, 0.05);
}
.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(211, 47, 47, 0.25);
}


/* --- Product Detail Page --- */
.product-detail-section { padding: 40px 0; background: white; }
.product-gallery .main-image {
    width: 100%;
    border-radius: 15px;
    border: 1px solid var(--gray-300);
    margin-bottom: 15px;
}
.product-thumbnails { display: flex; gap: 10px; }
.product-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--gray-300);
    cursor: pointer;
    transition: all 0.3s;
}
.product-thumbnails img.active, .product-thumbnails img:hover { border-color: var(--primary-color); }

.product-info h1 { font-size: 2rem; font-weight: 700; margin-bottom: 15px; }
.product-price { font-size: 2.2rem; font-weight: 700; color: var(--primary-color); margin-bottom: 10px; }
.stock-status { font-weight: 500; }
.stock-status.in-stock { color: #28a745; }
.stock-status.out-of-stock { color: var(--primary-dark); }
.product-short-desc { color: #555; line-height: 1.7; margin: 20px 0; }
.quantity-selector { display: flex; align-items: center; gap: 10px; }
.quantity-selector .btn { background-color: var(--gray-200); font-weight: bold; border: 1px solid var(--gray-300); }
.quantity-selector .form-control { text-align: center; max-width: 70px; }
.product-actions-main .add-to-cart-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    background-color: var(--primary-color);
}
.product-actions-main  {
    background-color: var(--primary-dark);
}
.product-tabs .nav-link { color: var(--dark-color); font-weight: 500; }
.product-tabs .nav-link.active { color: var(--primary-color); border-color: var(--primary-color) var(--primary-color) #fff; }
.product-tabs .tab-content { padding: 20px; border: 1px solid #dee2e6; border-top: 0; border-radius: 0 0 0.25rem 0.25rem; }


/* --- Cart & Checkout Pages --- */
.cart-section, .checkout-section { padding: 40px 0; }
.cart-table img { width: 80px; border-radius: 8px; }
.cart-summary, .order-summary { background-color: white; border-radius: 10px; padding: 25px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.checkout-form .form-control { padding: 12px; }
.cart-section .btn-danger, .checkout-section .btn-danger {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.cart-section .btn-danger:hover, .checkout-section .btn-danger:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}


/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
    .header_container { grid-template-columns: auto 1fr auto; }
    .header_search_section { display: none; }
    .header_cart_section { display: none; }
    .header_login_section { display: none; }
    .mobile_menu_toggle { display: flex; }
    .main_nav_wrapper { display: none; }
    #mainSlider .carousel-item { height: 350px; }
    .main_slider_title { font-size: 2rem; }
    .side_banner { height: 180px; min-height: auto; }
    .main_slider_item { height: 350px; }
    .about-content { padding: 20px; }
    .feature-box { margin-bottom: 20px; }
}
@media (max-width: 767px) {
    body { padding-bottom: 80px; } /* Increased space for bottom nav */
    .topbar_wrapper { display: none; }
    .header_wrapper { padding: 10px 0; }
    .header_container { display: flex; justify-content: space-between; }
    #mainSlider .carousel-item { height: 250px; }
    .main_slider_title { font-size: 1.5rem; }
    .side_banner { height: 150px; }
    .main_slider_item { height: 250px; }
    .about-section .row { flex-direction: column-reverse; }
    .about-content { margin-top: 20px; }
    .feature-box { margin-bottom: 20px; }
    .section_header { margin-bottom: 30px; text-align: center; }
    .section_title { font-size: 1.8rem; }
    .category-section .row { justify-content: center; }
    .featured_products_section .row { row-gap: 20px; }
    .section_view_all { margin-top: 10px; display: block; width: fit-content; margin-left: auto; margin-right: auto; }
    /* Bottom Nav */
    .bottom-nav {
        display: block !important; /* Ensure visible in mobile */
        position: fixed;
    
        bottom: 20PX;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #0f0f0f, #2a2a2a); /* Match modern patterned black gradient */
        box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        padding: 15px 0;
        border-top: 2px solid var(--primary-color);
    }
    .bottom-nav .row { justify-content: space-around; }
    .bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: rgba(255, 255, 255, 0.7);
        text-decoration: none;
        font-size: 0.8rem;
        transition: color 0.3s ease;
    }
    .bottom-nav a.active { color: var(--primary-color); }
    .bottom-nav a i { font-size: 1.4rem; margin-bottom: 4px; transition: transform 0.3s ease; }
    .bottom-nav a:hover i { transform: scale(1.1); }
    .bottom-nav a div { font-size: 0.7rem; }
}
@media (max-width: 575px) {
    #mainSlider .carousel-item { height: 200px; }
    .main_slider_item { height: 200px; }
    .main_slider_title { font-size: 1.2rem; }
    .main_slider_text { font-size: 0.9rem; }
    .side_banner { height: 120px; }
    .side_banner_title { font-size: 1.1rem; }
    .side_banner_subtitle { font-size: 0.8rem; }
    .product_card .product_title { font-size: 0.9rem; height: 40px; }
    .product_price { font-size: 1rem; }
    .add-to-cart-btn { padding: 8px; font-size: 0.9rem; }
    .feature-box { padding: 20px; }
    .bottom-nav a i { font-size: 1.2rem; }
    .bottom-nav a div { font-size: 0.65rem; }
}

/* ===================================================================== */
/* --- Product List Page Styles --- */
.product-list-section {
    padding: 60px 0;
    background-color: var(--light-color);
}

/* --- استایل‌های مدرن برای فیلترها --- */
.filter-sidebar {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.filter-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-200);
}

.filter-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0;
    position: relative;
}

.filter-reset-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.filter-reset-btn:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

.filter-reset-btn i {
    margin-left: 6px;
    font-size: 0.9rem;
}

/* استایل گروه‌های فیلتر آکاردئونی */
.filter-accordion {
    margin-bottom: 15px;
}

.filter-group {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.filter-group:hover {
    border-color: var(--primary-light);
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.filter-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-group-header:hover {
    background-color: rgba(var(--primary-color-rgb), 0.05);
}

.filter-group-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--secondary-color);
}

.filter-group-title i {
    margin-left: 10px;
    color: var(--primary-color);
    font-size: 1rem;
}

.toggle-icon {
    color: var(--gray-500);
    transition: transform 0.3s ease;
}

.filter-group-header[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.filter-group-body {
    padding: 15px;
    border-top: 1px solid var(--gray-200);
    background-color: #fcfcfc;
}

/* چک‌باکس سفارشی */
.custom-checkbox {
    position: relative;
    padding-right: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--secondary-light);
    transition: all 0.2s ease;
}

.custom-checkbox:hover {
    color: var(--primary-color);
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-label {
    flex: 1;
}

.item-count {
    background-color: var(--gray-200);
    color: var(--secondary-light);
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 5px;
    transition: all 0.2s ease;
}

.custom-checkbox:hover .item-count {
    background-color: var(--primary-light);
    color: white;
}

.checkmark {
    position: absolute;
    top: 0;
    right: 0;
    height: 20px;
    width: 20px;
    background-color: #f5f5f5;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.custom-checkbox:hover input ~ .checkmark {
    border-color: var(--primary-color);
    background-color: #f8f8f8;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

/* سوئیچ سفارشی */
.custom-switch {
    position: relative;
    padding-right: 55px;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: var(--secondary-light);
    transition: all 0.2s ease;
}

.custom-switch:hover {
    color: var(--primary-color);
}

.custom-switch input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.switch-label {
    flex: 1;
}

.switch-slider {
    position: absolute;
    top: 0;
    right: 0;
    height: 22px;
    width: 44px;
    background-color: #f1f1f1;
    border-radius: 34px;
    transition: all 0.3s ease;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    right: 4px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.custom-switch input:checked ~ .switch-slider {
    background-color: var(--primary-color);
}

.custom-switch input:checked ~ .switch-slider:before {
    transform: translateX(-22px);
}

/* دکمه اعمال فیلتر */
.filter-actions {
    margin-top: 25px;
}

.filter-apply-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

.filter-apply-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(var(--primary-color-rgb), 0.4);
}

.filter-apply-btn:active {
    transform: translateY(0);
}

.filter-apply-btn i {
    margin-left: 8px;
    font-size: 1rem;
}

/* --- استایل‌های مدرن برای بخش مرتب‌سازی و نمایش تعداد محصولات --- */
.product-controls-wrapper {
    margin-bottom: 30px;
}

.product-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    position: relative;
}

.product-controls::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 0 12px 12px 0;
}

/* بخش مرتب‌سازی */
.product-sort {
    display: flex;
    align-items: center;
}

.sort-label {
    display: flex;
    align-items: center;
    margin-left: 15px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.sort-label i {
    margin-left: 8px;
    color: var(--primary-color);
}

.sort-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.sort-option {
    background: none;
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.85rem;
    color: var(--secondary-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-option:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(var(--primary-color-rgb), 0.05);
}

.sort-option.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 3px 8px rgba(var(--primary-color-rgb), 0.2);
}

/* بخش نمایش تعداد */
.product-count {
    display: flex;
    align-items: center;
    gap: 15px;
}

.count-badge {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    box-shadow: 0 3px 8px rgba(var(--primary-color-rgb), 0.2);
}

.count-number {
    font-weight: 700;
    font-size: 1rem;
    margin-left: 5px;
}

.count-pagination {
    color: var(--secondary-light);
    font-size: 0.9rem;
}

.count-pagination span {
    color: var(--primary-color);
    font-weight: 600;
}

/* تنظیم رنگ بخش شمارش صفحه (pagination) مطابق با رنگ اصلی سایت */
.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--primary-color-light);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item:not(.active) .page-link:hover {
    background-color: var(--primary-color-light);
    color: var(--primary-color-dark);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    border-color: #dee2e6;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 991px) {
    .filter-sidebar {
        margin-bottom: 30px;
    }
    
    .product-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .product-sort {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .sort-label {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .sort-options {
        width: 100%;
        justify-content: space-between;
    }
    
    .sort-option {
        flex: 1;
        text-align: center;
        padding: 5px 8px;
        font-size: 0.8rem;
    }
    
    .product-count {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 767px) {
    .filter-sidebar {
        padding: 20px 15px;
    }
    
    .filter-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .filter-title {
        font-size: 1.1rem;
    }
    
    .filter-group {
        margin-bottom: 10px;
    }
    
    .filter-group-body {
        padding: 10px;
    }
    

}
/* ===================================================================== */

/* --- Product Detail Page Styles --- */
/* --- Product Detail Page Styles --- */
.product-detail-section {
    padding: 40px 0; /* کاهش padding برای مینیمالیسم */
    background-color: var(--light-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03); /* سایه نرم‌تر */
}

.product-gallery {
    display: flex;
    flex-direction: column; /* thumbnails زیر main-image */
    gap: 10px; /* فاصله کمتر */
}

.product-gallery .main-image {
    border-radius: 15px; /* کوچکتر */
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* سایه ملایم */
    transition: transform 0.3s ease;
}

.product-gallery .main-image:hover {
    transform: scale(1.01); /* افکت کمتر برای مینیمالیسم */
}

.product-gallery .main-image img {
    width: 100%;
    height: auto;
    transition: transform 0.4s ease;
}

.product-gallery .main-image:hover img {
    transform: scale(1.05); /* زوم ملایم */
}

.thumbnails {
    display: flex;
    flex-direction: row; /* افقی زیر اصلی */
    gap: 8px; /* فاصله کمتر */
    justify-content: center; /* مرکزی برای مینیمالیسم */
}

.thumbnails img {
    width: 80px; /* کوچکتر */
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--gray-200); /* مرز نازک */
    cursor: pointer;
    transition: all 0.2s ease; /* انیمیشن سریع‌تر */
}

.thumbnails img.active, .thumbnails img:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(211,47,47,0.1); /* سایه ملایم */
    transform: scale(1.03); /* scale کمتر */
}

.product-info {
    padding: 20px; /* کاهش padding */
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.product-name {
    font-size: 1.8rem; /* کوچکتر برای مینیمالیسم */
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px; /* فاصله کمتر */
}

.product-brand {
    display: flex;
    align-items: center;
    margin: 8px 0;
    font-size: 0.9rem; /* کوچکتر */
    color: var(--gray-500);
}

.brand-logo {
    width: 30px; /* کوچکتر */
    margin-left: 8px;
}

.product-rating {
    color: #ffc107;
    margin-bottom: 10px;
    font-size: 0.9rem; /* کوچکتر */
}

.original-price {
    text-decoration: line-through;
    color: var(--gray-400);
    margin-left: 8px;
    font-size: 1rem; /* کوچکتر */
}

.discounted-price {
    font-size: 1.6rem; /* کوچکتر */
    color: var(--primary-color);
    font-weight: 600;
}

.discount-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px; /* کوچکتر */
    border-radius: 20px;
    font-size: 0.8rem; /* کوچکتر */
    margin-right: 8px;
}

.product-colors {
    margin: 10px 0; /* فاصله کمتر */
}

.product-colors .color-btn {
    width: 28px; /* کوچکتر */
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.product-colors .color-btn:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 1px 5px rgba(211,47,47,0.2);
}

.product-stock .stock-status {
    font-weight: 500;
    color: #28a745;
    font-size: 0.9rem; /* کوچکتر */
}

.stock-alert {
    color: var(--primary-dark);
    font-size: 0.85rem; /* کوچکتر */
    margin-top: 4px;
}

.product-actions {
    display: flex;
    gap: 8px; /* فاصله کمتر */
    margin: 15px 0; /* حاشیه کمتر */
}

.product-actions .add-to-cart-btn {
    background: var(--primary-color);
    color: white;
    flex: 1;
    padding: 10px; /* کوچکتر */
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.95rem; /* کوچکتر */
    transition: all 0.3s ease;
}

.product-actions .add-to-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(211,47,47,0.2);
}

.product-actions .wishlist-btn {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 50%;
    width: 40px; /* کوچکتر */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.product-actions .wishlist-btn:hover {
    background: var(--primary-color);
    color: white;
}

.product-tabs {
    margin-top: 30px; /* حاشیه کمتر */
}

.product-tabs .nav-tabs {
    border-bottom: 1px solid var(--primary-light);
    justify-content: center;
}

.product-tabs .nav-link {
    color: var(--dark-color);
    font-weight: 500;
    border: none;
    padding: 8px 15px; /* کوچکتر */
    font-size: 0.95rem; /* کوچکتر */
    transition: all 0.3s ease;
}

.product-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.product-tabs .tab-content {
    padding: 20px; /* کمتر */
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    margin-top: 15px;
    font-size: 0.9rem; /* متن‌ها کوچکتر برای مینیمالیسم */
}

.table-bordered td {
    padding: 8px; /* کمتر */
    border-color: var(--gray-200);
    font-size: 0.85rem; /* کوچکتر */
}

.reviews-section .rating-summary .rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.rating-bar span {
    min-width: 80px; /* کوچکتر */
    font-size: 0.85rem;
}

.rating-bar .bar {
    height: 6px; /* نازک‌تر */
    background: var(--primary-color);
    border-radius: 3px;
    flex: 1;
}

.review-item {
    border-bottom: 1px solid var(--gray-200);
    padding: 10px 0; /* کمتر */
    font-size: 0.85rem;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.review-stars {
    color: #ffc107;
    font-size: 0.9rem;
}

.review-img {
    width: 60px; /* کوچکتر */
    border-radius: 8px;
    margin-top: 8px;
}

.related-products .product_card {
    height: auto;
    border-radius: 10px; /* کوچکتر */
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
}

.related-products .product_card:hover {
    transform: translateY(-3px);
}

.additional-info .accordion-button {
    background-color: var(--gray-100);
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem; /* کوچکتر */
    padding: 10px; /* کمتر */
}

.additional-info .accordion-button:not(.collapsed) {
    background: var(--primary-color);
    color: white;
}

/* Responsive Adjustments for Product Detail */
@media (max-width: 991px) {
    .product-gallery {
        gap: 10px;
    }
    
    .thumbnails {
        justify-content: center;
    }
    
    .product-info {
        margin-top: 20px;
        padding: 15px;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 767px) {
    .product-gallery .main-image:hover {
        transform: none;
    }
    
    .product-gallery .main-image:hover img {
        transform: none;
    }
    
    .product-tabs .nav-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .related-products .row {
        row-gap: 15px;
    }
}

/* ================================================= */
/* --- Cart Section Styles (Unified & Responsive) --- */
.cart-section {
    padding: 40px 0;
    background-color: var(--light-color);
}

.cart-table-wrapper {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto; /* اسکرول افقی برای موبایل */
    -webkit-overflow-scrolling: touch; /* اسکرول نرم در iOS */
}

.cart-table {
    margin-bottom: 0;
    width: 100%; /* کامل پر کردن */
    table-layout: auto; /* تنظیم خودکار عرض ستون‌ها */
}

.cart-table th {
    background: var(--gray-100);
    text-align: center;
    font-weight: 500;
    padding: 10px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--gray-300);
    white-space: nowrap; /* جلوگیری از شکستن متن */
}

.cart-table td {
    vertical-align: middle;
    text-align: center;
    padding: 10px;
    font-size: 0.85rem;
    transition: background 0.3s ease;
    white-space: nowrap; /* جلوگیری از شکستن متن در موبایل */
}

.cart-table tr:hover td {
    background: rgba(211,47,47,0.03);
}

.cart-product {
    display: flex;
    align-items: center;
    min-width: 200px; /* حداقل عرض برای جلوگیری از فشرده شدن در موبایل */
}

.cart-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-left: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.cart-product-info a {
    font-weight: 500;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.cart-stock {
    font-size: 0.75rem;
    color: #28a745;
    margin-top: 3px;
}

.low-stock {
    color: var(--primary-dark);
}

.quantity-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    background: var(--gray-100);
    border-radius: 20px;
    padding: 3px;
    min-width: 100px; /* برای موبایل */
}

.quantity-selector .form-control {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 0.85rem;
}

.quantity-selector .btn {
    padding: 3px 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 0.8rem;
}

.cart-summary {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 80px;
}

.summary-title {
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 1px solid var(--primary-light);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.1rem;
    border-top: 1px solid var(--gray-300);
    padding-top: 8px;
    margin-top: 15px;
}

.summary-progress {
    margin: 10px 0;
}

.progress {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
}

.progress-bar {
    background: var(--primary-color);
}

.coupon .input-group {
    margin-top: 8px;
}

.coupon .form-control {
    border-radius: 20px 0 0 20px;
    padding: 8px 15px;
    font-size: 0.85rem;
}

.coupon .btn {
    border-radius: 0 20px 20px 0;
    background: var(--primary-color);
    color: white;
    font-size: 0.85rem;
}

/* Responsive Adjustments (بدون تمایز موبایل/دسکتاپ، فقط اسکرول) */
@media (max-width: 767px) {
    .cart-table th, .cart-table td {
        padding: 8px; /* کمتر برای موبایل */
        font-size: 0.8rem;
    }
    
    .cart-product {
        min-width: auto; /* تنظیم برای اسکرول */
    }
    
    .quantity-selector {
        min-width: 80px;
    }
    
    .cart-summary {
        margin-top: 20px; /* فضای بیشتر در موبایل */
    }
}
/* ============================================================= */
/* --- Checkout Page Styles --- */
/* --- Checkout Section Styles (Attractive & Minimal) --- */
.checkout-section {
    padding: 40px 0;
    background-color: var(--light-color);
}

.checkout-form-wrapper {
    background-color: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
}

.form-title {
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control {
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(211, 47, 47, 0.15);
}

/* کارت‌های روش ارسال و پرداخت (کوچکتر و افقی) */
.shipping-options, .payment-options {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px; /* فاصله کمتر */
    padding-bottom: 10px; /* برای اسکرول */
    -webkit-overflow-scrolling: touch;
}

.option-card {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px; /* کوچکتر */
    padding: 10px; /* کوچکتر */
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px; /* حداقل عرض برای افقی ماندن */
    flex: 0 0 auto;
}

.option-card:hover {
    transform: scale(1.05); /* scale کمتر برای فضای کوچک */
    box-shadow: 0 3px 10px rgba(211,47,47,0.1);
}

.option-card.selected {
    border-color: var(--primary-color);
    background: rgba(211,47,47,0.05);
    box-shadow: 0 3px 10px rgba(211,47,47,0.2);
}

.option-card .icon {
    font-size: 1.2rem; /* کوچکتر */
    color: var(--primary-color);
    margin-bottom: 5px;
}

.option-card h5 {
    font-size: 0.9rem; /* کوچکتر */
    font-weight: 600;
    margin-bottom: 3px;
}

.option-card p {
    font-size: 0.75rem; /* کوچکتر */
    color: var(--gray-600);
    margin: 0;
}

/* کد تخفیف (جذاب با پیام) */
.coupon-group .form-control {
    border-radius: 8px 0 0 8px;
}

.coupon-group .btn-primary {
    border-radius: 0 8px 8px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.coupon-message {
    font-size: 0.85rem;
    padding: 8px;
    border-radius: 5px;
    text-align: center;
}

.coupon-message.success {
    background: #d4edda;
    color: #155724;
}

/* خلاصه سفارش */
.order-summary {
    background-color: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
    position: sticky;
    top: 80px;
}

.summary-title {
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    border-bottom: 1px dashed var(--gray-200);
    padding-bottom: 8px;
    font-size: 0.85rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.05rem;
    border-top: 1px solid var(--gray-200);
    padding-top: 8px;
    margin-top: 15px;
}

.security-note {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-align: center;
}

.security-note i {
    color: var(--primary-color);
    margin-left: 5px;
}

.btn-danger {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: 25px;
    padding: 10px;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(211,47,47,0.2);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .order-summary {
        position: static;
        margin-top: 20px;
    }
}

@media (max-width: 767px) {
    .checkout-form-wrapper {
        padding: 12px;
    }
    
    .form-title, .summary-title {
        font-size: 1.2rem;
    }
    
    .option-card {
        min-width: 100px; /* کوچکتر برای موبایل */
        padding: 8px;
    }
    
    .option-card .icon {
        font-size: 1rem;
    }
    
    .option-card h5 {
        font-size: 0.8rem;
    }
    
    .option-card p {
        font-size: 0.7rem;
    }
}

/*  */
/*  */
/* استایل‌های مربوط به صفحه فروش عمده */

/* استایل لیست محصولات عمده */
.wholesale-products-list {
    margin-top: 25px;
}

/* کارت محصول عمده */
.wholesale-product-item {
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.wholesale-product-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* تصویر محصول */
.wholesale-product-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    overflow: hidden;
}

.wholesale-product-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* نشان فروش عمده */
.wholesale-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #d32f2f;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
}

/* اطلاعات محصول */
.wholesale-product-info {
    padding: 0 10px;
}

.wholesale-product-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
}

.wholesale-product-code {
    color: #6c757d;
    font-size: 12px;
    margin-bottom: 5px;
}

.wholesale-product-stock {
    margin-bottom: 5px;
}

.in-stock {
    color: #28a745;
    font-size: 13px;
    display: flex;
    align-items: center;
}

.in-stock:before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    margin-left: 5px;
}

.wholesale-product-min {
    font-size: 12px;
    color: #555;
}

.wholesale-product-min span {
    font-weight: bold;
    color: #d32f2f;
}

/* قیمت محصول */
.wholesale-product-price {
    text-align: center;
}

.price-value {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin-bottom: 5px;
}

.discount-badge {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* کنترل تعداد و دکمه خرید */
.wholesale-product-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}

.quantity-btn {
    background: #f8f8f8;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.quantity-btn:hover {
    background: #e9e9e9;
}

.quantity-input {
    width: 50px;
    border: none;
    text-align: center;
    font-size: 14px;
    padding: 5px 0;
}

.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-btn {
    width: 100%;
    background-color: #d32f2f;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    background-color: #9a0007;
}

/* Responsive styles */
@media (max-width: 767px) {
    .wholesale-product-image {
        height: 80px;
    }
    
    .wholesale-product-title {
        font-size: 14px;
    }
    
    .wholesale-product-item {
        padding: 10px;
    }
    
    .price-value {
        font-size: 14px;
    }
    
    .wholesale-product-actions {
        margin-top: 10px;
    }
}


/* استایل دکمه بازگشت به بالا */
.back-to-top-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.back-to-top-wrapper.show {
    visibility: visible;
    opacity: 1;
}

.back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.back-to-top:hover {
    background-color: #333;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top i {
    font-size: 20px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.back-to-top:hover i {
    animation: moveUpDown 1s ease infinite;
}

@keyframes moveUpDown {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* اضافه کردن افکت موج هنگام کلیک */
.back-to-top::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.back-to-top:active::after {
    width: 150%;
    height: 150%;
}