/* Base */
body .mtable-container table.mtable{ width:100% !important; border-collapse:separate !important; border-spacing:0 !important; background:#fff !important; color:#1f2937 !important; border-radius:16px !important; overflow:hidden !important; box-shadow:0 8px 24px rgba(0,0,0,.08) !important; font-size:clamp(14px,1.6vw,16px) !important; box-sizing:border-box !important; }
body table.mtable *{ box-sizing:border-box !important; }
body table.mtable caption{ caption-side: top !important; display:block !important; width:100% !important; background: #f3f4f6 !important; color:#111827 !important; font-weight:700 !important; padding:12px 16px !important; border-bottom:1px solid #e5e7eb !important; writing-mode: horizontal-tb !important; text-align: right !important; }
body table.mtable thead th{ background:var(--mtable-head-bg,linear-gradient(135deg,#6366f1,#22d3ee)) !important; color:#fff !important; text-align:right !important; padding:14px 16px !important; font-weight:700 !important; border-bottom:1px solid rgba(255,255,255,.15) !important; }
body table.mtable th, body table.mtable td{ padding: var(--mtable-cell-py,14px) var(--mtable-cell-px,16px) !important; border-bottom:1px solid #e5e7eb !important; vertical-align:middle !important; }
body table.mtable tbody tr:nth-child(odd){ background:#fafafa !important; }

/* Mobile grid */
@media (max-width:768px){
  body table.mtable, body table.mtable thead, body table.mtable tbody, body table.mtable tr, body table.mtable th, body table.mtable td{ display:block !important; width:100% !important; }
  body table.mtable thead{ display:none !important; }
  body table.mtable td{
    display:grid !important;
    grid-template-columns: minmax(88px, 36%) 1fr !important;
    gap:8px 12px !important;
    align-items:center !important;
    padding:10px 12px !important;
    border-bottom:1px dashed #e5e7eb !important;
    word-break:break-word !important;
    overflow-wrap:anywhere !important;
  }
  body table.mtable td:last-child{ border-bottom:none !important; }
  body table.mtable td::before{
    content: attr(data-label) !important;
    grid-column:1 !important;
    justify-self:start !important;
    align-self:center !important;
    font-weight:700 !important;
    font-size: .92em !important;
    line-height:1.15 !important;
    background: var(--mtable-label-bg, #111827) !important;
    color: var(--mtable-label-fg, #fff) !important;
    padding:5px 10px !important;
    border-radius:8px !important;
    max-width:100% !important;
    white-space:normal !important;
  }
  /* RTL swap columns */
  html[dir="rtl"] body table.mtable td,
  body.rtl table.mtable td,
  table.mtable.mtable-rtl td{
    direction: rtl !important;
    text-align:right !important;
    grid-template-columns: 1fr minmax(88px, 36%) !important;
  }
  html[dir="rtl"] body table.mtable td::before,
  body.rtl table.mtable td::before,
  table.mtable.mtable-rtl td::before{
    grid-column:2 !important;
    justify-self:end !important;
  }
  html[dir="rtl"] body table.mtable td > *,
  body.rtl table.mtable td > *,
  table.mtable.mtable-rtl td > *{
    grid-column:1 !important;
  }
}

/* Tone options */
body.mtable-tone-bold table.mtable td::before, body table.mtable.mtable-tone-bold td::before{
  opacity: 1 !important;
}
body.mtable-tone-subtle table.mtable td::before, body table.mtable.mtable-tone-subtle td::before{
  background: transparent !important;
  color: #374151 !important;
  border: 2px solid #d1d5db !important;
}
body.mtable-tone-mono table.mtable td::before, body table.mtable.mtable-tone-mono td::before{
  background: #e5e7eb !important;
  color: #111827 !important;
}

/* Card mode footer stripe for theme */
@media (max-width:768px){
  body.mtable-mobile-card table.mtable tbody tr, body table.mtable.mtable-mobile-card tbody tr{
    background:#fff !important; margin:12px 0 !important; border:1px solid #e5e7eb !important; border-radius:12px !important; box-shadow:0 6px 18px rgba(0,0,0,.08) !important; position:relative !important; overflow:hidden !important;
  }
  body.mtable-mobile-card table.mtable tbody tr::after, body table.mtable.mtable-mobile-card tbody tr::after{
    content:'' !important; position:absolute !important; inset:auto 0 0 0 !important; height:4px !important; background: var(--mtable-head-bg, #111827) !important;
  }
}

/* Models */

/* Model 1: Minimal */
body.mtable-model-1 table.mtable, body table.mtable.mtable-model-1{
  border: 1px solid #e5e7eb !important;
  border-collapse: collapse !important;
}
body.mtable-model-1 table.mtable th, body table.mtable.mtable-model-1 th,
body.mtable-model-1 table.mtable td, body table.mtable.mtable-model-1 td{
  border: 0 !important;
}
body.mtable-model-1 table.mtable thead th, body table.mtable.mtable-model-1 thead th{
  filter: brightness(1.05) !important;
}

/* Model 4: Compact */
body.mtable-model-4 table.mtable, body table.mtable.mtable-model-4{
  --mtable-cell-px: 12px;
  --mtable-cell-py: 10px;
  font-size:14px !important;
}

/* Model 5: Roomy */
body.mtable-model-5 table.mtable, body table.mtable.mtable-model-5{
  --mtable-cell-px:22px; --mtable-cell-py:18px;
  line-height:1.7 !important;
}

/* Model 6: Separated rows */
body.mtable-model-6 table.mtable, body table.mtable.mtable-model-6{
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
  border: none !important;
}
body.mtable-model-6 table.mtable tbody tr, body table.mtable.mtable-model-6 tbody tr{
  background:#ffffff !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.06) !important;
}
body.mtable-model-6 table.mtable th, body table.mtable.mtable-model-6 th{
  border-bottom: none !important;
}

/* Model 7: Grid borders */
body.mtable-model-7 table.mtable, body table.mtable.mtable-model-7{
  border:1px solid #d1d5db !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
body.mtable-model-7 table.mtable th, body table.mtable.mtable-model-7 th,
body.mtable-model-7 table.mtable td, body table.mtable.mtable-model-7 td{
  border-right:1px solid #e5e7eb !important;
}
body.mtable-model-7 table.mtable tr > *:last-child, body table.mtable.mtable-model-7 tr > *:last-child{
  border-right: none !important;
}
/* Models (unchanged from 1.4 but kept clear) */
body.mtable-model-2 table.mtable, body table.mtable.mtable-model-2{ border:2px solid #9ca3af !important; border-radius:8px !important; overflow:hidden !important; }
body.mtable-model-3 table.mtable tbody tr:nth-child(odd), body table.mtable.mtable-model-3 tbody tr:nth-child(odd){ background:#eef2f7 !important; }
body.mtable-model-4 table.mtable, body table.mtable.mtable-model-4{ font-size:14px !important; }
body.mtable-model-5 table.mtable, body table.mtable.mtable-model-5{ --mtable-cell-px:22px; --mtable-cell-py:18px; }
body.mtable-model-8 table.mtable, body table.mtable.mtable-model-8{ background:#0f172a !important; color:#e5e7eb !important; }
.mtable-theme-1 table.mtable,
table.mtable.mtable-theme-1 {
  --mtable-head-bg: linear-gradient(135deg, hsl(7 75% 56%), hsl(47 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(7 75% 56%), hsl(47 68% 48%));
}

.mtable-theme-2 table.mtable,
table.mtable.mtable-theme-2 {
  --mtable-head-bg: linear-gradient(135deg, hsl(14 75% 56%), hsl(54 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(14 75% 56%), hsl(54 68% 48%));
}

.mtable-theme-3 table.mtable,
table.mtable.mtable-theme-3 {
  --mtable-head-bg: linear-gradient(135deg, hsl(21 75% 56%), hsl(61 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(21 75% 56%), hsl(61 68% 48%));
}

.mtable-theme-4 table.mtable,
table.mtable.mtable-theme-4 {
  --mtable-head-bg: linear-gradient(135deg, hsl(28 75% 56%), hsl(68 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(28 75% 56%), hsl(68 68% 48%));
}

.mtable-theme-5 table.mtable,
table.mtable.mtable-theme-5 {
  --mtable-head-bg: linear-gradient(135deg, hsl(35 75% 56%), hsl(75 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(35 75% 56%), hsl(75 68% 48%));
}

.mtable-theme-6 table.mtable,
table.mtable.mtable-theme-6 {
  --mtable-head-bg: linear-gradient(135deg, hsl(42 75% 56%), hsl(82 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(42 75% 56%), hsl(82 68% 48%));
}

.mtable-theme-7 table.mtable,
table.mtable.mtable-theme-7 {
  --mtable-head-bg: linear-gradient(135deg, hsl(49 75% 56%), hsl(89 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(49 75% 56%), hsl(89 68% 48%));
}

.mtable-theme-8 table.mtable,
table.mtable.mtable-theme-8 {
  --mtable-head-bg: linear-gradient(135deg, hsl(56 75% 56%), hsl(96 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(56 75% 56%), hsl(96 68% 48%));
}

.mtable-theme-9 table.mtable,
table.mtable.mtable-theme-9 {
  --mtable-head-bg: linear-gradient(135deg, hsl(63 75% 56%), hsl(103 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(63 75% 56%), hsl(103 68% 48%));
}

.mtable-theme-10 table.mtable,
table.mtable.mtable-theme-10 {
  --mtable-head-bg: linear-gradient(135deg, hsl(70 75% 56%), hsl(110 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(70 75% 56%), hsl(110 68% 48%));
}

.mtable-theme-11 table.mtable,
table.mtable.mtable-theme-11 {
  --mtable-head-bg: linear-gradient(135deg, hsl(77 75% 56%), hsl(117 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(77 75% 56%), hsl(117 68% 48%));
}

.mtable-theme-12 table.mtable,
table.mtable.mtable-theme-12 {
  --mtable-head-bg: linear-gradient(135deg, hsl(84 75% 56%), hsl(124 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(84 75% 56%), hsl(124 68% 48%));
}

.mtable-theme-13 table.mtable,
table.mtable.mtable-theme-13 {
  --mtable-head-bg: linear-gradient(135deg, hsl(91 75% 56%), hsl(131 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(91 75% 56%), hsl(131 68% 48%));
}

.mtable-theme-14 table.mtable,
table.mtable.mtable-theme-14 {
  --mtable-head-bg: linear-gradient(135deg, hsl(98 75% 56%), hsl(138 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(98 75% 56%), hsl(138 68% 48%));
}

.mtable-theme-15 table.mtable,
table.mtable.mtable-theme-15 {
  --mtable-head-bg: linear-gradient(135deg, hsl(105 75% 56%), hsl(145 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(105 75% 56%), hsl(145 68% 48%));
}

.mtable-theme-16 table.mtable,
table.mtable.mtable-theme-16 {
  --mtable-head-bg: linear-gradient(135deg, hsl(112 75% 56%), hsl(152 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(112 75% 56%), hsl(152 68% 48%));
}

.mtable-theme-17 table.mtable,
table.mtable.mtable-theme-17 {
  --mtable-head-bg: linear-gradient(135deg, hsl(119 75% 56%), hsl(159 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(119 75% 56%), hsl(159 68% 48%));
}

.mtable-theme-18 table.mtable,
table.mtable.mtable-theme-18 {
  --mtable-head-bg: linear-gradient(135deg, hsl(126 75% 56%), hsl(166 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(126 75% 56%), hsl(166 68% 48%));
}

.mtable-theme-19 table.mtable,
table.mtable.mtable-theme-19 {
  --mtable-head-bg: linear-gradient(135deg, hsl(133 75% 56%), hsl(173 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(133 75% 56%), hsl(173 68% 48%));
}

.mtable-theme-20 table.mtable,
table.mtable.mtable-theme-20 {
  --mtable-head-bg: linear-gradient(135deg, hsl(140 75% 56%), hsl(180 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(140 75% 56%), hsl(180 68% 48%));
}

.mtable-theme-21 table.mtable,
table.mtable.mtable-theme-21 {
  --mtable-head-bg: linear-gradient(135deg, hsl(147 75% 56%), hsl(187 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(147 75% 56%), hsl(187 68% 48%));
}

.mtable-theme-22 table.mtable,
table.mtable.mtable-theme-22 {
  --mtable-head-bg: linear-gradient(135deg, hsl(154 75% 56%), hsl(194 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(154 75% 56%), hsl(194 68% 48%));
}

.mtable-theme-23 table.mtable,
table.mtable.mtable-theme-23 {
  --mtable-head-bg: linear-gradient(135deg, hsl(161 75% 56%), hsl(201 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(161 75% 56%), hsl(201 68% 48%));
}

.mtable-theme-24 table.mtable,
table.mtable.mtable-theme-24 {
  --mtable-head-bg: linear-gradient(135deg, hsl(168 75% 56%), hsl(208 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(168 75% 56%), hsl(208 68% 48%));
}

.mtable-theme-25 table.mtable,
table.mtable.mtable-theme-25 {
  --mtable-head-bg: linear-gradient(135deg, hsl(175 75% 56%), hsl(215 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(175 75% 56%), hsl(215 68% 48%));
}

.mtable-theme-26 table.mtable,
table.mtable.mtable-theme-26 {
  --mtable-head-bg: linear-gradient(135deg, hsl(182 75% 56%), hsl(222 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(182 75% 56%), hsl(222 68% 48%));
}

.mtable-theme-27 table.mtable,
table.mtable.mtable-theme-27 {
  --mtable-head-bg: linear-gradient(135deg, hsl(189 75% 56%), hsl(229 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(189 75% 56%), hsl(229 68% 48%));
}

.mtable-theme-28 table.mtable,
table.mtable.mtable-theme-28 {
  --mtable-head-bg: linear-gradient(135deg, hsl(196 75% 56%), hsl(236 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(196 75% 56%), hsl(236 68% 48%));
}

.mtable-theme-29 table.mtable,
table.mtable.mtable-theme-29 {
  --mtable-head-bg: linear-gradient(135deg, hsl(203 75% 56%), hsl(243 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(203 75% 56%), hsl(243 68% 48%));
}

.mtable-theme-30 table.mtable,
table.mtable.mtable-theme-30 {
  --mtable-head-bg: linear-gradient(135deg, hsl(210 75% 56%), hsl(250 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(210 75% 56%), hsl(250 68% 48%));
}

.mtable-theme-31 table.mtable,
table.mtable.mtable-theme-31 {
  --mtable-head-bg: linear-gradient(135deg, hsl(217 75% 56%), hsl(257 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(217 75% 56%), hsl(257 68% 48%));
}

.mtable-theme-32 table.mtable,
table.mtable.mtable-theme-32 {
  --mtable-head-bg: linear-gradient(135deg, hsl(224 75% 56%), hsl(264 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(224 75% 56%), hsl(264 68% 48%));
}

.mtable-theme-33 table.mtable,
table.mtable.mtable-theme-33 {
  --mtable-head-bg: linear-gradient(135deg, hsl(231 75% 56%), hsl(271 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(231 75% 56%), hsl(271 68% 48%));
}

.mtable-theme-34 table.mtable,
table.mtable.mtable-theme-34 {
  --mtable-head-bg: linear-gradient(135deg, hsl(238 75% 56%), hsl(278 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(238 75% 56%), hsl(278 68% 48%));
}

.mtable-theme-35 table.mtable,
table.mtable.mtable-theme-35 {
  --mtable-head-bg: linear-gradient(135deg, hsl(245 75% 56%), hsl(285 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(245 75% 56%), hsl(285 68% 48%));
}

.mtable-theme-36 table.mtable,
table.mtable.mtable-theme-36 {
  --mtable-head-bg: linear-gradient(135deg, hsl(252 75% 56%), hsl(292 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(252 75% 56%), hsl(292 68% 48%));
}

.mtable-theme-37 table.mtable,
table.mtable.mtable-theme-37 {
  --mtable-head-bg: linear-gradient(135deg, hsl(259 75% 56%), hsl(299 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(259 75% 56%), hsl(299 68% 48%));
}

.mtable-theme-38 table.mtable,
table.mtable.mtable-theme-38 {
  --mtable-head-bg: linear-gradient(135deg, hsl(266 75% 56%), hsl(306 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(266 75% 56%), hsl(306 68% 48%));
}

.mtable-theme-39 table.mtable,
table.mtable.mtable-theme-39 {
  --mtable-head-bg: linear-gradient(135deg, hsl(273 75% 56%), hsl(313 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(273 75% 56%), hsl(313 68% 48%));
}

.mtable-theme-40 table.mtable,
table.mtable.mtable-theme-40 {
  --mtable-head-bg: linear-gradient(135deg, hsl(280 75% 56%), hsl(320 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(280 75% 56%), hsl(320 68% 48%));
}

.mtable-theme-41 table.mtable,
table.mtable.mtable-theme-41 {
  --mtable-head-bg: linear-gradient(135deg, hsl(287 75% 56%), hsl(327 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(287 75% 56%), hsl(327 68% 48%));
}

.mtable-theme-42 table.mtable,
table.mtable.mtable-theme-42 {
  --mtable-head-bg: linear-gradient(135deg, hsl(294 75% 56%), hsl(334 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(294 75% 56%), hsl(334 68% 48%));
}

.mtable-theme-43 table.mtable,
table.mtable.mtable-theme-43 {
  --mtable-head-bg: linear-gradient(135deg, hsl(301 75% 56%), hsl(341 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(301 75% 56%), hsl(341 68% 48%));
}

.mtable-theme-44 table.mtable,
table.mtable.mtable-theme-44 {
  --mtable-head-bg: linear-gradient(135deg, hsl(308 75% 56%), hsl(348 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(308 75% 56%), hsl(348 68% 48%));
}

.mtable-theme-45 table.mtable,
table.mtable.mtable-theme-45 {
  --mtable-head-bg: linear-gradient(135deg, hsl(315 75% 56%), hsl(355 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(315 75% 56%), hsl(355 68% 48%));
}

.mtable-theme-46 table.mtable,
table.mtable.mtable-theme-46 {
  --mtable-head-bg: linear-gradient(135deg, hsl(322 75% 56%), hsl(2 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(322 75% 56%), hsl(2 68% 48%));
}

.mtable-theme-47 table.mtable,
table.mtable.mtable-theme-47 {
  --mtable-head-bg: linear-gradient(135deg, hsl(329 75% 56%), hsl(9 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(329 75% 56%), hsl(9 68% 48%));
}

.mtable-theme-48 table.mtable,
table.mtable.mtable-theme-48 {
  --mtable-head-bg: linear-gradient(135deg, hsl(336 75% 56%), hsl(16 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(336 75% 56%), hsl(16 68% 48%));
}

.mtable-theme-49 table.mtable,
table.mtable.mtable-theme-49 {
  --mtable-head-bg: linear-gradient(135deg, hsl(343 75% 56%), hsl(23 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(343 75% 56%), hsl(23 68% 48%));
}

.mtable-theme-50 table.mtable,
table.mtable.mtable-theme-50 {
  --mtable-head-bg: linear-gradient(135deg, hsl(350 75% 56%), hsl(30 68% 48%));
  --mtable-label-bg: linear-gradient(90deg, hsl(350 75% 56%), hsl(30 68% 48%));
}


/* === Custom tweak for Ahan Sazeh: center Title & Full Description; stack on mobile === */
body table.mtable thead th{
  text-align:center !important;
}

/* Center cells for two important columns */
body table.mtable td[data-label="عنوان"],
body table.mtable td[data-label="توضیحات کامل"]{
  text-align:center !important;
}

/* On mobile: show label above and value below; make description take full width */
@media (max-width:768px){
  body table.mtable td[data-label="عنوان"],
  body table.mtable td[data-label="توضیحات کامل"]{
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
    justify-items: center !important;
  }
  body table.mtable td[data-label="عنوان"]::before,
  body table.mtable td[data-label="توضیحات کامل"]::before{
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: center !important;
    margin-bottom: 8px !important;
  }
  /* Force the value to come after the label and span full width */
  body table.mtable td[data-label="عنوان"] > *,
  body table.mtable td[data-label="توضیحات کامل"] > *{
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: center !important;
  }
}
/* === End custom tweak === */


/* === Override v1.5.2: center only the label on top, make description text full-width === */
@media (max-width:768px){
  /* Stack these two cells vertically */
  body table.mtable td[data-label="عنوان"],
  body table.mtable td[data-label="توضیحات کامل"]{
    display:grid !important;
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
  }
  /* Put the label on top and center it */
  body table.mtable td[data-label="عنوان"]::before,
  body table.mtable td[data-label="توضیحات کامل"]::before{
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: center !important;
    text-align:center !important;
    margin-bottom:8px !important;
  }
  /* Value block comes under the label */
  body table.mtable td[data-label="عنوان"] > *,
  body table.mtable td[data-label="توضیحات کامل"] > *{
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: stretch !important;
    width: 100% !important;
  }
  /* Specifically make the description text fill the space (no side emptiness) */
  body table.mtable td[data-label="توضیحات کامل"] > *{
    text-align: justify !important;
  }
  html[dir="rtl"] body table.mtable td[data-label="توضیحات کامل"] > *{
    text-align: right !important; /* prefer right for RTL text */
  }
}
/* === End override v1.5.2 === */


/* === Override v1.5.3: put label (عنوان/توضیحات کامل) on right, text on left for RTL === */
@media (max-width:768px){
  /* Side-by-side layout: [text][label] */
  body table.mtable td[data-label="عنوان"],
  body table.mtable td[data-label="توضیحات کامل"]{
    display:grid !important;
    grid-template-columns: 1fr minmax(88px,36%) !important; /* text | label */
    align-items:center !important;
    justify-items:stretch !important;
  }
  /* Put the label into right column */
  body table.mtable td[data-label="عنوان"]::before,
  body table.mtable td[data-label="توضیحات کامل"]::before{
    grid-column: 2 !important;   /* right side */
    grid-row: 1 !important;
    justify-self: end !important;
    margin: 0 0 0 8px !important;
    text-align:center !important;
  }
  /* Put the cell content into left column and allow it to fill width */
  body table.mtable td[data-label="عنوان"] > *,
  body table.mtable td[data-label="توضیحات کامل"] > *{
    grid-column: 1 !important;   /* left side */
    grid-row: 1 !important;
    justify-self: stretch !important;
    width: 100% !important;
  }
  /* For Persian text keep right alignment but occupy the full width */
  body table.mtable td[data-label="عنوان"] > *,
  body table.mtable td[data-label="توضیحات کامل"] > *{
    text-align: right !important;
  }
}
/* === End override v1.5.3 === */


/* === Override v1.5.4: mobile RTL side-by-side: text left | label right (force) === */
@media (max-width:768px){
  /* All cells: two columns => content | label */
  body table.mtable td{
    display: grid !important;
    grid-template-columns: 1fr minmax(88px,36%) !important; /* content then label */
    align-items: center !important;
  }
  /* Move label bubble to the right column */
  body table.mtable td::before{
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    margin-left: 8px !important;
    margin-right: 0 !important;
  }
  /* Put cell content in the left column and stretch */
  body table.mtable td > *{
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: stretch !important;
    width: 100% !important;
    text-align: right !important; /* keep RTL text right-aligned */
  }
}
/* === End override v1.5.4 === */


/* === Override v1.5.5: force label right & text full-width using marker class added by JS === */
@media (max-width:768px){
  table.mtable.mtable-force-rtl-mobile td{
    display:grid !important;
    grid-template-columns: 1fr minmax(88px,36%) !important; /* content | label */
    align-items:center !important;
  }
  table.mtable.mtable-force-rtl-mobile td::before{
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    margin-left: 8px !important;
  }
  table.mtable.mtable-force-rtl-mobile td > *{
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: stretch !important;
    width: 100% !important;
    text-align: right !important;
  }
}
/* === End override v1.5.5 === */

/* === Override v1.5.6: Strong RTL mobile with real label badge and !important === */
@media (max-width:768px){
  table.mtable.mtable-force-rtl-mobile td{
    display: grid !important;
    grid-template-columns: 1fr minmax(88px,36%) !important; /* content | label */
    align-items: center !important;
  }
  /* Disable ::before bubble to prevent duplication */
  table.mtable.mtable-force-rtl-mobile td::before{
    content: none !important;
  }
  table.mtable.mtable-force-rtl-mobile td .mtable-label-badge{
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: center !important;
    background: var(--mtable-label-bg, #111827) !important;
    color: var(--mtable-label-fg, #fff) !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: .92em !important;
    line-height: 1.15 !important;
    white-space: normal !important;
  }
  table.mtable.mtable-force-rtl-mobile td > :not(.mtable-label-badge){
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: stretch !important;
    width: 100% !important;
    text-align: right !important; /* RTL paragraph */
  }
}
/* === End override v1.5.6 === */

/* === Cool Minimal v1.5.8 (2025-11-02) === */
/* Base look for .price-table */
table.price-table.mtable{
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
  background: #ffffff !important;
  color: #111827 !important; /* neutral dark */
  box-shadow: 0 4px 16px rgba(17,24,39,.06) !important; /* soft shadow */
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}
table.price-table.mtable caption{
  caption-side: top !important;
  font-weight: 700 !important;
  padding: 12px 16px !important;
  background: #f5f8ff !important;
  border-bottom: 1px solid #e5e7eb !important;
  color: #1f2937 !important;
  text-align: right !important;
}
table.price-table.mtable thead th{
  background: #f8faff !important; /* cold very light */
  color: #1f2937 !important;
  font-weight: 700 !important;
  border-bottom: 1px solid #c7d2fe !important; /* soft blue border */
  padding: 14px 16px !important;
  text-align: right !important;
  white-space: nowrap !important;
}
table.price-table.mtable td{
  padding: 14px 16px !important;
  border-bottom: 1px solid #eef2ff !important;
  vertical-align: top !important;
}
table.price-table.mtable tbody tr:nth-child(odd){
  background: #fcfdff !important;
}
table.price-table.mtable tbody tr:last-child td{
  border-bottom: none !important;
}

/* Price cell minimal stack */
table.price-table .mtable-price-minimal .price-line{
  display: block !important;
  background: #f5f8ff !important;
  border: 1px solid #c7d2fe !important;
  border-radius: 10px !important;
  padding: 6px 10px !important;
  margin: 6px 0 !important;
  font-weight: 600 !important;
  font-size: .95em !important;
  text-align: center !important;
}

/* Remove any pink palette remnants */
table.price-table.mtable .pink, 
table.price-table.mtable [class*="pink"]{
  color: inherit !important;
  background: transparent !important;
  border-color: #c7d2fe !important;
}

/* Mobile RTL behavior (labels right, content left, price below) */
@media (max-width: 900px){
  html[dir="rtl"] table.price-table.mtable td{
    display: grid !important;
    grid-template-columns: 1fr minmax(100px, 40%) !important; /* content | label */
    gap: 8px 12px !important;
    align-items: start !important;
  }
  html[dir="rtl"] table.price-table.mtable td::before{
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    text-align: center !important;
    margin: 0 !important;
  }
  html[dir="rtl"] table.price-table.mtable td[data-label="قیمت حدودی"] .mtable-price-minimal,
  html[dir="rtl"] table.price-table.mtable td[data-label="توضیحات کامل"] .mtable-price-minimal{
    grid-column: 1 / span 2 !important;
  }
  html[dir="rtl"] table.price-table.mtable td > :not(.mtable-price-minimal){
    grid-column: 1 !important;
    grid-row: 1 !important;
    text-align: right !important;
  }
}

/* Desktop restore */
@media (min-width: 901px){
  table.price-table.mtable td{
    display: table-cell !important;
  }
}
/* === /Cool Minimal v1.5.8 === */

/* === v1.5.10 Mobile price-in-description === */
@media (max-width: 900px){
  table.price-table.mtable td[data-label="قیمت حدودی"]{ display: none !important; }
  table.price-table.mtable td[data-label="توضیحات کامل"] .mtable-price-mobile{
    display: block !important;
    margin: 6px 0 8px !important;
  }
}
@media (min-width: 901px){
  table.price-table.mtable .mtable-price-mobile{ display: none !important; }
}
/* === /v1.5.10 === */

/* === v1.5.10b: ensure price mobile shows only in description cell === */
@media (max-width: 900px){
  table.price-table.mtable td[data-label="عنوان"] .mtable-price-mobile{ display: none !important; }
  table.price-table.mtable td[data-label="توضیحات کامل"] .mtable-price-mobile{
    display: block !important;
    grid-column: 1 / span 2 !important;
    margin: 6px 0 10px !important;
  }
  table.price-table.mtable td{ overflow: visible !important; }
}
/* === /v1.5.10b === */

/* === v1.5.10c: Price-table mobile single-column + centered description === */
@media (max-width: 900px){
  html[dir="rtl"] table.price-table.mtable td{
    display: grid !important;
    grid-template-columns: 1fr !important; /* no label column */
    gap: 8px !important;
    align-items: start !important;
  }
  /* remove label duplicates on mobile */
  html[dir="rtl"] table.price-table.mtable td::before{ content:none !important; }
  html[dir="rtl"] table.price-table.mtable td .mtable-label-badge{ display:none !important; }

  /* price block at top of the cell */
  html[dir="rtl"] table.price-table.mtable td .mtable-price-mobile{
    grid-column: 1 !important;
    order: 0 !important;
    margin: 6px 0 8px !important;
  }
  /* center the actual description text */
  html[dir="rtl"] table.price-table.mtable td[data-label="توضیحات کامل"] > :not(.mtable-price-mobile){
    grid-column: 1 !important;
    text-align: center !important;
  }
}
/* === /v1.5.10c === */

/* === v1.5.11: RTL mobile tidy for .rtbl tables === */
@media (max-width: 900px){
  html[dir="rtl"] table.rtbl.mtable td{
    display: grid !important;
    grid-template-columns: 1fr minmax(96px, 40%) !important; /* content | label */
    gap: 8px 12px !important;
    align-items: start !important;
  }
  /* Put labels on the right; avoid duplicate badge */
  html[dir="rtl"] table.rtbl.mtable td::before{
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    margin-left: 8px !important;
    text-align: center !important;
  }
  html[dir="rtl"] table.rtbl.mtable td .mtable-label-badge{ display:none !important; }

  /* Center long paragraph in description; keep title right-aligned */
  html[dir="rtl"] table.rtbl.mtable td[data-label="توضیحات کامل"] > *{
    grid-column: 1 !important;
    text-align: center !important;
    line-height: 1.9 !important;
  }
  html[dir="rtl"] table.rtbl.mtable td[data-label="عنوان"] > *{
    grid-column: 1 !important;
    text-align: right !important;
  }
}

/* Desktop restore for .rtbl */
@media (min-width: 901px){
  table.rtbl.mtable td{ display: table-cell !important; }
}
/* === /v1.5.11 === */

/* === v1.5.12: .rtbl Mobile Card Layout (clean & attractive) === */
@media (max-width: 900px){
  html[dir="rtl"] table.rtbl.mtable{
    border: none !important;
    background: transparent !important;
    border-spacing: 0 !important;
  }
  html[dir="rtl"] table.rtbl.mtable thead{ display: none !important; }
  html[dir="rtl"] table.rtbl.mtable tbody tr{
    display: block !important;
    background: #ffffff !important;
    margin: 12px 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 6px 20px rgba(17,24,39,.06) !important;
  }
  html[dir="rtl"] table.rtbl.mtable tbody tr > td{
    display: block !important;
    width: 100% !important;
    padding: 12px 14px !important;
    border: none !important;
  }
  /* Hide label artifacts */
  html[dir="rtl"] table.rtbl.mtable td::before,
  html[dir="rtl"] table.rtbl.mtable td .mtable-label-badge{ display:none !important; content:none !important; }

  /* Title as a heading */
  html[dir="rtl"] table.rtbl.mtable td[data-label="عنوان"]{
    font-weight: 800 !important;
    font-size: 1.05rem !important;
    color: #111827 !important;
    text-align: right !important;
    border-bottom: 1px dashed #e5e7eb !important;
    padding-bottom: 8px !important;
    margin-bottom: 6px !important;
  }
  /* Description centered and airy */
  html[dir="rtl"] table.rtbl.mtable td[data-label="توضیحات کامل"]{
    text-align: center !important;
    line-height: 1.9 !important;
    color: #1f2937 !important;
  }
}
/* === /v1.5.12 === */

/* === v1.5.13: .ak-table Mobile Grid Card (name + price top, specs below) === */
@media (max-width: 900px){
  html[dir="rtl"] table.ak-table.mtable{
    border: none !important;
    background: transparent !important;
    border-spacing: 0 !important;
  }
  html[dir="rtl"] table.ak-table.mtable thead{ display: none !important; }

  /* Turn each row into a grid card */
  html[dir="rtl"] table.ak-table.mtable tbody tr{
    display: grid !important;
    grid-template-areas: "price" "name" "spec" !important;
    gap: 6px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    margin: 12px 0 !important;
    padding: 10px 12px !important;
    box-shadow: 0 6px 18px rgba(17,24,39,.06) !important;
  }
  html[dir="rtl"] table.ak-table.mtable tbody tr > td{
    display: block !important;
    width: 100% !important;
    border: none !important;
    padding: 0 !important;
  }

  /* Hide default label badges/pseudo */
  html[dir="rtl"] table.ak-table.mtable td::before,
  html[dir="rtl"] table.ak-table.mtable td .mtable-label-badge{ display:none !important; content:none !important; }

  /* Map cells to grid areas */
  html[dir="rtl"] table.ak-table.mtable tbody tr > td:first-child{ grid-area: name !important; }
  html[dir="rtl"] table.ak-table.mtable tbody tr > td:nth-child(2){ grid-area: spec !important; }
  html[dir="rtl"] table.ak-table.mtable tbody tr > td.ak-price{ grid-area: price !important; }

  /* Price ribbon */
  html[dir="rtl"] table.ak-table.mtable td.ak-price{
    text-align: center !important;
    font-weight: 800 !important;
    color: #111827 !important;
    border-radius: 10px !important;
    padding: 6px 10px !important;
    background: #fff8f0 !important;
    border: 1px solid #ffd8a8 !important;
    margin-bottom: 4px !important;
  }

  /* Name heading */
  html[dir="rtl"] table.ak-table.mtable tbody tr > td:first-child{
    font-weight: 700 !important;
    font-size: 1.02rem !important;
    color: #111827 !important;
    text-align: right !important;
    border-bottom: 1px dashed #e5e7eb !important;
    padding-bottom: 6px !important;
    margin-bottom: 6px !important;
  }

  /* Specs list tidy */
  html[dir="rtl"] table.ak-table.mtable .ak-spec{
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  html[dir="rtl"] table.ak-table.mtable .ak-spec li{
    margin: 6px 0 !important;
    line-height: 1.75 !important;
    text-align: center !important;
  }

  /* Accessories chips */
  html[dir="rtl"] table.ak-table.mtable .ak-acc{
    margin-top: 6px !important;
    text-align: center !important;
    color: #374151 !important;
  }
  html[dir="rtl"] table.ak-table.mtable .ak-chip{
    display: inline-block !important;
    margin: 4px 6px !important;
    padding: 5px 9px !important;
    border-radius: 999px !important;
    background: #e8f5e9 !important;
    border: 1px solid #c8e6c9 !important;
    color: #064e3b !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
  }
}

/* Desktop restore for .ak-table */
@media (min-width: 901px){
  table.ak-table.mtable td{ display: table-cell !important; padding: 12px 14px !important; }
}
/* === /v1.5.13 === */

/* === v1.5.14: Mobile Plain Mode (keep desktop table; horizontal scroll) === */
@media (max-width: 768px){
  body.mtable-mobile-plain .mtable-container{
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  /* If container is missing (auto-apply mode), allow table itself to scroll */
  body.mtable-mobile-plain table.mtable{
    display: block !important; /* keeps thead/tbody semantics via children rules below */
    width: 100% !important;
    overflow-x: auto !important;
  }
  body.mtable-mobile-plain table.mtable thead{ display: table-header-group !important; }
  body.mtable-mobile-plain table.mtable tbody{ display: table-row-group !important; }
  body.mtable-mobile-plain table.mtable tfoot{ display: table-footer-group !important; }
  body.mtable-mobile-plain table.mtable tr{ display: table-row !important; }
  body.mtable-mobile-plain table.mtable th,
  body.mtable-mobile-plain table.mtable td{
    display: table-cell !important;
    width: auto !important;
  }
  /* Kill card/grid label injection */
  body.mtable-mobile-plain table.mtable td::before{ content: none !important; display:none !important; }
  body.mtable-mobile-plain .mtable-label-badge{ display:none !important; }
}

/* === v1.5.15: FORCE desktop-style table on mobile (no cards, no grid) === */
@media (max-width: 820px){
  /* Container scroll for all tables */
  .mtable-container{ overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; }
  /* Keep real table semantics */
  table.mtable{ display: table !important; width: auto !important; max-width: none !important; border-collapse: collapse !important; }
  table.mtable thead{ display: table-header-group !important; }
  table.mtable tbody{ display: table-row-group !important; }
  table.mtable tfoot{ display: table-footer-group !important; }
  table.mtable tr{ display: table-row !important; }
  table.mtable th,
  table.mtable td{ display: table-cell !important; width: auto !important; }
  /* Kill mobile label injections */
  table.mtable td::before{ content: none !important; display:none !important; }
  .mtable-label-badge, .mtable-price-mobile{ display:none !important; }
  /* Neutralize any card/grid wrappers that might have slipped through */
  table.mtable tbody tr{ background: inherit !important; margin: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 0 !important; overflow: visible !important; }
}

/* v1.5.16 force-plain fallback */

/* v1.5.16: inline force-plain overrides */
@media (max-width: 900px){
  html body.mtable-force-plain .mtable-container{ overflow-x:auto !important; -webkit-overflow-scrolling:touch !important; }
  html body.mtable-force-plain table.mtable:not(#_){ display:table !important; width:auto !important; max-width:none !important; border-collapse:collapse !important; }
  html body.mtable-force-plain table.mtable:not(#_) thead{ display:table-header-group !important; }
  html body.mtable-force-plain table.mtable:not(#_) tbody{ display:table-row-group !important; }
  html body.mtable-force-plain table.mtable:not(#_) tfoot{ display:table-footer-group !important; }
  html body.mtable-force-plain table.mtable:not(#_) tr{ display:table-row !important; }
  html body.mtable-force-plain table.mtable:not(#_) th,
  html body.mtable-force-plain table.mtable:not(#_) td{ display:table-cell !important; width:auto !important; }
  html body.mtable-force-plain table.mtable:not(#_) td::before{ content:none !important; display:none !important; }
  html body.mtable-force-plain .mtable-label-badge, 
  html body.mtable-force-plain .mtable-price-mobile{ display:none !important; }
  html body.mtable-force-plain table.mtable:not(#_) tbody tr{ background:inherit !important; margin:0 !important; border-radius:0 !important; box-shadow:none !important; padding:0 !important; overflow:visible !important; }
}

