/**
 * Product carousel bands for the front page and product category archives.
 *
 * Loaded after bizsiz-hero.css. The Product Cards Carousel plugin supplies the
 * slider mechanics; this file only lends it the BizSiz palette and rhythm.
 */

.bs-shop,
.bs-archive-shop {
  --bs-cream: #fbf6ec;
  --bs-cream-deep: #f4ebdc;
  --bs-ink: #332c26;
  --bs-ink-soft: #6c6055;
  --bs-terra: #c47158;
  --bs-terra-deep: #9d4f39;
  --bs-sage-soft: #e5ead9;
  --bs-butter: #f0cd8d;
  --bs-font: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  --bs-font-latin: "Manrope", "Segoe UI", sans-serif;
  --bs-ease: cubic-bezier(.22, 1, .36, 1);

  font-family: var(--bs-font);
  direction: rtl;
  text-align: right;
  color: var(--bs-ink);
}

.bs-shop *,
.bs-shop *::before,
.bs-shop *::after,
.bs-archive-shop *,
.bs-archive-shop *::before,
.bs-archive-shop *::after {
  box-sizing: border-box;
}

/* ---------------------------------------------------------------- *
 * Front page band
 * ---------------------------------------------------------------- */

.bs-shop {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: clamp(64px, 8.4vw, 108px) clamp(20px, 4.5vw, 54px);
  background:
    radial-gradient(820px 500px at 6% 0%, #f2e2cd 0%, rgba(242, 226, 205, 0) 60%),
    radial-gradient(720px 480px at 100% 108%, #e9efdd 0%, rgba(233, 239, 221, 0) 64%),
    var(--bs-cream);
  scroll-margin-top: 96px;
}

.admin-bar .bs-shop {
  scroll-margin-top: 128px;
}

.bs-shop::before {
  content: "";
  position: absolute;
  inset-inline-start: -8%;
  bottom: -14%;
  z-index: 0;
  width: clamp(260px, 34vw, 460px);
  aspect-ratio: 320 / 340;
  background: url("../img/loop-yarn-terracotta.svg") center / contain no-repeat;
  opacity: .1;
  rotate: -8deg;
  pointer-events: none;
}

.bs-shop::after {
  content: "";
  position: absolute;
  inset-inline-end: -100px;
  top: -120px;
  width: 300px;
  height: 300px;
  border: 1px dashed rgba(112, 92, 73, .22);
  border-radius: 50%;
  pointer-events: none;
}

.bs-shop__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
}

.wp-block-group.bs-shop__inner,
.wp-block-group.bs-shop__head,
.wp-block-group.bs-shop__intro {
  margin-block-start: 0;
  margin-block-end: 0;
}

.bs-shop__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px 44px;
  margin: 0 0 clamp(26px, 3.4vw, 40px);
}

.bs-shop__intro {
  max-width: 680px;
}

.bs-shop .bs-kicker,
.bs-archive-shop .bs-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--bs-terra-deep);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.8;
  letter-spacing: .01em;
}

