/**
 * Free product page (/showpage) — UI/UX v2
 */
.vf-page {
  --vf-ink: #1f2937;
  --vf-muted: #6b7280;
  --vf-line: #e5e7eb;
  --vf-bg: #f3f4f6;
  --vf-card: #fff;
  --vf-orange: #ff7f00;
  --vf-red: #ef0f00;
  --vf-green: #2e7d32;
  --vf-radius: 20px;
  --vf-shadow: 0 14px 40px rgba(31, 41, 55, 0.08);
  color: var(--vf-ink);
  background: var(--vf-bg);
  padding: 8px 0 56px;
}

.vf-page a { text-decoration: none; }

.vf-page .container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.vf-hero { padding: 20px 0 12px; }

.vf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.85fr);
  gap: 24px;
  align-items: start;
}

/* —— Cover —— */
.vf-media {
  background: var(--vf-card);
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-radius);
  overflow: hidden;
  box-shadow: var(--vf-shadow);
}

.vf-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  max-height: 620px;
  padding: 28px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(255, 127, 0, 0.06), transparent 70%),
    linear-gradient(165deg, #fafafa 0%, #eef1f5 100%);
}

.vf-cover img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 560px;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(31, 41, 55, 0.18);
}

.vf-cover--video {
  min-height: 360px;
  max-height: none;
  padding: 0;
  background: #0f1115;
  aspect-ratio: 16 / 9;
}

.vf-cover--video #video { width: 100%; height: 100%; }

.vf-media__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #fff8f1;
  border-top: 1px solid rgba(255, 127, 0, 0.14);
}

.vf-media__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.vf-media__actions a {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  background: #fff;
  color: var(--vf-ink) !important;
  border: 1px solid var(--vf-line);
  transition: border-color .15s, color .15s;
}

.vf-media__actions a:hover {
  border-color: var(--vf-orange);
  color: var(--vf-orange) !important;
}

/* —— Info card —— */
.vf-info {
  background: var(--vf-card);
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-radius);
  padding: 24px;
  box-shadow: var(--vf-shadow);
  position: sticky;
  top: 14px;
}

.vf-page [class^="ri-"],
.vf-page [class*=" ri-"] {
  font-family: remixicon !important;
  font-style: normal;
  font-weight: normal !important;
  font-variant: normal;
  line-height: 1;
  display: inline-block;
  vertical-align: -0.15em;
  speak: never;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.vf-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(90deg, var(--vf-red), var(--vf-orange));
  box-shadow: 0 8px 18px rgba(239, 15, 0, 0.2);
}

.vf-badge i { font-size: 1.35rem !important; }

.vf-info h1,
.vf-page .vf-info h1 {
  margin: 0 0 12px !important;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem) !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
  color: var(--vf-ink) !important;
}

.vf-lead {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f9fafb;
  border-right: 3px solid var(--vf-orange);
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--vf-muted);
}

.vf-meta {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.vf-meta li {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  background: #f9fafb;
  border-radius: 14px;
  border: 1px solid var(--vf-line);
  min-width: 0;
}

.vf-meta__label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--vf-muted);
}

.vf-meta__label i { color: var(--vf-orange); font-size: 1.15rem !important; }

.vf-meta__value {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--vf-ink);
  line-height: 1.35;
}

.vf-meta__value a {
  color: var(--vf-orange) !important;
  font-weight: 800;
}

.vf-meta__value a + a::before {
  content: "، ";
  color: var(--vf-muted);
  font-weight: 400;
}

.vf-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.vf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 18px;
  border-radius: 14px;
  font-size: 1.02rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}

.vf-btn i { font-size: 1.4rem !important; }

.vf-btn:hover { transform: translateY(-2px); }

.vf-btn--primary {
  background: linear-gradient(90deg, var(--vf-red), var(--vf-orange));
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(239, 15, 0, 0.28);
}

.vf-btn--soft {
  background: #e8f5e9;
  color: var(--vf-green) !important;
  border: 1px solid #c8e6c9;
  font-size: 0.92rem;
}

