:root {
  --smh-bg: rgba(12, 15, 25, 0.72);
  --smh-card: rgba(20, 25, 40, 0.78);
  --smh-card-2: rgba(255,255,255,0.06);
  --smh-border: rgba(255,255,255,0.14);
  --smh-text: #f4f7ff;
  --smh-muted: rgba(244,247,255,0.72);
  --smh-accent: #7c5cff;
  --smh-accent-2: #43d1ff;
  --smh-green: #2dd4bf;
  --smh-shadow: 0 30px 80px rgba(0,0,0,0.4);
}

body.smh-shmwc-lock {
  overflow: hidden !important;
}

/* ========== مودال اصلی ========== */
.smh-shmwc-modal {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: none;
  direction: rtl;
  font-family: inherit;
}

.smh-shmwc-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 18, 0.58);
  backdrop-filter: blur(10px);
}

.smh-shmwc-dialog {
  position: relative;
  width: min(980px, calc(100vw - 24px));
  max-height: min(92vh, 980px);
  overflow: auto;
  margin: 4vh auto;
  padding: 22px;
  color: var(--smh-text);
  border: 1px solid var(--smh-border);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(124,92,255,0.34), transparent 32%),
    radial-gradient(circle at left bottom, rgba(67,209,255,0.18), transparent 28%),
    linear-gradient(180deg, rgba(14,18,30,0.94), rgba(12,15,24,0.92));
  box-shadow: var(--smh-shadow);
  transform: translateY(10px) scale(0.98);
  animation: smhEnter .38s ease-out forwards;
}

@keyframes smhEnter {
  to { transform: translateY(0) scale(1); }
}

.smh-shmwc-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--smh-text);
  background: rgba(255,255,255,0.08);
  font-size: 28px;
  line-height: 44px;
}

/* ========== Hero (در صورت فعال بودن) ========== */
.smh-shmwc-hero {
  text-align: center;
  padding: 18px 10px 8px;
}

.smh-shmwc-hero-badge {
  width: 66px;
  height: 66px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--smh-accent), var(--smh-accent-2));
  box-shadow: 0 0 0 0 rgba(124,92,255,0.5);
  animation: smhPulse 1.6s infinite;
  will-change: transform, box-shadow;
}

.smh-shmwc-hero-badge i {
  font-size: 28px;
  color: #fff;
}

@keyframes smhPulse {
  0% { box-shadow: 0 0 0 0 rgba(124,92,255,0.5); transform: scale(1); }
  70% { box-shadow: 0 0 0 18px rgba(124,92,255,0); transform: scale(1.04); }
  100% { box-shadow: 0 0 0 0 rgba(124,92,255,0); transform: scale(1); }
}

.smh-shmwc-hero h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.35;
  color: #fff !important;
}

.smh-shmwc-hero p {
  margin: 0;
  color: var(--smh-muted);
  font-size: 15px;
}

/* ========== بخش جستجو ========== */
.smh-shmwc-search-section {
  margin-top: 18px;
}

.smh-shmwc-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 15px;
}

.smh-shmwc-searchbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--smh-card);
  border: 1px solid var(--smh-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.smh-shmwc-searchbar.is-focus {
  border-color: rgba(67,209,255,0.6);
  box-shadow: 0 0 0 4px rgba(67,209,255,0.12);
}

.smh-shmwc-search-icon {
  font-size: 22px;
  opacity: 0.9;
  display: flex;
  align-items: center;
}

.smh-shmwc-search-icon i {
  font-size: 22px;
}

#smh-shmwc-search {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--smh-text);
  font-size: 16px;
}

#smh-shmwc-search::placeholder {
  color: rgba(244,247,255,0.55);
}

/* لودر سه‌نقطه‌ای */
.smh-shmwc-loader-dots {
  display: none;
  align-items: center;
  gap: 4px;
}

.smh-shmwc-loader-dots span {
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  animation: smhDotBounce 1.2s infinite ease-in-out both;
}

.smh-shmwc-loader-dots span:nth-child(1) { animation-delay: -0.32s; }
.smh-shmwc-loader-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes smhDotBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.smh-shmwc-searchbar.is-loading .smh-shmwc-loader-dots {
  display: flex;
}

.smh-shmwc-searchbar.is-loading .smh-shmwc-spinner {
  display: none;
}

.smh-shmwc-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.18);
  border-top-color: #fff;
  border-radius: 50%;
  animation: smhSpin 0.8s linear infinite;
}

@keyframes smhSpin {
  to { transform: rotate(360deg); }
}

/* ========== نتایج (محصولات / مقالات) ========== */
.smh-shmwc-results-wrap {
  margin-top: 22px;
}