.bs-shop .bs-kicker::before,
.bs-archive-shop .bs-kicker::before {
  content: "";
  flex: none;
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

.bs-shop__title {
  margin: 0;
  color: var(--bs-ink);
  font-family: var(--bs-font);
  font-size: clamp(2.05rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.bs-shop__title strong {
  position: relative;
  color: var(--bs-terra-deep);
  font-weight: inherit;
}

.bs-shop__title strong::after {
  content: "";
  position: absolute;
  inset-inline: -2px;
  bottom: 2px;
  height: 9px;
  z-index: -1;
  border-radius: 999px;
  background: rgba(196, 113, 88, .16);
}

.bs-shop__lede {
  max-width: 37rem;
  margin: 15px 0 0;
  color: var(--bs-ink-soft);
  font-size: 15px;
  line-height: 2.05;
  text-wrap: pretty;
}

.bs-shop__count {
  flex: none;
  margin: 0 0 6px;
  padding: 10px 18px;
  border: 1px dashed rgba(112, 92, 73, .34);
  border-radius: 999px;
  background: rgba(255, 251, 243, .7);
  color: var(--bs-ink-soft);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.8;
  white-space: nowrap;
}

.bs-shop__note {
  margin: 24px 0 0;
  color: var(--bs-ink-soft);
  font-size: 12.5px;
  line-height: 1.9;
  text-align: center;
}

.bs-shop__note a {
  color: var(--bs-terra-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.bs-shop__note a:hover {
  color: var(--bs-ink);
}

/* ---------------------------------------------------------------- *
 * Category archive panel
 * ---------------------------------------------------------------- */

.wp-block-group.bs-archive-shop {
  position: relative;
  margin-block: clamp(38px, 4.5vw, 56px) 0;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid rgba(112, 92, 73, .15);
  border-radius: 30px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(229, 234, 217, .52) 0%, rgba(229, 234, 217, 0) 72%),
    #f8f0e3;
  box-shadow: 0 18px 50px rgba(70, 54, 40, .06);
  overflow: hidden;
}

.bs-archive-shop__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 30px;
  margin: 0 0 20px;
}

.bs-archive-shop__intro {
  max-width: 660px;
}

.bs-archive-shop__title {
  margin: 0;
  color: var(--bs-ink);
  font-size: clamp(1.5rem, 2.4vw, 2.05rem);
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.bs-archive-shop__lede {
  margin: 8px 0 0;
  color: var(--bs-ink-soft);
  font-size: 13.5px;
  line-height: 1.95;
}

.bs-archive-shop__count {
  flex: none;
  margin: 0 0 4px;
  padding: 8px 14px;
  border: 1px dashed rgba(112, 92, 73, .3);
  border-radius: 999px;
  background: rgba(255, 251, 243, .66);
  color: var(--bs-ink-soft);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.8;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- *
 * Carousel surface
 * ---------------------------------------------------------------- */

.bs-shop .pcc,
.bs-archive-shop .pcc {
  --pcc-border: rgba(112, 92, 73, .16);
  --pcc-surface: #fffdf8;
  --pcc-muted: #75675a;
  --pcc-accent: #435c4c;
  --pcc-sale: #b4593f;
  --pcc-shadow: 0 1px 2px rgba(70, 54, 40, .05), 0 16px 36px rgba(70, 54, 40, .09);

  font-family: var(--bs-font);
}

.bs-shop .pcc__viewport,
.bs-archive-shop .pcc__viewport {
  padding: 6px;
  margin: -6px;
}

/* Without a definite width the track sizes itself from the images and the
   card percentages stop resolving to the requested number per view. */
.bs-shop .pcc__track,
.bs-archive-shop .pcc__track {
  width: 100%;
  min-width: 0;
}

/* WooCommerce's archive stylesheet forces `height: auto` on every image,
   which letterboxes the portrait art inside the card. */
.bs-shop .pcc__image,
.bs-archive-shop .pcc__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .3s ease, transform 1s var(--bs-ease);
}

/* The plugin fades the primary image out on hover expecting a gallery
   image behind it. These products have no gallery, so that emptied the
   card; use the collection cards' slow zoom instead. */
@media (hover: hover) {
  .bs-shop .pcc__card:hover .pcc__image--primary,
  .bs-archive-shop .pcc__card:hover .pcc__image--primary {
    opacity: 1;
    transform: scale(1.045);
  }

  .bs-shop .pcc__card:hover .pcc__image--alt,
  .bs-archive-shop .pcc__card:hover .pcc__image--alt {
    opacity: 0;
  }
}

.bs-shop .pcc__card,
.bs-archive-shop .pcc__card {
  background: var(--pcc-surface);
}

.bs-shop .pcc__media,
.bs-archive-shop .pcc__media {
  background: #efe6d8;
}

.bs-shop .pcc__body,
.bs-archive-shop .pcc__body {
  gap: 7px;
  padding: 14px 15px 15px;
}

.bs-archive-shop .pcc__body {
  padding: 12px 13px 13px;
}

.bs-shop .pcc__title,
.bs-archive-shop .pcc__title {
  margin: 0;
  font-family: var(--bs-font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.75;
  letter-spacing: -.01em;
}

.bs-archive-shop .pcc__title {
  font-size: 14px;
}

.bs-shop .pcc__link,
.bs-archive-shop .pcc__link {
  color: var(--bs-ink);
}

.bs-shop .pcc__link:hover,
.bs-archive-shop .pcc__link:hover {
  color: var(--bs-terra-deep);
}

.bs-shop .pcc__rating,
.bs-archive-shop .pcc__rating {
  font-family: var(--bs-font);
}

.bs-shop .pcc__rating-meta--empty,
.bs-archive-shop .pcc__rating-meta--empty {
  display: none;
}

.bs-shop .pcc__excerpt,
.bs-archive-shop .pcc__excerpt {
  color: var(--bs-ink-soft);
  font-size: 12.5px;
  line-height: 1.85;
}

.bs-archive-shop .pcc__excerpt {
  display: none;
}

.bs-shop .pcc__price,
.bs-archive-shop .pcc__price {
  gap: 7px;
  margin-block-start: 0;
  font-family: var(--bs-font);
  font-size: 14px;
  color: var(--bs-ink);
}

/* Keep prices on one line across cards; let the button settle at the
   bottom of shorter cards instead. */
.bs-shop .pcc__cart,
.bs-archive-shop .pcc__cart {
  margin-block-start: auto;
}

.bs-shop .pcc__amount,
.bs-archive-shop .pcc__amount {
  font-weight: 800;
}

.bs-shop .pcc__price ins,
.bs-archive-shop .pcc__price ins {
  color: var(--pcc-sale);
}

.bs-shop .pcc__button,
.bs-archive-shop .pcc__button {
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bs-terra-deep);
  font-family: var(--bs-font);
  font-size: 12.5px;
  font-weight: 600;
}

.bs-shop .pcc__button:hover,
.bs-archive-shop .pcc__button:hover {
  background: #87402f;
  opacity: 1;
}

.bs-shop .pcc__button--disabled,
.bs-archive-shop .pcc__button--disabled {
  background: #9ca3af;
}

.bs-shop .pcc__arrow,
.bs-archive-shop .pcc__arrow {
  color: var(--bs-terra-deep);
  background: rgba(255, 252, 246, .95);
  border-color: rgba(112, 92, 73, .2);
}

/* The plugin mirrors both chevrons for RTL, leaving "next" pointing the
   wrong way on the left edge. */
[dir="rtl"] .bs-shop .pcc__arrow--next .pcc__arrow-icon,
[dir="rtl"] .bs-archive-shop .pcc__arrow--next .pcc__arrow-icon {
  transform: none;
}

.bs-shop .pcc__dots,
.bs-archive-shop .pcc__dots {
  margin-block-start: 16px;
}

.bs-shop .pcc__dot,
.bs-archive-shop .pcc__dot {
  background: rgba(112, 92, 73, .24);
}

.bs-shop .pcc__dot.is-active,
.bs-archive-shop .pcc__dot.is-active {
  background: var(--bs-terra-deep);
}

.bs-shop .pcc__badge,
.bs-archive-shop .pcc__badge {
  padding: 4px 9px;
  font-family: var(--bs-font);
  font-size: 11px;
  font-weight: 600;
}

.bs-shop .pcc__badge--featured,
.bs-archive-shop .pcc__badge--featured {
  background: #435c4c;
}

.bs-shop .pcc__badge--sale,
.bs-archive-shop .pcc__badge--sale {
  background: var(--bs-terra-deep);
}

/* ---------------------------------------------------------------- *
 * Responsive
 * ---------------------------------------------------------------- */

@media (max-width: 782px) {
  .bs-shop {
    padding-block: 58px 66px;
    scroll-margin-top: 84px;
  }

  .admin-bar .bs-shop {
    scroll-margin-top: 118px;
  }

  .bs-shop__head,
  .bs-archive-shop__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .bs-shop__count,
  .bs-archive-shop__count {
    margin-block: 0;
  }

  .bs-shop__title {
    font-size: clamp(1.95rem, 8vw, 2.7rem);
  }

  .bs-shop__lede {
    font-size: 14px;
    line-height: 1.95;
  }

  .bs-shop .pcc,
  .bs-archive-shop .pcc {
    --pcc-gap: 12px;
  }

  .bs-shop .pcc__title {
    font-size: 15px;
  }

  .bs-shop .pcc__button,
  .bs-archive-shop .pcc__button {
    font-size: 12.5px;
  }

  .wp-block-group.bs-archive-shop {
    padding: 18px 14px 20px;
    border-radius: 24px;
    margin-block-end: 34px;
  }

  .bs-shop__note {
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  /* One card per view means twelve dots; the peeking next card already
     signals that the row continues. The plugin also hides the arrows on
     phones, but its drag start ignores links, so keep them visible here. */
  .bs-shop .pcc__dots,
  .bs-archive-shop .pcc__dots {
    display: none;
  }

  .bs-shop .pcc__arrows,
  .bs-archive-shop .pcc__arrows {
    display: flex;
    inset-inline: 8px;
  }

  .bs-shop .pcc__arrow,
  .bs-archive-shop .pcc__arrow {
    width: 34px;
    height: 34px;
  }

  .bs-shop .pcc__arrow-icon,
  .bs-archive-shop .pcc__arrow-icon {
    width: 17px;
    height: 17px;
  }

  .admin-bar .bs-shop {
    scroll-margin-top: 84px;
  }
}

@media (max-width: 480px) {
  .bs-shop__title {
    font-size: 1.85rem;
  }

  .bs-shop .pcc__body {
    padding: 12px;
  }

  .bs-shop .pcc__excerpt {
    font-size: 12px;
  }

  .bs-shop .pcc__button {
    padding: 9px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bs-shop .pcc__card,
  .bs-archive-shop .pcc__card {
    transition: none !important;
  }

  .bs-shop .pcc__card:hover,
  .bs-archive-shop .pcc__card:hover {
    transform: none !important;
  }

  .bs-shop .pcc__card:hover .pcc__image,
  .bs-archive-shop .pcc__card:hover .pcc__image {
    transform: none !important;
  }
}
