/************************************************
        ---------استایل های  صفحه آرشیو محصولات -------
        *************************************************
        /* Tooltip styling for Colors */
.color-btn {
  position: relative;
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #2d3e5e;
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 50;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #2d3e5e;
}

.color-btn:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Product Card */
.tansa-product-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.tansa-product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(45, 62, 94, 0.1);
}

.image-container {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #f8f8f8;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.tansa-product-card:hover .product-image {
  transform: scale(1.1);
}

.wishlist-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2d3e5e;
  transition: all 0.3s ease;
  z-index: 10;
}

.wishlist-btn:hover {
  background: #d4a373;
  color: white;
}

.quick-add {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(45, 62, 94, 0.9);
  color: white;
  padding: 12px;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.tansa-product-card:hover .quick-add {
  transform: translateY(0);
}

/* Filter Toggle Buttons (Desktop) */
.filter-toggle input:checked + label {
  background-color: #2d3e5e;
  color: white;
  border-color: #2d3e5e;
}

/* Switch Toggle Styles */
.switch-toggle {
  width: 40px;
  height: 20px;
  background-color: #e2e8f0;
  border-radius: 999px;
  position: relative;
  transition: background-color 0.3s;
  cursor: pointer;
  display: inline-block;
}

.switch-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

input:checked + .switch-toggle {
  background-color: #d4a373;
}

input:checked + .switch-toggle::after {
  transform: translateX(-20px);
}

/* FAQ Accordion */
.faq-item.active .faq-answer {
  max-height: 200px;
  padding-bottom: 1rem;
}

.faq-item.active i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

/* Overlay & Drawers Logic */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 90;
  display: none;
}

#overlay.active {
  display: block;
}

@media (max-width: 1024px) {
  /* Sidebar Filter Drawer */
  #sidebar-filter {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: white;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  }

  #sidebar-filter.active {
    right: 0;
  }

  /* Sort Drawer (Bottom Sheet) */
  #sort-drawer {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: white;
    z-index: 100;
    border-radius: 30px 30px 0 0;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
  }

  #sort-drawer.active {
    bottom: 0;
  }
}

/* لایه مات کننده روی محصولات */
.tansa-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border-radius: 1.5rem;
}

/* وقتی کلاس فعال شود لایه ظاهر می‌شود */
.is-loading .tansa-loading-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* آیکون لودینگ ضربان‌دار */
.tansa-loader {
  width: 48px;
  height: 48px;
  border: 3px solid #2d3e5e;
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ظرف کلی بخش توضیحات سئو */
.tansa-seo-box {
  /*background: #ffffff;
    border: 1px solid #F1F1F1;
    border-radius: 20px;
    margin-top: 50px;
    margin-bottom: 50px; */
  padding: 12px;
}

/* استایل پاراگراف‌ها: خوانایی بالا و رنگ ملایم */
.tansa-seo-box p {
  font-size: 15px;
  color: #5a6670;
  line-height: 2;
  margin-bottom: 20px;
  text-align: justify;
}

/* استایل عنوان H3: مدرن و متناسب با برند */
.tansa-seo-box h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #2d3e5e;
  /* رنگ اصلی تن‌سا */
  margin-top: 35px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* افزودن یک نشانگر ظریف قبل از H3 */
.tansa-seo-box h3::before {
  content: "";
  width: 8px;
  height: 8px;
  background-color: #d4a373;
  /* رنگ طلایی/قهوه‌ای برند */
  border-radius: 50%;
}

/* استایل لینک‌ها: ظریف و حرفه‌ای */
.tansa-seo-box a {
  color: #d4a373;
  text-decoration: none;
  border-bottom: 1px dashed #d4a373;
  transition: all 0.3s ease;
  font-weight: 600;
}

.tansa-seo-box a:hover {
  color: #2d3e5e;
  border-bottom-style: solid;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
  .tansa-seo-box {
    padding: 25px;
    margin: 20px 15px;
  }

  .tansa-seo-box h3 {
    font-size: 1.1rem;
  }
}