.smh-shmwc-results-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.smh-shmwc-results-text {
  font-weight: 800;
  font-size: 18px;
}

.smh-shmwc-results-hint {
  color: var(--smh-muted);
  font-size: 13px;
}

.smh-shmwc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.smh-shmwc-card {
  overflow: hidden;
  text-decoration: none !important;
  color: inherit !important;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid var(--smh-border);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  min-height: 100%;
}

.smh-shmwc-card:hover {
  transform: translateY(-4px);
  border-color: rgba(67,209,255,0.45);
  box-shadow: 0 18px 38px rgba(0,0,0,0.24);
}

.smh-shmwc-card-image {
  aspect-ratio: 1/1;
  background: rgba(255,255,255,0.03);
  overflow: hidden;
}

.smh-shmwc-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.smh-shmwc-card-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 44px;
  color: rgba(255,255,255,0.34);
}

.smh-shmwc-card-content {
  padding: 14px 14px 16px;
}

.smh-shmwc-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.6;
  color: #fff !important;       /* ← سفید شدن عنوان محصول */
}

.smh-shmwc-card-topline {
  margin-bottom: 10px;
}

.smh-shmwc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(124,92,255,0.16);
  border: 1px solid rgba(124,92,255,0.24);
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
}

/* قیمت – در یک خط بماند و عناصرش مرتب شوند */
.smh-shmwc-price {
  margin-bottom: 10px;
  font-weight: 800;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.smh-shmwc-price del,
.smh-shmwc-price ins,
.smh-shmwc-price .woocommerce-Price-amount,
.smh-shmwc-price .index-discount-pro {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.smh-shmwc-price .index-discount-pro p {
  display: inline;
  margin: 0;
  font-size: inherit;
}

.smh-shmwc-price del {
  opacity: 0.55;
  margin-left: 8px;
  font-weight: 500;
}

.smh-shmwc-price ins {
  text-decoration: none;
}

/* دکمه "مشاهده" – شبیه em داخل CTA */
.smh-shmwc-card-action {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(45,212,191,0.13);
  color: #cffff6 !important;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.smh-shmwc-empty {
  padding: 18px;
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 18px;
  text-align: center;
  color: var(--smh-muted);
}

/* ========== CTA (اعتماد / کد تخفیف) ========== */
.smh-shmwc-cta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.smh-shmwc-cta {
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none !important;
  color: inherit !important;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--smh-border);
  background: var(--smh-card);
  transition: transform .22s ease, border-color .22s ease;
  min-height: 120px;
  position: relative;
  overflow: hidden;
}

.smh-shmwc-cta:hover {
  transform: translateY(-3px);
  border-color: rgba(45,212,191,0.4);
}

.smh-shmwc-cta::after {
  content: '';
  position: absolute;
  inset: auto -40px -40px auto;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 65%);
  pointer-events: none;
}

.smh-shmwc-cta-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124,92,255,0.9), rgba(67,209,255,0.9));
  animation: smhPulse 1.8s infinite;
  will-change: transform, box-shadow;
}

.smh-shmwc-cta-icon i {
  font-size: 24px;
  color: #fff;
}

.smh-shmwc-cta-body strong {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}

.smh-shmwc-cta-body span {
  display: block;
  color: var(--smh-muted);
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.6;
}