.vf-btn--review {
  background: #fff7ed;
  color: #c2410c !important;
  border: 1px solid #fed7aa;
  text-decoration: none !important;
  margin-top: 4px;
}

.vf-btn--review:hover {
  background: #ffedd5;
  color: #9a3412 !important;
}

.vf-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
}

.vf-page .vf-price-row.salebox:not(.hidedownload) {
  display: flex !important;
}

.vf-price-row strong {
  font-size: 1.1rem;
  color: #fff;
}

.vf-price-row small {
  margin-right: 4px;
  font-size: 0.78rem;
  color: rgba(255,255,255,.65);
}

.vf-btn--cart,
.vf-price-row .addtocart,
.vf-price-row a.product_item {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 auto;
  padding: 1px 13px !important;
  border-radius: 10px !important;
  background: linear-gradient(90deg, var(--vf-red), var(--vf-orange)) !important;
  color: #fff !important;
  font-size: 0.9rem !important;
  font-weight: 800 !important;
  white-space: nowrap;
  cursor: pointer !important;
  pointer-events: auto !important;
  text-align: center;
  border: none;
  box-shadow: 0 8px 18px rgba(239, 15, 0, 0.25);
}

.vf-price-row .addtocart.disabled {
  opacity: 0.55;
  pointer-events: none !important;
  cursor: not-allowed !important;
}

.vf-tags {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--vf-line);
}

.vf-tags__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--vf-muted);
}

.vf-tags__label i { color: var(--vf-orange); font-size: 1.15rem !important; }

.vf-related__label i { font-size: 1.1rem !important; }

.vf-price-row .addtocart i,
.vf-btn--cart i { font-size: 1.35rem !important; }

.vf-tags a,
.vf-page .moreitem a {
  display: inline-flex;
  margin: 0 0 8px 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid var(--vf-line);
  color: var(--vf-ink) !important;
  font-size: 0.78rem;
  font-weight: 600;
}

.vf-custom {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid var(--vf-line);
}

.vf-custom__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--vf-ink);
}

.vf-custom__title i { color: var(--vf-orange); font-size: 1.45rem !important; }

.vf-custom__hint {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--vf-muted);
  line-height: 1.6;
}

.vf-service {
  display: block;
  margin: 0 0 10px;
  cursor: pointer;
}

.vf-service:last-child { margin-bottom: 0; }

.vf-page .vf-custom .costomiztion {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 14px 14px 14px 12px;
  border-radius: 14px;
  border: 2px solid var(--vf-line);
  background: #fff;
  font-weight: 600;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.vf-service__icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 127, 0, 0.12);
  color: var(--vf-orange);
}

.vf-service__icon i {
  font-size: 1.55rem !important;
}

.vf-service:has(input:checked) .vf-service__icon {
  background: linear-gradient(135deg, var(--vf-red), var(--vf-orange));
  color: #fff;
}

.vf-page .vf-custom .costomiztion:hover {
  border-color: #ffcc80;
}

.vf-page .vf-custom .costomiztion input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.vf-service__check {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  flex: 0 0 26px;
  width: 26px !important;
  height: 26px !important;
  margin-top: 2px;
  border-radius: 8px;
  background: #fff !important;
  border: 2px solid #cfd4dc;
  box-sizing: border-box;
  /* display: inline-flex !important; */
  align-items: center;
  justify-content: center;
  margin-top: 11px;
}

.vf-page .vf-custom .costomiztion input[type="checkbox"]:checked + .vf-service__check {
  background: linear-gradient(135deg, var(--vf-red), var(--vf-orange)) !important;
  border-color: transparent;
}

.vf-service__check i {
  display: none;
  font-size: 1rem !important;
  color: #fff;
  line-height: 1;
  margin-top: 6px;
}

.vf-page .vf-custom .costomiztion input[type="checkbox"]:checked + .vf-service__check i {
  display: block;
}

.vf-service:has(input:checked) .costomiztion,
.vf-page .vf-custom .costomiztion:has(input:checked) {
  border-color: var(--vf-orange);
  background: #fff8f0;
  box-shadow: 0 0 0 3px rgba(255, 127, 0, 0.12);
}

