/* ========================================
   Store Archive (coupon-store) — RTL
======================================== */

.container--store-archive {
  margin-top: 6px;
}

/* Header */
.store-header {
  display: flex;
  direction: rtl;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
  margin-bottom: 6px;
}

.store-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent);
  padding: 6px;
}

.store-title {
  margin: 0;
  font-size: clamp(20px, 2.8vw, 30px);
  line-height: 1.3;
  font-weight: 700;
  text-align: right;
}

.store-intro {
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  direction: rtl;
  text-align: right;
}

.store-description.card-border {
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: 10px;
  padding: 12px;
  background: var(--bg);
  margin-bottom: 12px;
  direction: rtl;
  text-align: right;
}

.store-intro p,
.store-description p {
  margin-top: 0;
}

.store-intro p:last-child,
.store-description p:last-child {
  margin-bottom: 0;
}

.store-coupons-list {
  display: grid;
  gap: 14px;
}


/* ========================================
   Pagination
======================================== */

.store-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  gap: 7px;

  margin: 28px 0 32px;

  /* ترتیب اعداد برای فارسی درست می‌ماند */
  direction: rtl;
}

.store-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 40px;
  height: 40px;
  padding: 0 10px;

  box-sizing: border-box;

  border: 1px solid var(--line);
  border-radius: 50%;

  background: var(--bg);
  color: var(--ink);

  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;

  transition:
    color .16s ease,
    background-color .16s ease,
    border-color .16s ease,
    transform .12s ease;
}

.store-pagination a.page-numbers:hover {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 34%, transparent);
  background: color-mix(in srgb, var(--brand) 5%, transparent);
}

.store-pagination a.page-numbers:active {
  transform: scale(.95);
}

.store-pagination .page-numbers.current {
  color: var(--bg);
  border-color: var(--brand);
  background: var(--brand);
  font-weight: 700;
}

.store-pagination .page-numbers.dots {
  min-width: 24px;
  padding: 0 2px;

  border-color: transparent;
  background: transparent;

  color: var(--muted);
}

/* فلش‌های صفحه‌بندی؛ فقط آیکن، بدون متن */
.store-pagination .prev,
.store-pagination .next {
  width: 40px;
  min-width: 40px;
  padding: 0;

  border-radius: 50%;

  background: var(--bg);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--ink) 8%, transparent);
}

.store-page-icon {
  position: relative;
  display: block;

  width: 18px;
  height: 18px;
}

.store-page-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;

  width: 8px;
  height: 8px;

  border-top: 1.8px solid currentColor;
  border-right: 1.8px solid currentColor;
}

/* در صفحه فارسی، قبلی به راست و بعدی به چپ اشاره کند */
.store-page-icon--prev::before {
  transform: translate(-65%, -50%) rotate(45deg);
}

.store-page-icon--next::before {
  transform: translate(-35%, -50%) rotate(-135deg);
}

.store-pagination .prev:hover,
.store-pagination .next:hover {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 34%, transparent);
  background: var(--bg);
}

/* ========================================
   Mobile
======================================== */

@media (max-width: 480px) {

  .store-logo {
    width: 52px;
    height: 52px;
    padding: 5px;
  }

  .store-pagination {
    gap: 5px;
    margin: 24px 0 28px;
  }

  .store-pagination .page-numbers {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 12px;
  }

  .store-pagination .prev,
  .store-pagination .next {
    width: 36px;
    min-width: 36px;
  }

}


/* جلوگیری از نمایش ناخواسته متن کمکی داخل صفحه‌بندی */
.store-pagination .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ========================================
   Store coupon sorting
======================================== */

.store-sortbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;

  margin: 0 0 10px;
  padding: 0;

  direction: rtl;
}

.store-sortbar__label {
  margin-left: -6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.store-sortbar__item {
  position: relative;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 30px;
  padding: 0;

  border: 0;
  border-radius: 0;

  background: transparent;
  color: var(--muted);

  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;

  transition: color .16s ease;
}

.store-sortbar__item:hover {
  color: var(--brand);
}

.store-sortbar__item.is-active {
  color: var(--brand);
  background: transparent;
  font-weight: 500;
}

.store-sortbar__item.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;

  width: 100%;
  height: 2px;

  border-radius: 999px;
  background: var(--brand);
}

.store-results-shell {
  position: relative;
}

.store-results-shell.is-loading {
  pointer-events: none;
  opacity: .58;
}

.store-results-shell.is-loading::after {
  content: "";
  position: absolute;
  top: 48px;
  left: 50%;
  z-index: 8;

  width: 24px;
  height: 24px;

  margin-left: -12px;

  border: 2px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;

  animation: storeArchiveSpin .65s linear infinite;
}