.smh-shmwc-cta-body em {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(45,212,191,0.13);
  color: #cffff6;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

/* ========== پاپ‌آپ تأیید بستن ========== */
.smh-shmwc-confirm {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  border-radius: 28px;
  z-index: 10;
}

.smh-shmwc-confirm-dialog {
  background: rgba(20, 25, 40, 0.9);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 22px;
  padding: 28px 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.smh-shmwc-confirm-message {
  margin: 0 0 24px;
  font-size: 16px;
  color: var(--smh-text);
  line-height: 1.7;
}

.smh-shmwc-confirm-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.smh-shmwc-confirm-buttons button {
  padding: 10px 24px;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 140px;
}

.smh-shmwc-confirm-never {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}

.smh-shmwc-confirm-never:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

.smh-shmwc-confirm-later {
  background: linear-gradient(135deg, var(--smh-accent), var(--smh-accent-2));
  color: #fff;
}

.smh-shmwc-confirm-later:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(124,92,255,0.4);
}

/* ========== واکنش‌گرایی ========== */
@media (max-width: 900px) {
  .smh-shmwc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smh-shmwc-cta-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .smh-shmwc-dialog {
    width: calc(100vw - 12px);
    margin: 6px auto;
    padding: 16px;
    border-radius: 22px;
  }

  .smh-shmwc-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  /* لیستی شدن کارت‌ها در موبایل */
  .smh-shmwc-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px;
    min-height: auto;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  }

  .smh-shmwc-card-image {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    aspect-ratio: unset;
    border-radius: 12px;
    overflow: hidden;
  }

  .smh-shmwc-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .smh-shmwc-card-content {
    flex: 1;
    padding: 0;
  }

  .smh-shmwc-card-topline {
    margin-bottom: 4px;
  }

  .smh-shmwc-badge {
    font-size: 10px;
    padding: 2px 6px;
  }

  .smh-shmwc-card h3 {
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.4;
  }

  .smh-shmwc-price {
    margin-bottom: 4px;
    font-size: 14px;
  }

  .smh-shmwc-card-action {
    font-size: 12px;
  }

  .smh-shmwc-results-title {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== صفحات اعتماد و تخفیف (شورت‌کدها) ===== */
.smh-trust-page,
.smh-coupon-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px;
  color: #1e1e2f;
  direction: rtl;
  font-family: inherit;
}

.smh-trust-hero,
.smh-coupon-hero {
  text-align: center;
  padding: 40px 20px 30px;
  background: linear-gradient(135deg, #f8f9ff, #eef0ff);
  border-radius: 32px;
  margin-bottom: 40px;
}

.smh-trust-hero .smh-trust-icon,
.smh-coupon-hero .smh-coupon-icon {
  display: inline-block;
  font-size: 56px;
  margin-bottom: 10px;
}

.smh-trust-hero h2,
.smh-coupon-hero h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 10px 0 12px;
  font-weight: 700;
}

.smh-trust-hero p,
.smh-coupon-hero p {
  font-size: 18px;
  color: #4a4a6a;
  max-width: 700px;
  margin: 0 auto;
}

.smh-trust-grid,
.smh-coupon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 30px 0;
}

.smh-trust-card,
.smh-coupon-card {
  background: #ffffff;
  border-radius: 28px;
  padding: 28px 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.smh-trust-card:hover,
.smh-coupon-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.08);
}

.smh-trust-card-icon,
.smh-coupon-card-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
}

.smh-trust-card h3,
.smh-coupon-card h3 {
  font-size: 22px;
  margin: 0 0 12px;
  font-weight: 700;
}

.smh-trust-card p,
.smh-coupon-card p {
  line-height: 1.8;
  color: #2d2d44;
  margin-bottom: 14px;
}

.smh-trust-card ul,
.smh-coupon-card ul {
  padding-right: 24px;
  margin: 12px 0;
}

.smh-trust-card ul li,
.smh-coupon-card ul li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.smh-trust-enamad {
  margin-top: 16px;
  text-align: center;
}

.smh-trust-enamad img {
  max-width: 120px;
  height: auto;
}

.smh-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.smh-trust-badge {
  display: inline-block;
  background: #f0f2ff;
  padding: 8px 18px;
  border-radius: 30px;
  text-decoration: none;
  color: #1e1e2f;
  font-weight: 600;
  border: 1px solid #dde0ff;
  transition: background 0.2s;
}

.smh-trust-badge:hover {
  background: #e2e6ff;
}

.smh-trust-footer,
.smh-coupon-footer {
  text-align: center;
  padding: 30px 20px;
  background: #f8faff;
  border-radius: 28px;
  margin-top: 30px;
}

.smh-trust-footer p,
.smh-coupon-footer p {
  font-size: 17px;
  color: #2d2d44;
  max-width: 700px;
  margin: 0 auto 20px;
}

.smh-coupon-sample {
  background: #f5f7ff;
  padding: 16px 20px;
  border-radius: 16px;
  margin: 14px 0;
  border-right: 4px solid #7c5cff;
}

.smh-coupon-sample code {
  background: #eef0ff;
  padding: 2px 10px;
  border-radius: 8px;
  font-weight: 600;
  color: #2d1b8a;
}

.smh-coupon-btn,
.smh-coupon-btn-large {
  display: inline-block;
  background: linear-gradient(135deg, #7c5cff, #5a3fd9);
  color: #fff !important;
  padding: 12px 28px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 700;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 20px rgba(124, 92, 255, 0.3);
}

.smh-coupon-btn:hover,
.smh-coupon-btn-large:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 28px rgba(124, 92, 255, 0.4);
  color: #fff !important;
}

.smh-coupon-btn-large {
  font-size: 20px;
  padding: 16px 40px;
}

@media (max-width: 640px) {
  .smh-trust-hero,
  .smh-coupon-hero {
    padding: 24px 16px;
  }
  .smh-trust-card,
  .smh-coupon-card {
    padding: 20px 16px;
  }
  .smh-coupon-btn-large {
    font-size: 16px;
    padding: 14px 24px;
  }
}