.vf-service__body { flex: 1; min-width: 0; }

.vf-service__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vf-service__name {
  font-size: 11px;
  font-weight: 800;
  color: var(--vf-ink);
  font-style: normal;
}

.vf-service__price {
  flex-shrink: 0;
  font-style: normal;
  font-size: 15px;
  font-weight: 800;
  color: var(--vf-orange);
}

.vf-service__price small {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--vf-muted);
}

.vf-service__desc {
  margin-top: 6px;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--vf-muted);
  font-weight: 500;
}

/* kill old absolute tooltip styles inside free-page services */
.vf-page .vf-custom .totalsell,
.vf-page .vf-custom .costomiztion:hover strong {
  position: static;
  opacity: 1;
  top: auto;
  background: transparent;
  color: inherit;
  padding: 0;
}

.vf-share { margin-top: 14px; }

/* —— Prose —— */
.vf-body { padding: 20px 0 8px; }

.vf-prose-wrap {
  background: var(--vf-card);
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-radius);
  padding: 32px 36px;
  box-shadow: var(--vf-shadow);
}

.vf-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #ffe0b2;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--vf-ink);
}

.vf-section-title i { color: var(--vf-orange); font-size: 1.45rem !important; }

.vf-prose,
.vf-page #content.vf-prose {
  margin: 0;
  font-size: 1.05rem;
  line-height: 2.05;
  color: #374151;
  text-align: justify;
}

.vf-page #content.vf-prose h2,
.vf-page #content.vf-prose h3,
.vf-prose h2,
.vf-prose h3 {
  margin: 1.5em 0 0.6em;
  font-weight: 800;
  line-height: 1.45;
  color: var(--vf-ink);
  text-align: right;
}

.vf-page #content.vf-prose h2 { font-size: 1.3rem; }
.vf-page #content.vf-prose h3 { font-size: 1.12rem; }

.vf-page #content.vf-prose p { margin: 0 0 1.05em; }

.vf-page #content.vf-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 14px 0;
  box-shadow: 0 8px 24px rgba(31,41,55,.08);
}

.vf-page #content.vf-prose ul,
.vf-page #content.vf-prose ol {
  padding-right: 1.3em;
  margin: 0 0 1.1em;
}

.vf-page #content.vf-prose li { margin-bottom: 0.45em; }

/* Code / <pre> blocks in free content */
.vf-page #content.vf-prose pre,
.vf-prose pre {
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
  display: block;
  margin: 1.25em 0;
  padding: 16px 18px;
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
  background: #1e2430;
  color: #e8ecf1;
  border: 1px solid #2c3545;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-family: Consolas, "Cascadia Code", "Segoe UI Mono", Menlo, Monaco, monospace;
  font-size: 0.88rem;
  line-height: 1.65;
  white-space: pre;
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}

.vf-page #content.vf-prose pre::-webkit-scrollbar,
.vf-prose pre::-webkit-scrollbar {
  height: 8px;
}

.vf-page #content.vf-prose pre::-webkit-scrollbar-thumb,
.vf-prose pre::-webkit-scrollbar-thumb {
  background: #3d4a5c;
  border-radius: 8px;
}

.vf-page #content.vf-prose code,
.vf-prose code {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: Consolas, "Cascadia Code", "Segoe UI Mono", Menlo, Monaco, monospace;
  font-size: 0.9em;
  padding: 0.15em 0.45em;
  border-radius: 6px;
  background: #eef1f6;
  color: #c62828;
  border: 1px solid #e0e5ee;
  word-break: break-word;
}

.vf-page #content.vf-prose pre code,
.vf-prose pre code {
  display: block;
  padding: 0;
  background: transparent;
  color: inherit;
  border: 0;
  border-radius: 0;
  font-size: inherit;
  word-break: normal;
  white-space: inherit;
}

.vf-page #content.vf-prose pre svg,
.vf-prose pre svg {
  /* keep SVG source as text in pre — don't let nested tags expand layout */
  max-width: 100%;
}

