/* --------------------
   Shop archive
-------------------- */
.shop-archive__body {
  margin: 25px 0 var(--space-section);
  position: relative;
}

.shop-archive:has(.album-hero) .shop-archive__body {
  margin-top: 3.5rem;
}

.shop-archive__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

.shop-archive--no-sidebar .shop-archive__layout {
  grid-template-columns: 1fr;
}

.shop-archive__main .section-title {
  margin-bottom: var(--space-head);
}

.shop-archive__intro {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* .shop-archive__intro-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  color: var(--text);
  line-height: 1.4;
}

.shop-archive__intro-subtitle {
  margin: 0;
  color: var(--gray);
  font-size: 1rem;
  line-height: 1.7;
} */

.shop-archive__pagination > ul.page-numbers {
  margin-top: 2rem;
  @media (width>=992px) {
    margin-top: 4rem;
  }
}

/* --------------------
   Album hero
-------------------- */
.album-hero {
  position: relative;
  overflow: visible;
  background-color: #f3f2f2;
  background-image:
    radial-gradient(
      ellipse min(79.17vw, 1140px) min(22.64vw, 326px) at min(32.36vw, 466px)
        min(3.16vw, 44.56px),
      rgb(219 232 255 / 0%) 0%,
      rgb(255 255 255 / 0%) 100%
    ),
    radial-gradient(
      ellipse 20% 100% at 16% 0%,
      rgba(141, 190, 194, 0.25) 0%,
      rgb(255 255 255 / 0) 100%
    ),
    radial-gradient(
      ellipse 25% 100% at 90% 70%,
      rgba(141, 190, 194, 0.25) 0%,
      rgb(236 236 236 / 0%) 100%
    );
  padding: clamp(70px, calc(64.286px + 1.786vw), 112px) 0
    clamp(25px, calc(6.429px + 5.804vw), 60px);
}

.album-hero__bg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58%;
  z-index: 0;
  opacity: 0.7;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 100%);
  mask-image: linear-gradient(transparent 0%, rgb(0, 0, 0) 100%);
}

.album-hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.album-hero__container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

.album-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 32rem;
  width: 100%;
  background: none;
}

/* .album-hero__title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.35;
  color: var(--text);
  font-variation-settings: "wght" 700;
} */

/* .album-hero__desc {
  display: none;
  margin-top: 0.85rem;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.8;
} */

.album-hero__desc p {
  margin: 0;
}

.album-hero__cta.button {
  margin-top: 1.25rem;
  gap: 0.5rem;
  /* min-height: 48px;
  padding: 0 1.5rem;
  border-radius: 999px;
  font-size: 0.95rem; */
}

.album-hero__cta .icon-download {
  font-size: 1rem;
}

.album-hero__media {
  margin-bottom: -4rem;
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.album-hero__product-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 260px;
}

@media (width >= 992px) {
  .album-hero {
    padding: clamp(70px, calc(64.286px + 1.786vw), 112px) 0
      clamp(25px, calc(6.429px + 5.804vw), 60px);
  }

  .album-hero__bg {
    top: 0;
    bottom: 0;
    right: auto;
    width: 52%;
    height: auto;
    -webkit-mask-image: linear-gradient(to right, #000 0%, transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, transparent 100%);
  }

  .album-hero__bg-img {
    object-position: left center;
  }

  .album-hero__container {
    flex-direction: row;
    align-items: center;
    /* justify-content: space-between; */
    text-align: right;
    gap: 2rem;
    /* min-height: 400px; */
  }

  .album-hero__content {
    align-items: flex-start;
    flex: 0 1 46%;
    max-width: 40rem;
    margin: auto 0;
  }

  .album-hero__desc {
    display: block;
  }

  .album-hero__cta.button {
    margin-top: 1.5rem;
    border-radius: 10px;
  }

  .album-hero__media {
    flex: 0 1 46%;
    width: auto;
    height: 100%;
    align-self: flex-end;
    justify-content: center;
    max-width: 225px;
    transform: scale(1.2);
    /* transform: translateY(1.5rem) scale(1.2); */
    /* transform-origin: top; */
    margin-bottom: 0;
    margin-top: 0;
  }
}

/* --------------------
   Toolbar / sorting
-------------------- */
.shop-archive__toolbar {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 18px;
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: var(--white);
  padding: 0.35rem 0;
}

.shop-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 16px;
  background: var(--color1);
  color: var(--white);
  font-family: inherit;
  font-size: 13px;
  font-variation-settings: "wght" 500;
  cursor: pointer;
  white-space: nowrap;
}

.shop-filter-btn:hover,
.shop-filter-btn:focus-visible {
  color: var(--white);
}

.shop-archive__sorting {
  flex: 1 1 auto;
  min-width: 0;
}

.shop-ordering {
  margin: 0;
}

.shop-ordering__desktop {
  display: none;
}

.shop-ordering__mobile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 48px;
  padding: 0 0.5rem 0 9px;
  border-radius: 16px;
  background: #f3f3f3;
  color: var(--text);
  cursor: pointer;
  font-size: 10px;
}

.shop-ordering__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 1.1rem;
}

