*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  direction: rtl;
}

html,
body {
  direction: rtl;
  color: #000 !important;
  overflow: auto;
  scrollbar-width: none;
}

.container {
  max-width: 1360px !important;
}

body::-webkit-scrollbar {
  display: none;
}

#side-menu,
#side-cart {
  max-width: 320px;
}

#cart-items > div:last-child {
  border-bottom: none !important;
}

#cart h6 {
  width: 26px;
  line-height: 26px;
  transform: translate(6px, -12px);
}

.card-box.offer {
  /* background-color: rgba(250, 250, 250, 1); */
}

.card-title-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 5px;
  border-bottom: 2px solid rgba(255, 210, 186, 1);
  margin-bottom: 0.8rem;
}

.card-title-box h6 {
  font-size: 22px;
  font-weight: 400;
}

.card-title-box a {
  font-size: 14px;
}

.card-title-box a img {
  transform: rotate(90deg);
}

.card-title-box a:hover img {
  filter: invert(77%) sepia(52%) saturate(6914%) hue-rotate(97deg)
    brightness(94%) contrast(98%);
}

.slider-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%; /* ارتفاع کارت توی swiper پر میشه */
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.slider-card .img-link {
  padding: 0.5rem;
  border-radius: 8px 8px 0 0;
  box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.1);
  min-height: 300px;
}

.slider-card .img-link img {
  width: 100%;
  height: 200px; /* ارتفاع ثابت */
  object-fit: cover; /* عکس کراپ میشه تا توی باکس بخوابه */
  border-radius: 8px 8px 0 0;
}

.slider-card .img-link.image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* مربع */
  overflow: hidden;
}

.slider-card .img-link.image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  visibility: hidden; /* به جای display:none */
}

.slider-card .img-link > div.placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #eee, #ddd, #eee);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 6px;
}

.slider-card .card-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.slider-card .card-name {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* حداکثر ۲ خط */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 40px; /* برای یکسان شدن ارتفاع */
  font-size: 13px;
  margin: 1rem 0 0;
}

.slider-card .card-price-box {
  padding-top: 1.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.slider-card .card-price-box p {
  font-size: 16px;
}

.slider-card .card-price-box p.discount {
  font-weight: 200;
  color: rgba(115, 115, 115, 1);
  text-decoration: line-through;
}

.slider-card .card-price-box p.price:after {
  content: " تومان";
  font-size: 10px;
  display: inline-block;
  text-decoration: none !important;
}

.slider-card .btn-box {
  padding: 0.5rem 0;
  width: 60%;
}

.slider-card .btn-box a {
  display: flex;
  justify-content: center;
  background-color: rgba(234, 82, 1, 1);
  color: #fff;
  padding: 10px;
  border-radius: 4px;
}

.slider-card .btn-box a:hover {
  background-color: rgb(255, 97, 12);
}

.slider-card .btn-box a:active {
  background-color: rgb(255, 130, 63);
}

.slider-card .btn-box a img {
  filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(88deg) brightness(106%)
    contrast(102%);
}

.slider-card .btn-box img {
  transform: rotate(90deg);
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: rgba(234, 82, 1, 1);
}

div:has(> #button-cart) {
  box-shadow: 0 -4px 0.25rem rgb(0 0 0 / 8%);
}

ol.breadcrumb {
  width: max-content;
}

.breadcrumb-item > a:hover {
  color: rgba(234, 82, 1, 1);
}

a.card-name:hover {
  color: rgba(234, 82, 1, 1);
}

.pagination {
  flex-wrap: wrap;
}

.pagination li {
  width: 30px;
  height: 30px;
  font-size: 15px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.pagination li a {
  line-height: 30px;
}

.pagination li a i {
  font-size: 12px;
}

.category-list a {
  display: flex;
  flex-flow: column nowrap;
  width: 100px;
  border-radius: 5px;
  border: 1px solid #f5f5f5;
}

.category-list a div:first-of-type {
  position: relative;
  background-color: #f5f5f5;
  padding: 1rem;
}

.category-list a div:first-of-type::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 0;
  height: 30%;
  box-shadow: 0 60px 20px -10px #444;
  z-index: 1;
}

.category-list a img {
  position: relative;
  width: 100%;
  height: auto;
  z-index: 2;
  border-radius: 50%;
}

.show-more {
  position: relative;
  height: 200px;
  overflow: hidden;
  padding-bottom: 6px;
}

.show-more .show-more-title {
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  text-align: center;
  padding-top: 50px;
  color: #ea5201;
  background: linear-gradient(to top, #fff 20%, #0000);
}

.show-more:has(input:checked) {
  height: auto;
  overflow: auto;
}

.show-more:has(input:checked) .show-more-title {
  background: none;
}

.show-more .show-more-title:before {
  content: "نمایش بیشتر";
}

.show-more .show-more-title:has(input:checked):before {
  content: "نمایش کمتر";
}

.show-more .show-more-title input {
  appearance: none;
}

div:has(> .btn-total-collapse) {
  z-index: 10;
}

.btn-total-collapse {
  position: absolute;
  top: -25px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  left: calc(50% - 25px);
  padding: 11px 16px;
  border: 2px solid #dee2e6;
  background: #fff;
  transform: rotateZ(-90deg);
  transition: all 0.3s ease;
}

.btn-total-collapse:after {
  font-family: icon-font;
  content: "\0049";
}

.btn-total-collapse.collapsed {
  transition: all 0.3s ease;
  transform: rotate(90deg);
}

#tab-description h2,
#tab-description h3 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 4px;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@media (min-width: 412px) {
}

@media (min-width: 602px) {
}

@media (min-width: 768px) {
}

@media (min-width: 1024px) {
}

.category-list ::before {
  content: none !important;
}

.navbar {
  background-color: rgba(245, 245, 245, 1);
}

.navbar-brand {
  width: 90px;
}

.navbar a {
  cursor: pointer;
}

.t-icon-box {
  display: flex;
  margin: 0 0.5rem;
}

.t-icon-box a {
  padding: 0 0.8rem;
}

.t-icon-box > a.icon-link:before {
  content: "" !important;
}

.icon-link.cart{
position: relative;
}

.cart-badge {
  position: absolute;
  top: -10px;
  left: 0; /* چون راست‌چین هستید، از راست قرار می‌دیم */
  min-width: 18px; /* مربع/دایره حداقل اندازه */
  height: 18px;
  padding: 0 6px; /* برای اعداد دو رقمی */
  background: var(--badge-bg);
  color: var(--badge-color);
  border-radius: 999px;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform-origin: center;
  white-space: nowrap;
}

/* اگر مقدار صفر یا خالی باشه، مخفی کن */
.cart-badge[data-count="0"],
.cart-badge[data-count=""],
.cart-badge:empty {
  display: none !important;
}

/* وقتی عدد خیلی بزرگ شد، مقیدش کن (مثلاً 99+) */
.cart-badge[data-count]:not([data-count=""]) {
  /* جا برای جایگزین کردن با js که بیش از 99 رو 99+ کنه */
}

/* کوچک‌تر کردن در موبایل */
@media (max-width: 480px) {
  :root {
    --icon-size: 24px;
  }

  /* .cart-badge {
        top: -5px;
        right: -5px;
        min-width: 16px;
        height: 16px;
        font-size: 10px;
        line-height: 16px;
        padding: 0 5px;
    } */
}

.menu-nav {
  padding: 1rem;
  box-shadow: 0px 5px 10px -8px rgba(0, 0, 0, 0.1);
}

.menu a {
  text-decoration: none;
  color: black;
  padding-left: 3rem;
}

.second-nav {
  box-shadow: 0px 5px 10px -4px rgba(0, 0, 0, 0.1);
  padding: 1rem;
}

@media (min-width: 768px) {
  .second-nav {
    padding: 1rem 2rem;
  }

  .card-box {
    padding: 1rem 2rem;
  }
}

.t-dropdown-toggle::after {
  display: none !important;
}

.t-offcanvas-body {
  padding-left: 0;
  padding-top: 0;
  padding-bottom: 0;
  padding-right: 0;
}

.t-offcanvas-body .accordion-item {
  border: 0;
}

.t-offcanvas-body .accordion-collapse {
  background-color: #e0e0e0;
}

.value-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  background-color: rgba(255, 251, 245, 1);
}