/* —— Related —— */
.vf-related {
  padding: 28px 0 10px;
}

.vf-related__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.vf-related__head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--vf-ink);
}

.vf-related__head h2 i { color: var(--vf-orange); font-size: 1.5rem !important; }

.vf-related__head p {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--vf-muted);
}

.vf-related__block {
  margin-bottom: 28px;
  padding: 18px 18px 8px;
  background: var(--vf-card);
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-radius);
  box-shadow: var(--vf-shadow);
}

.vf-related__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.vf-related__label--free {
  background: #e8f5e9;
  color: var(--vf-green);
}

.vf-related__label--paid {
  background: #fff3e0;
  color: #e65100;
}

.vf-related .lSSlideOuter { direction: ltr; }
.vf-related .lSSlideOuter .lightSlider {
  display: block !important;
}
.vf-related .lSSlideOuter .lightSlider > li {
  float: left !important;
  margin: 0 !important;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  height: auto !important;
}

.vf-related .lSSlideOuter .lightSlider > li > .productsingle.mw-card {
  width: 100% !important;
  max-width: 100%;
  min-height: 0 !important;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

.vf-related .productsingle.mw-card .mw-card__body {
  padding: 12px;
}

.vf-related .productsingle.mw-card h3,
.vf-related .productsingle.mw-card h3 a {
  font-size: 13px !important;
  min-height: 2.6em;
}

.vf-related .productsingle.mw-card .priceprint strong {
  font-size: 16px !important;
}

.vf-related .productsingle.mw-card .mw-card__actions {
  display: flex !important;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.vf-related .productsingle.mw-card .mw-card__btn {
  flex: 1 1 118px;
  width: auto !important;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 6px !important;
  font-size: 11px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vf-related .productsingle.mw-card .mw-card__btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* موبایل: دکمه‌ها همیشه زیر هم */
@media (max-width: 720px) {
  .vf-related .productsingle.mw-card .mw-card__btn {
    flex: 1 1 100%;
  }
}

.vf-related .productsingle:not(.mw-card) {
  background: #fff !important;
  border: 1px solid var(--vf-line);
  border-radius: 14px;
  overflow: hidden;
  margin: 0 !important;
  padding: 10px;
  box-shadow: none;
  height: 100%;
}

.vf-related .productsingle:not(.mw-card) h3,
.vf-related .productsingle:not(.mw-card) h3 a {
  color: var(--vf-ink) !important;
  font-size: 0.8rem !important;
  font-weight: 700;
  margin-bottom: 6px;
}

.vf-related .productsingle:not(.mw-card) .imagecontent {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #f3f4f6;
}

.vf-related .imagecontent img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0 !important;
}

.vf-related .imagecontent > .btn.tags,
.vf-related .btn.tags.tag-on-image {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  margin: 0 !important;
  padding: 4px 9px !important;
  font-size: 0.65rem !important;
  background: rgba(17, 24, 39, 0.78) !important;
  color: #ffb74d !important;
  border-radius: 999px;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vf-related .productsingle:not(.mw-card) h3 + .btn.tags {
  display: inline-flex;
  align-self: flex-start;
  margin: 0 0 8px !important;
  padding: 4px 9px !important;
  font-size: 0.65rem !important;
  background: #fff3e0 !important;
  color: #e65100 !important;
  border-radius: 999px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vf-comments {
  padding: 20px 0 8px;
}

.vf-comments .commentbox {
  background: var(--vf-card);
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-radius);
  padding: 22px;
  box-shadow: var(--vf-shadow);
}

.vf-comments .titlesection {
  color: var(--vf-ink) !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
}

@media (max-width: 992px) {
  .vf-layout { grid-template-columns: 1fr; }
  .vf-info { position: static; }
  .vf-cover { min-height: 280px; max-height: 480px; padding: 18px; }
  .vf-cover img { max-height: 420px; }
  .vf-prose-wrap { padding: 22px 18px; }
}

@media (max-width: 560px) {
  .vf-meta { grid-template-columns: 1fr; }
  .vf-price-row { flex-direction: column; align-items: stretch; }
}
