/**
 * RJ — مودال تأیید افزودن به سبد خرید.
 */

.rj-cart-notice[hidden] {
  display: none !important;
}

.rj-cart-notice {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.rj-cart-notice__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.rj-cart-notice__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.rj-cart-notice__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e8edf2;
}

.rj-cart-notice__head-main {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.rj-cart-notice__check {
  display: inline-flex;
  flex-shrink: 0;
  color: #1d4ed8;
}

.rj-cart-notice__title {
  margin: 0;
  color: #0f172a;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.5;
}

.rj-cart-notice__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
}

.rj-cart-notice__close:hover {
  background: #e2e8f0;
}

.rj-cart-notice__body {
  padding: 1rem 1.25rem 0.5rem;
}

.rj-cart-notice__product {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.rj-cart-notice__product-media {
  flex-shrink: 0;
  overflow: hidden;
  width: 72px;
  height: 72px;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #f8fafc;
}

.rj-cart-notice__product-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rj-cart-notice__product-info {
  min-width: 0;
  flex: 1;
}

.rj-cart-notice__product-title {
  margin: 0 0 0.5rem;
  color: #0f172a;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.6;
}

.rj-cart-notice__product-price {
  color: #0f172a;
  font-size: 0.875rem;
  line-height: 1.5;
}

.rj-cart-notice__product-price .woocommerce-Price-amount {
  font-weight: 700;
}

.rj-cart-notice__foot {
  padding: 1rem 1.25rem 1.25rem;
}

.rj-cart-notice__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  background: #1e3a5f;
  color: #fff !important;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}

.rj-cart-notice__cta:hover {
  background: #16304f;
  color: #fff !important;
}

body.rj-cart-notice-open {
  overflow: hidden;
}

/* ── سایدبار: فقط کالاهای موجود ── */
.rj-shop-sidebar__filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 0;
  border-top: 1px solid var(--color-glass-stroke, #e8e2d9);
}

.rj-shop-sidebar__filter-label {
  margin: 0;
  color: var(--color-text-heading, #1a1a1a);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
}

.rj-shop-sidebar__toggle {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.rj-shop-sidebar__toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.rj-shop-sidebar__toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s ease;
}

.rj-shop-sidebar__toggle-thumb {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease;
}

.rj-shop-sidebar__toggle input:checked + .rj-shop-sidebar__toggle-track {
  background: #334155;
}

.rj-shop-sidebar__toggle input:checked + .rj-shop-sidebar__toggle-track .rj-shop-sidebar__toggle-thumb {
  transform: translateX(-20px);
}

.rj-shop-sidebar__toggle input:focus-visible + .rj-shop-sidebar__toggle-track {
  outline: 2px solid #1e3a5f;
  outline-offset: 2px;
}

.rj-shop__grid.is-filtering-instock .rj-product-card[data-rj-product-has-stock="0"] {
  display: none !important;
}

.rj-shop__empty-filter {
  display: none;
  grid-column: 1 / -1;
  margin: 0;
  padding: 2rem 1rem;
  border: 1px dashed var(--color-glass-stroke, #e8e2d9);
  border-radius: var(--radius-lg, 12px);
  color: var(--color-text-secondary, #64748b);
  font-size: 0.9375rem;
  line-height: 1.7;
  text-align: center;
}

.rj-shop__grid.is-filtering-instock.is-filter-empty .rj-shop__empty-filter {
  display: block;
}