.shop-ordering__mobile-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-ordering__mobile-text em {
  font-style: normal;
  font-variation-settings: "wght" 600;
}

.shop-ordering__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 8px;
  background: var(--color1);
  color: var(--white);
  flex: 0 0 auto;
  font-size: 9px;
}

.shop-ordering__select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0;
  font-size: 16px;
}

.shop-ordering__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0;
}

.shop-ordering__link {
  color: var(--text);
  text-decoration: none;
  padding: 0 0.65rem;
  position: relative;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.shop-ordering__link:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 0.9em;
  background: #ddd;
  transform: translateY(-50%);
}
.shop-ordering__link.is-active {
  pointer-events: none;
}
.shop-ordering__link.is-active,
.shop-ordering__link:hover {
  color: var(--color1);
}

@media (width >= 992px) {
  .shop-filter-btn {
    display: none;
  }

  .shop-archive__toolbar {
    display: block;
    margin-bottom: 1.5rem;
  }

  .shop-ordering__mobile {
    display: none;
  }

  .shop-ordering__desktop {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 56px;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--color3);
    border-radius: 24px;
    background: var(--white);
  }

  .shop-ordering__label {
    color: var(--text);
    font-size: 0.95rem;
    white-space: nowrap;
  }
}

/* --------------------
   Sidebar filters
-------------------- */
.shop-sidebar {
  position: relative;
}

.shop-sidebar__box {
  background: var(--white);
  border-radius: 24px;
  border: 1px solid var(--color3);
  padding: 1rem;
}

.shop-sidebar__close {
  display: none;
}

.shop-sidebar__header {
  margin-bottom: 0.75rem;
}

.shop-sidebar__header-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border-radius: 16px;
  font-size: 1.125rem;
  @media (width >=992px) {
    background: var(--color1);
    color: var(--white);
    min-height: 62px;
    justify-content: center;
  }
}

.shop-sidebar__widgets .widget.widget-side {
  border-bottom: 1px solid #ececec;
  padding: 0.85rem 0;
  margin: 0;
}

.shop-sidebar__widgets .widget.widget-side:last-child {
  border-bottom: 0;
}

.shop-sidebar__banner {
  display: block;
  margin-top: 1rem;
}

.shop-sidebar__banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 32px;
}

.shop-sidebar__widgets .widget.widget-side .widget-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  height: auto;
  min-height: 0;
  border-radius: 0;
  cursor: pointer;
  flex-wrap: wrap;
}

.shop-sidebar__widgets .widget.widget-side .widget-title .widget-title-text {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.5;
  flex: 0 0 auto;
}
.shop-sidebar__widgets .widget-side.has-selected .widget-title-text::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--color1);
  display: inline-block;
  margin-right: 10px;
}
.shop-sidebar__widgets .widget.widget-side .widget-title .filter-selected-text {
  color: var(--color2);
  font-size: 13px;
  line-height: 1.6;
  margin-top: 5px;
  width: 100%;
  order: 4;
}

.shop-sidebar__widgets .widget.widget-side .widget-title:after {
  content: "\e94b";
  font-family: "icomoon";
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
  transition: 0.3s;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-inline-start: auto;
  color: var(--text);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--color3);
}

.shop-sidebar__widgets .widget.widget-side.is-open .widget-title:after {
  content: "\e94a";
}
.is-open .filter-selected-text {
  display: none;
}
/* بسته از اول — بدون پرش JS */
.shop-sidebar__widgets .widget.widget-side > ul,
.shop-sidebar__widgets
  .widget.widget-side
  .woocommerce-widget-layered-nav-list {
  display: none;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.shop-sidebar__widgets .widget.widget-side.is-open > ul,
.shop-sidebar__widgets
  .widget.widget-side.is-open
  .woocommerce-widget-layered-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (width >= 992px) {
  .shop-archive__layout {
    grid-template-columns: minmax(260px, 305px) minmax(0, 1fr);
    gap: 20px;
  }

  .shop-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 0.75rem);
    /* max-height: calc(var(--v-h) - var(--header-h) - 1.5rem); */
    overflow: auto;
  }
}

@media (width < 992px) {
  .shop-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(86vw, 360px);
    max-height: none;
    background: var(--white);
    padding: 1rem;
    border-radius: 1.25rem 0 0 1.25rem;
    z-index: 100001;
    transform: translateX(105%);
    transition: transform 0.35s ease;
    overflow: auto;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  }

  .shop-sidebar__box {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
  }

  .shop-sidebar.active {
    transform: translateX(0);
  }

  .shop-sidebar__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    background: var(--color3);
    color: var(--text);
    cursor: pointer;
    font-size: 11px;
    z-index: 2;
  }

  body.shop-sidebar-open {
    overflow: hidden;
  }
}

/* --------------------
   Product grid
-------------------- */
.shop-archive .shop-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 0.75rem;
  margin: 0;
}

.shop-archive .shop-products-grid > [class*="col-"],
.shop-archive .product-item-arch {
  width: 100%;
  max-width: none;
  padding: 0 !important;
  margin: 0;
}

@media (width >= 768px) {
  .shop-archive .shop-products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 1rem;
  }

  .shop-archive--no-sidebar .shop-products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