@keyframes storeArchiveSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .store-sortbar {
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 9px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .store-sortbar::-webkit-scrollbar {
    display: none;
  }

  .store-sortbar__label {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .store-sortbar__item {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 0;
    font-size: 12px;
    white-space: nowrap;
  }
}


/* ========================================
   Sortbar hard override
   جلوگیری از کادرهای سراسری قالب روی لینک‌های مرتب‌سازی
======================================== */
.container--store-archive .store-sortbar a.store-sortbar__item,
.container--store-archive .store-sortbar a.store-sortbar__item:link,
.container--store-archive .store-sortbar a.store-sortbar__item:visited {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

.container--store-archive .store-sortbar a.store-sortbar__item:hover {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--brand) !important;
}

.container--store-archive .store-sortbar a.store-sortbar__item.is-active,
.container--store-archive .store-sortbar a.store-sortbar__item.is-active:link,
.container--store-archive .store-sortbar a.store-sortbar__item.is-active:visited {
  color: var(--brand) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  font-weight: 500 !important;
}

.container--store-archive .store-sortbar a.store-sortbar__item.is-active::after {
  display: block !important;
  background: var(--brand) !important;
}


/* ========================================
   متن سئوی پایین صفحه فروشگاه
   تیترها پررنگ می‌مانند، متن بدنه نرم‌تر و کم‌رنگ‌تر است.
======================================== */

.store-seo-content {
  color: var(--ink-alt);
}

.store-seo-content p,
.store-seo-content li,
.store-seo-content dd,
.store-seo-content dt {
  color: var(--ink-alt);
}

.store-seo-content h2,
.store-seo-content h3,
.store-seo-content h4,
.store-seo-content h5,
.store-seo-content h6 {
  color: var(--ink);
}

.store-seo-content strong,
.store-seo-content b {
  color: var(--ink);
}

.store-seo-content a {
  color: var(--brand);
}

.store-seo-content li::marker {
  color: var(--muted);
}


/* ========================================
   متن سئوی پایین صفحه فروشگاه — Override قطعی
======================================== */

body .store-seo-content,
body .store-seo-content p,
body .store-seo-content li,
body .store-seo-content div,
body .store-seo-content span,
body .store-seo-content dd,
body .store-seo-content dt {
  color: var(--ink-alt) !important;
}

body .store-seo-content h1,
body .store-seo-content h2,
body .store-seo-content h3,
body .store-seo-content h4,
body .store-seo-content h5,
body .store-seo-content h6 {
  color: var(--ink) !important;
}

body .store-seo-content strong,
body .store-seo-content b {
  color: inherit !important;
  font-weight: 700;
}

body .store-seo-content a {
  color: var(--brand) !important;
}

body .store-seo-content li::marker {
  color: var(--muted) !important;
}


/* Archive-like sorting toolbar on store pages */
.store-sortbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;margin:18px 0 14px;border:1px solid var(--line);border-radius:14px;background:var(--white)}
.store-sortbar__label{display:inline-flex;align-items:center;gap:6px;color:var(--ink-alt);font-size:13px;font-weight:700}.store-sortbar__label svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.store-sortbar__chips{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.store-sortbar__item{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 14px;border-radius:999px;background:var(--surface-muted);color:var(--ink-alt);text-decoration:none;font-size:12px;font-weight:700}.store-sortbar__item:hover{background:var(--surface-soft);color:var(--brand)}.store-sortbar__item.is-active{background:color-mix(in srgb,var(--brand) 6%,var(--white));color:var(--brand);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand) 18%,var(--line))}
@media(max-width:640px){.store-sortbar{padding:10px 12px;gap:9px;overflow:hidden}.store-sortbar__label{width:100%}.store-sortbar__chips{display:flex;flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:2px;scrollbar-width:none}.store-sortbar__chips::-webkit-scrollbar{display:none}.store-sortbar__item{flex:0 0 auto;min-height:34px;padding-inline:12px;font-size:11.5px}}


/* Store filters — same button style as homepage */
.container--store-archive .store-sortbar{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  margin:16px 0 14px;padding:0;border:0;background:transparent;
}
.container--store-archive .store-sortbar__label{display:none}
.container--store-archive .store-sortbar__chips{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.container--store-archive .store-sortbar a.store-sortbar__item,
.container--store-archive .store-sortbar a.store-sortbar__item:link,
.container--store-archive .store-sortbar a.store-sortbar__item:visited{
  position:relative;display:inline-flex;align-items:center;justify-content:center;
  min-height:38px;padding:0 15px !important;border:1px solid var(--line) !important;
  border-radius:999px !important;background:var(--white) !important;color:var(--ink-alt) !important;
  box-shadow:none !important;text-decoration:none;font-size:12.5px;font-weight:700 !important;white-space:nowrap;
}
.container--store-archive .store-sortbar a.store-sortbar__item:hover,
.container--store-archive .store-sortbar a.store-sortbar__item.is-active,
.container--store-archive .store-sortbar a.store-sortbar__item.is-active:link,
.container--store-archive .store-sortbar a.store-sortbar__item.is-active:visited{
  color:var(--brand) !important;border-color:color-mix(in srgb,var(--brand) 25%,var(--line)) !important;
  background:color-mix(in srgb,var(--brand) 5%,var(--white)) !important;
}
.container--store-archive .store-sortbar a.store-sortbar__item.is-active::after{display:none !important}
@media(max-width:640px){
  .container--store-archive .store-sortbar{overflow:visible;margin-top:12px}
  .container--store-archive .store-sortbar__chips{flex-wrap:nowrap;overflow-x:auto;width:100%;padding-bottom:2px;scrollbar-width:none}
  .container--store-archive .store-sortbar__chips::-webkit-scrollbar{display:none}
  .container--store-archive .store-sortbar a.store-sortbar__item{flex:0 0 auto;min-height:36px;padding-inline:13px !important;font-size:12px}
}


/* Store pagination: rounded square instead of circular buttons. */
body.tax-coupon-store .navigation.pagination .page-numbers,
.store-pagination .page-numbers,
.store-pagination .prev,
.store-pagination .next{
  border-radius:10px;
}