.footer {
  background-color: rgba(245, 245, 245, 1);
  padding: 1rem 1.25rem;
}

.footer-box {
  border-bottom: 2px solid rgba(115, 115, 115, 1);
  padding: 0.8rem 0;
}

.content-box {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: flex-start;
  height: 100%;
}

.enamad {
  max-width: 150px;
  max-height: 150px;
}

.social-box p {
  min-width: max-content;
}

.btn-primary {
  background-color: #ea5202;
  border: 0;
}

.btn-primary:hover {
  background-color: #b64000;
}

.btn-primary:focus {
  background-color: #742900;
}

.btn-primary:active {
  background-color: #b64000;
}

.accordion-button:not(.collapsed) {
  color: #ea5202;
}

.accordion-button:not(.collapsed)::after {
  transform: rotateZ(-90deg);
  color: #ea5202;
}

a:hover {
  color: #ea5202;
}

.whatsapp-float {
  position: fixed;
  bottom: 50px;
  right: 45px;
  z-index: 9999;
  background-color: #25d366;
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float img {
  display: block;
  width: 45px;
  height: 45px;
}

/* پاپ‌آپ */
.popup {
  position: fixed;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 999;
  padding: 20px 20px 60px;
  display: none;
  max-width: 90%;
  transition: all 0.4s ease;
}

.popup.active {
  display: block;
}

/* دسکتاپ */
@media (min-width: 768px) {
  .popup {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

/* موبایل */
@media (max-width: 767px) {
  .popup {
    left: 50%;
    bottom: 10%;
    transform: translateX(-50%);
    width: 100%;
    animation: slideUp 0.4s forwards;
  }

  .popup h3 {
    font-size: 12px;
  }

  .popup .price {
    font-size: 14px;
    color: #ea5202;
  }

  .popup.active {
    bottom: 20px;
  }

  @keyframes slideUp {
    to {
      bottom: 0px;
    }
  }
}

.popup img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
}

.popup h3 {
  margin-top: 10px;
  margin-bottom: 5px;
}

.popup .price {
  color: #00b894;
  font-weight: bold;
}

.popup p {
  margin-top: 10px;
}

/* دکمه ضربدر */
.close-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #888;
}

/* دکمه تایید */
.confirm-btn {
  position: absolute;
  bottom: 15px;
  left: 20px;
  right: 20px;
  padding: 10px;
  background: #ea5202;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}
