/*
Theme Name: Cartonix (Woodmart Child)
Theme URI: https://cartonix.ir
Description: قالب فرزند کارتنیکس. تمام سفارشی‌سازی‌های فروشگاه اینجا نگه داشته می‌شود تا آپدیت قالب اصلی آن‌ها را پاک نکند. جهت طراحی: cartonix-kraft-grove.
Author: Cartonix
Template: woodmart
Version: 1.0.0
Text Domain: woodmart-child
*/

/* ========================================================================
   توکن‌های جهت طراحی «Cartonix Kraft & Grove»
   تنها منبع رنگ و فاصله. هیچ رنگی خارج از این بلوک تعریف نمی‌شود.
   ======================================================================== */
:root{
  --cx-bg:#FFFFFF;
  --cx-surface:#F5F7F2;
  --cx-board:#F1E9DD;
  --cx-ink:#1C2718;
  --cx-ink-muted:#616E59;
  --cx-rule:#E2E7DD;
  --cx-accent:#83B735;
  --cx-accent-deep:#3E7B18;
  --cx-accent-deeper:#2F5F12;
  --cx-accent-ink:#16210C;
  --cx-deep:#0E3144;
  --cx-deep-alt:#194C67;
  --cx-kraft:#B07A3C;
  --cx-danger:#A4302A;
  --cx-warning:#9A6407;

  --cx-sm:8px;
  --cx-md:16px;
  --cx-lg:32px;
  --cx-xl:56px;

  --cx-r:2px;
  --cx-pill:999px;

  --cx-font:"YekanBakhFaNum",Tahoma,sans-serif;
}

/* ========================================================================
   ۱. پایه متن. خاکستری ۷F۷F۷F بازنشسته شد (کنتراست ۴.۰۰:۱)
   ======================================================================== */
body,
.wd-page-wrapper{
  color:var(--cx-ink);
  font-family:var(--cx-font);
}
body{background:var(--cx-bg);}

.woocommerce-result-count,
.wd-product-sku,
.widget_product_categories a,
.wd-sidebar .widget a{color:var(--cx-ink-muted);}

.wd-entities-title,
.wd-entities-title a{color:var(--cx-ink);}

/* اعداد همه‌جا هم‌عرض تا ستون قیمت و ابعاد روی هم بیفتد */
.price,.cx-spec,.cx-unit,.cx-pack,.quantity input,
.cx-size-guide td,.cx-size-guide th,.woocommerce-result-count{
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1;
}

/* ========================================================================
   ۲. لینک پرش به محتوا (دسترسی‌پذیری)
   ======================================================================== */
.cx-skip{
  position:absolute;inset-inline-start:-9999px;top:0;z-index:100000;
  background:var(--cx-accent-deep);color:#fff;
  padding:10px 18px;border-radius:0 0 var(--cx-r) var(--cx-r);
  font-size:14px;font-weight:700;text-decoration:none;
}
.cx-skip:focus{inset-inline-start:var(--cx-md);}

/* حالت فوکوس دیدنی برای همه کنترل‌ها */
a:focus-visible,button:focus-visible,input:focus-visible,
select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{
  outline:2px solid var(--cx-accent-deep);
  outline-offset:2px;
}

/* ========================================================================
   ۳. سر صفحه فروشگاه: تیتر واقعی + مقدمه
   ======================================================================== */
.cx-shop-head{
  padding-block:var(--cx-lg) var(--cx-md);
  border-bottom:1px solid var(--cx-rule);
  margin-bottom:var(--cx-lg);
}
.cx-shop-head h1{
  font-size:clamp(26px,3.4vw,38px);
  font-weight:700;line-height:1.15;
  color:var(--cx-ink);margin:0 0 10px;
  text-wrap:balance;
}
.cx-shop-head p{
  margin:0;color:var(--cx-ink-muted);
  font-size:16px;line-height:1.8;max-width:68ch;
}

/* نوار اطمینان بالای محصولات */
.cx-assure{
  display:flex;flex-wrap:wrap;gap:var(--cx-sm) var(--cx-lg);
  padding:14px var(--cx-md);margin-bottom:var(--cx-lg);
  background:var(--cx-surface);border:1px solid var(--cx-rule);
  border-radius:var(--cx-r);
  font-size:14px;color:var(--cx-ink);
}
.cx-assure span{display:flex;align-items:center;gap:7px;font-weight:500;}
.cx-assure span::before{
  content:"";width:7px;height:7px;flex:0 0 7px;
  background:var(--cx-accent);border-radius:var(--cx-pill);
}

/* ========================================================================
   ۴. کارت محصول
   ======================================================================== */

/* خط دسته‌بندی زیر عنوان حذف شد: روی هر ۲۲ کارت یک متن تکراری بود */
.wd-product .wd-product-cats{display:none !important;}

/* ستاره خالی هرگز نمایش داده نمی‌شود */
.wd-product .star-rating:not(.cx-has-reviews),
.wd-product .wd-product-rating:empty{display:none !important;}

/* بستر تصویر با تُن مقوای کرافت، بدون سایه */
.wd-product .wd-product-thumb{
  background:var(--cx-board);
  border-radius:var(--cx-r);
  overflow:hidden;
}
.wd-product .wd-product-thumb img{
  border-radius:var(--cx-r);
  mix-blend-mode:normal;
}
.wd-product,.wd-product .wd-product-wrapper{box-shadow:none !important;}

/* عنوان: دو خط ثابت تا ارتفاع همه کارت‌ها یکی شود */
.wd-product .wd-entities-title{
  font-size:15.5px;font-weight:600;line-height:1.55;
  margin:12px 0 6px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;min-height:calc(2 * 1.55em);
}

/* خط مشخصات: ابعاد و تعداد لایه، جای خط دسته‌بندی حذف‌شده */
.cx-spec{
  display:flex;flex-wrap:wrap;gap:4px 10px;
  font-size:13px;color:var(--cx-ink-muted);
  margin:0 0 10px;line-height:1.7;
}
.cx-spec b{font-weight:600;color:var(--cx-ink);}
.cx-spec .cx-sep{color:var(--cx-rule);}

/* ردیف قیمت با خط مویی بالای آن */
.wd-product .price{
  border-top:1px solid var(--cx-rule);
  padding-top:10px;margin:0 0 4px;
  display:block;
  font-size:17px;font-weight:700;
  color:var(--cx-accent-deep);
}
.wd-product .price .amount,
.wd-product .price bdi{color:var(--cx-accent-deep);}
.wd-product .price del{color:var(--cx-ink-muted);font-weight:400;font-size:14px;}

/* واحد قیمت (عدد) که خود قالب داخل قیمت می‌زند */
/* قالب اصلی این را #BBBBBB می‌گذارد (کنتراست ۱.۹۲)، پس با اختصاص بالاتر جایگزین می‌شود */
.wd-price-unit,
.wd-product .price .wd-price-unit,
.summary .price .wd-price-unit{
  font-size:12.5px !important;
  font-weight:500 !important;
  color:var(--cx-ink-muted) !important;
  margin-inline-start:2px;
}
.wd-price-unit::before{
  content:"/";margin-inline-end:4px;color:var(--cx-ink-muted);font-weight:400;opacity:.55;
}

/* واحد «هر عدد» و مرجع بسته */
.cx-unit-label{
  font-size:12.5px;font-weight:500;color:var(--cx-ink-muted);
  margin-inline-start:4px;
}
.cx-pack{
  display:block;font-size:12.5px;color:var(--cx-ink-muted);
  margin:0 0 12px;line-height:1.7;
}

/* وضعیت موجودی به‌صورت متن، نه نقطه رنگی */
.cx-stock{font-size:12.5px;font-weight:600;margin:0 0 10px;}
.cx-stock.in{color:var(--cx-accent-deep);}
.cx-stock.out{color:var(--cx-danger);}

/* برچسب‌ها: پر رنگ برند با متن تیره */
.wd-product .product-labels .product-label,
.cx-badge{
  background:var(--cx-accent);color:var(--cx-accent-ink);
  border-radius:var(--cx-r);
  font-size:12px;font-weight:600;
  padding:3px 9px;line-height:1.6;
}
.wd-product .product-labels .product-label.onsale{background:var(--cx-accent-deep);color:#fff;}

/* ========================================================================
   ۵. دکمه‌ها. سبز روشن برند روی سفید کنتراست ۲.۳۹ داشت،
      پس دکمه اصلی سبز تیره با متن سفید شد (کنتراست ۵.۲)
   ======================================================================== */
.wd-product .wd-add-btn>a,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce .button.alt,
.single_add_to_cart_button,
.cx-btn{
  background-color:var(--cx-accent-deep) !important;
  color:#fff !important;
  border:0 !important;
  border-radius:var(--cx-r) !important;
  box-shadow:none !important;
  font-family:var(--cx-font);
  font-size:14px;font-weight:700;
  min-height:44px;
  display:flex;align-items:center;justify-content:center;
  text-align:center;
  transition:background-color .15s ease, transform .12s ease;
}
.wd-product .wd-add-btn>a:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.single_add_to_cart_button:hover,
.cx-btn:hover{
  background-color:var(--cx-accent-deeper) !important;
  transform:translateY(-1px);
}
.cx-btn-ghost{
  background:transparent !important;
  color:var(--cx-accent-deep) !important;
  border:1px solid var(--cx-accent-deep) !important;
}

/* دکمه افزودن به سبد همیشه دیده می‌شود، نه فقط در hover */
.wd-product .wd-add-btn{
  opacity:1 !important;visibility:visible !important;
  transform:none !important;position:static !important;
  margin-top:var(--cx-sm);
}

/* ===========================================================================
   ۶. شمارنده تعداد پله‌ای و کلیدهای میان‌بر
   =========================================================================== */
.quantity{
  display:inline-flex;align-items:stretch;
  border:1px solid var(--cx-rule);border-radius:var(--cx-r);
  overflow:hidden;background:var(--cx-bg);
  height:48px;
  box-shadow:0 1px 2px rgba(28,39,24,.06);
  transition:border-color .15s ease,box-shadow .15s ease;
}
.quantity:hover{border-color:#CBD5C2;}
.quantity:focus-within{
  border-color:var(--cx-accent-deep);
  box-shadow:0 0 0 3px rgba(131,183,53,.22);
}
.quantity input.qty{
  width:84px;height:100%;
  border:0;border-inline:1px solid var(--cx-rule);
  text-align:center;
  font-family:var(--cx-font);font-size:16px;font-weight:700;
  color:var(--cx-ink);background:transparent;
  -moz-appearance:textfield;
}
.quantity input.qty:focus{outline:0;}
.quantity input.qty::-webkit-outer-spin-button,
.quantity input.qty::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}
/* دکمه‌های منفی و مثبت. کلاس‌ها از خود قالب Woodmart می‌آیند. */
.quantity .minus,
.quantity .plus{
  width:48px;flex:0 0 48px;
  border:0;background:var(--cx-surface);
  color:var(--cx-accent-deep);
  font-size:20px;font-weight:700;line-height:1;
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  transition:background-color .15s ease,color .15s ease;
  border-radius:0;
  min-height:0;
  appearance:none;-webkit-appearance:none;
}
.quantity .minus:hover:not(:disabled),
.quantity .plus:hover:not(:disabled){background:var(--cx-accent-deep);color:#FFFFFF;}
.quantity .minus:active:not(:disabled),
.quantity .plus:active:not(:disabled){background:var(--cx-accent-deeper);color:#FFFFFF;}
.quantity .minus:focus-visible,
.quantity .plus:focus-visible{outline:2px solid var(--cx-accent-deep);outline-offset:-2px;}
.quantity .minus:disabled,
.quantity .plus:disabled{opacity:.35;cursor:not-allowed;color:var(--cx-ink-muted);}

/* راهنمای پله و کلیدهای میان‌بر تعداد، زیر شمارنده صفحه محصول */
.cx-qty-help{
  display:flex;flex-direction:column;gap:var(--cx-sm);
  width:100%;margin-top:10px;
}
.cx-qty-quick{display:flex;flex-wrap:wrap;align-items:center;gap:6px;}
.cx-qty-quick-label{
  font-size:12.5px;color:var(--cx-ink-muted);
  margin-inline-end:2px;
}
.cx-qty-pick{
  font-family:var(--cx-font);font-size:13px;font-weight:700;line-height:1;
  padding:9px 13px;
  border:1px solid var(--cx-rule);border-radius:var(--cx-r);
  background:var(--cx-surface);color:var(--cx-ink);
  cursor:pointer;
  transition:background-color .15s ease,border-color .15s ease,color .15s ease;
}
.cx-qty-pick:hover{
  background:var(--cx-bg);border-color:var(--cx-accent-deep);color:var(--cx-accent-deep);
}
.cx-qty-pick:focus-visible{outline:2px solid var(--cx-accent-deep);outline-offset:2px;}
.cx-qty-pick[aria-pressed="true"]{
  background:var(--cx-accent-deep);border-color:var(--cx-accent-deep);color:#FFFFFF;
}
.cx-step-note{
  display:block;margin:0;
  font-size:12.5px;color:var(--cx-ink-muted);line-height:1.7;
}
.cx-line-total{
  display:block;font-size:14px;font-weight:700;color:var(--cx-ink);
  margin-top:8px;
}
.cx-line-total span{color:var(--cx-accent-deep);}

/* در سبد خرید و پنجره‌های کوچک، شمارنده جمع‌وجورتر می‌شود */
.woocommerce-cart .quantity,
.wd-cart-form .quantity{height:44px;}
.woocommerce-cart .quantity input.qty,
.wd-cart-form .quantity input.qty{width:64px;font-size:15px;}
.woocommerce-cart .quantity .minus,
.woocommerce-cart .quantity .plus,
.wd-cart-form .quantity .minus,
.wd-cart-form .quantity .plus{width:40px;flex:0 0 40px;}
@media (max-width:575px){
  .quantity{height:44px;}
  .quantity input.qty{width:72px;}
  .quantity .minus,
  .quantity .plus{width:44px;flex:0 0 44px;}
  .cx-qty-pick{padding:8px 11px;font-size:12.5px;}
}

/* ========================================================================
   ۷. سایدبار و فیلترها
   ======================================================================== */
.wd-sidebar .widget{
  border:0;border-bottom:1px solid var(--cx-rule);
  padding-bottom:var(--cx-md);margin-bottom:var(--cx-md);
  box-shadow:none;
}
.wd-sidebar .widget:last-child{border-bottom:0;}
.wd-sidebar .widget-title,
.wd-sidebar .widgettitle{
  font-size:15px;font-weight:700;color:var(--cx-ink);
  margin:0 0 12px;letter-spacing:0;
}
.wd-sidebar .widget li{margin-bottom:4px;}
.wd-sidebar .widget a{font-size:14.5px;line-height:1.9;}
.wd-sidebar .widget a:hover{color:var(--cx-accent-deep);}
.wd-sidebar .widget .chosen>a,
.wd-sidebar .widget .current-cat>a{color:var(--cx-accent-deep);font-weight:700;}
.wd-sidebar .widget .count{color:var(--cx-ink-muted);font-size:13px;}

/* اسلایدر قیمت */
.price_slider_wrapper .ui-slider .ui-slider-range{background:var(--cx-accent-deep);}
.price_slider_wrapper .ui-slider .ui-slider-handle{
  background:var(--cx-accent-deep);border:2px solid #fff;
  box-shadow:0 0 0 1px var(--cx-rule);
}
.price_slider_amount .price_label{color:var(--cx-ink);font-size:13.5px;}
.price_slider_amount .button{min-height:38px;}

/* چیپ فیلترهای فعال */
.cx-active-filters{
  display:flex;flex-wrap:wrap;gap:var(--cx-sm);
  margin-bottom:var(--cx-md);
}
.cx-chip{
  display:inline-flex;align-items:center;gap:7px;
  background:var(--cx-bg);border:1px solid var(--cx-rule);
  border-radius:var(--cx-pill);
  padding:6px 14px;font-size:13px;font-weight:600;
  color:var(--cx-ink);text-decoration:none;
}
.cx-chip:hover{border-color:var(--cx-accent-deep);color:var(--cx-accent-deep);}
.cx-chip.is-active{background:var(--cx-accent-deep);border-color:var(--cx-accent-deep);color:#fff;}
.cx-chip .cx-x{font-size:15px;line-height:1;opacity:.75;}

/* دکمه فیلتر در تبلت و موبایل */
.wd-show-sidebar-btn{
  border:1px solid var(--cx-accent-deep) !important;
  color:var(--cx-accent-deep) !important;
  border-radius:var(--cx-r);
  font-weight:700;min-height:44px;padding-inline:16px;
}

/* ========================================================================
   ۸. جدول راهنمای انتخاب سایز
   ======================================================================== */
.cx-section{
  padding-block:var(--cx-xl) 0;
  margin-top:var(--cx-xl);
  border-top:1px solid var(--cx-rule);
}
.cx-section>h2{
  font-size:clamp(22px,2.6vw,29px);font-weight:700;line-height:1.2;
  color:var(--cx-ink);margin:0 0 10px;text-wrap:balance;
}
.cx-section>p{
  color:var(--cx-ink-muted);font-size:15.5px;line-height:1.85;
  max-width:68ch;margin:0 0 var(--cx-md);
}
.cx-section h3{
  font-size:18px;font-weight:700;color:var(--cx-ink);
  margin:var(--cx-lg) 0 8px;line-height:1.5;
}
.cx-section ul{padding-inline-start:20px;color:var(--cx-ink-muted);line-height:1.9;}
.cx-section a{color:var(--cx-accent-deep);font-weight:600;}

.cx-table-wrap{
  overflow-x:auto;
  border:1px solid var(--cx-rule);border-radius:var(--cx-r);
  background:var(--cx-bg);
}
table.cx-size-guide{
  border-collapse:collapse;width:100%;min-width:640px;
  font-size:14px;
}
table.cx-size-guide th,
table.cx-size-guide td{
  padding:11px 14px;text-align:right;
  border-bottom:1px solid var(--cx-rule);
  white-space:nowrap;
}
table.cx-size-guide thead th{
  background:var(--cx-board);
  color:var(--cx-ink);font-weight:700;font-size:13.5px;
  position:sticky;top:0;
  cursor:pointer;user-select:none;
}
table.cx-size-guide thead th::after{
  content:"";display:inline-block;margin-inline-start:6px;
  border:4px solid transparent;border-top-color:var(--cx-kraft);
  transform:translateY(2px);opacity:.45;
}
table.cx-size-guide thead th[aria-sort="ascending"]::after{
  border-top-color:transparent;border-bottom-color:var(--cx-accent-deep);
  transform:translateY(-2px);opacity:1;
}
table.cx-size-guide thead th[aria-sort="descending"]::after{
  border-top-color:var(--cx-accent-deep);opacity:1;
}
table.cx-size-guide tbody tr:last-child td{border-bottom:0;}
table.cx-size-guide tbody tr:hover{background:var(--cx-surface);}
table.cx-size-guide td a{color:var(--cx-accent-deep);font-weight:600;}
table.cx-size-guide .cx-num{font-weight:700;color:var(--cx-ink);}

/* پرسش‌های پرتکرار */
.cx-faq details{
  border-bottom:1px solid var(--cx-rule);
  padding:14px 0;
}
.cx-faq summary{
  cursor:pointer;font-size:16px;font-weight:600;color:var(--cx-ink);
  list-style:none;display:flex;justify-content:space-between;gap:var(--cx-md);
  line-height:1.6;
}
.cx-faq summary::-webkit-details-marker{display:none;}
.cx-faq summary::after{
  content:"+";color:var(--cx-accent-deep);font-size:20px;font-weight:700;
  line-height:1;flex:0 0 auto;
}
.cx-faq details[open] summary::after{content:"\2212";}
.cx-faq details p{
  margin:10px 0 0;color:var(--cx-ink-muted);
  font-size:15px;line-height:1.9;max-width:68ch;
}

/* جدول مشخصات صفحه محصول */
.cx-specs-table{width:100%;border-collapse:collapse;font-size:14.5px;}
.cx-specs-table th,.cx-specs-table td{
  padding:10px 14px;text-align:right;
  border-bottom:1px solid var(--cx-rule);
}
.cx-specs-table th{
  background:var(--cx-surface);font-weight:600;
  color:var(--cx-ink-muted);width:38%;white-space:nowrap;
}
.cx-specs-table td{color:var(--cx-ink);font-weight:600;}

/* تیتر صفحات سبد و پرداخت */
.cx-wc-title{
  font-size:clamp(22px,2.8vw,30px);font-weight:700;line-height:1.2;
  color:var(--cx-ink);margin:0 0 var(--cx-md);
  padding-bottom:var(--cx-sm);border-bottom:1px solid var(--cx-rule);
}

/* تیتر جدول مشخصات در صفحه محصول */
.cx-specs-heading{
  font-size:18px;font-weight:700;color:var(--cx-ink);
  margin:var(--cx-lg) 0 var(--cx-sm);line-height:1.4;
}

/* ========================================================================
   ۹. چیدمان و ریسپانسیو. هر بلوک چندستونی جمع‌شدنش اعلام شده است.
   ======================================================================== */
@media (max-width:1024px){
  .cx-assure{gap:var(--cx-sm) var(--cx-md);font-size:13.5px;}
}
@media (max-width:768.98px){
  .cx-shop-head{padding-block:var(--cx-md) var(--cx-sm);margin-bottom:var(--cx-md);}
  .cx-shop-head h1{font-size:23px;}
  .cx-shop-head p{font-size:15px;}
  .cx-section{padding-block:var(--cx-lg) 0;margin-top:var(--cx-lg);}
  .wd-product .wd-entities-title{font-size:14px;}
  .wd-product .price{font-size:15.5px;}
  .cx-spec{font-size:12px;}
  .quantity{height:42px;}
  .quantity input.qty{width:60px;font-size:14px;}
  .quantity .minus,
  .quantity .plus{width:40px;flex:0 0 40px;}
  .cx-assure{flex-direction:column;gap:6px;}
}

/* ========================================================================
   ۱۰. حرکت. dial motion روی ۰.۱۵ است، پس حرکت حداقلی.
   ======================================================================== */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
    scroll-behavior:auto !important;
  }
}

/* ===== CARTONIX GLOBAL TYPOGRAPHY — Yekan Bakh FaNum ===== */
:root{
  --e-global-typography-primary-font-family:"YekanBakhFaNum",Tahoma,sans-serif;
  --e-global-typography-secondary-font-family:"YekanBakhFaNum",Tahoma,sans-serif;
  --e-global-typography-text-font-family:"YekanBakhFaNum",Tahoma,sans-serif;
  --e-global-typography-accent-font-family:"YekanBakhFaNum",Tahoma,sans-serif;
}

/* Scoped components with their own local typography tokens. */
.cxh{
  --font:"YekanBakhFaNum",Tahoma,sans-serif !important;
}
.cx-footer{
  --cx-font:"YekanBakhFaNum",Tahoma,sans-serif !important;
}

/* Native controls do not consistently inherit body typography. */
button,
input,
select,
textarea,
.elementor-button{
  font-family:"YekanBakhFaNum",Tahoma,sans-serif;
}
/* ===== END CARTONIX GLOBAL TYPOGRAPHY ===== */

/* CARTONIX: hide automatic NEW product labels */
.product-label.new{
  display:none !important;
}

/* ===== CARTONIX PDP v1 — start =====
   صفحهٔ محصول، مرحلهٔ یک ممیزی.
   کاری که این بلوک می‌کند:
   ۱) ترتیب جعبهٔ خرید را درست می‌کند: قیمت ← مبلغ کل ← تعداد ← دکمه.
      (چیدمان با order در فلکس، بدون دست‌زدن به قالب المنتور)
   ۲) جعبهٔ «مبلغ این سفارش» را که با JS ساخته می‌شود استایل می‌دهد.
   ۳) کنتراست متن‌های کم‌رنگ را به بالای حد استاندارد می‌برد.
   ۴) دکمهٔ خرید را تمام‌عرض و لمس‌پذیر می‌کند.
   انتخابگر جعبهٔ خرید با :has ساخته شده تا به شناسهٔ قالب المنتور
   وابسته نباشد؛ اگر قالب بازسازی شد باز هم کار می‌کند. */

.single-product {
  --cxp-ink: #0f2233;
  --cxp-ink-2: #54626b;
  --cxp-ink-3: #78848c;
  --cxp-line: rgba(15, 34, 51, .12);
  --cxp-green: #3e7b18;
  --cxp-green-deep: #2d5c0f;
  --cxp-green-soft: #f1f7e9;
}

/* ---------- عنوان و اشتراک‌گذاری ---------- */
.single-product .elementor-widget-wd_single_product_title .product_title {
  margin: 0;
  color: var(--cxp-ink);
  font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 700;
  line-height: 1.55;
}

.single-product .elementor-widget-wd_social_buttons .wd-label {
  color: var(--cxp-ink-3);
  font-size: 12.5px;
  font-weight: 400;
}

/* ---------- توضیح کوتاه ---------- */
.single-product .woocommerce-product-details__short-description {
  color: var(--cxp-ink-2);
  font-size: 15px;
  line-height: 1.9;
}

/* ---------- علاقه‌مندی و مقایسه: کم‌وزن‌تر از دکمهٔ خرید ---------- */
.single-product .elementor-widget-wd_single_product_wishlist_button a,
.single-product .elementor-widget-wd_single_product_compare_button a {
  min-height: 38px;
  border-width: 1px;
  font-size: 13px !important;
}

/* ---------- کنتراست: متن توضیح آیکن‌باکس‌ها ----------
   قبلاً #b1b1b1 روی سفید بود؛ نسبت ۲.۱۴:۱ و زیر حد WCAG AA. */
.single-product .elementor-widget-icon-box .elementor-icon-box-description {
  color: var(--cxp-ink-2) !important;
  font-size: 13px !important;
  line-height: 1.8 !important;
}

/* ================= جعبهٔ خرید ================= */
.single-product .elementor-widget-wrap:has(> .elementor-widget-wd_single_product_add_to_cart) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 20px 22px !important;
  background: #fff;
  border: 1px solid var(--cxp-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 30px -22px rgba(15, 34, 51, .55);
}

/* ترتیب تصمیم خریدار */
.single-product .elementor-widget-wrap:has(> .elementor-widget-wd_single_product_add_to_cart) > .elementor-widget-icon-box { order: 0; margin: 0 0 2px !important; }
.single-product .elementor-widget-wrap:has(> .elementor-widget-wd_single_product_add_to_cart) > .elementor-widget-wd_single_product_price { order: 1; margin: 0 !important; }
.single-product .elementor-widget-wrap:has(> .elementor-widget-wd_single_product_add_to_cart) > .cx-order-total { order: 2; }
.single-product .elementor-widget-wrap:has(> .elementor-widget-wd_single_product_add_to_cart) > .elementor-widget-wd_single_product_add_to_cart { order: 3; margin: 0 !important; }

/* برچسب «قیمت محصول» */
.single-product .elementor-widget-wrap:has(> .elementor-widget-wd_single_product_add_to_cart) .elementor-icon-box-title {
  margin: 0 !important;
  color: var(--cxp-ink-3) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1.6 !important;
}

.single-product .elementor-widget-wrap:has(> .elementor-widget-wd_single_product_add_to_cart) .elementor-icon-box-wrapper {
  align-items: center;
  gap: 6px;
}

/* قیمت واحد */
.single-product .elementor-widget-wd_single_product_price .price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  margin: 0;
  color: var(--cxp-green);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.single-product .elementor-widget-wd_single_product_price .woocommerce-Price-currencySymbol {
  font-size: .62em;
  font-weight: 700;
}

.single-product .elementor-widget-wd_single_product_price .wd-price-unit {
  color: var(--cxp-ink-3) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

/* ---------- مبلغ کل سفارش (با JS ساخته می‌شود) ---------- */
.single-product .cx-order-total {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 14px 0 16px;
  padding: 13px 16px;
  background: var(--cxp-green-soft);
  border: 1px solid rgba(62, 123, 24, .22);
  border-radius: 12px;
}

.single-product .cx-ot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
}

.single-product .cx-ot-label {
  color: var(--cxp-green-deep);
  font-size: 13.5px;
  font-weight: 600;
}

.single-product .cx-ot-value {
  color: var(--cxp-green-deep);
  font-size: clamp(18px, 2.2vw, 21px);
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.single-product .cx-ot-note {
  color: #5f6b58;
  font-size: 12px;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}

/* ---------- فرم تعداد و دکمه ---------- */
.single-product .elementor-widget-wd_single_product_add_to_cart form.cart {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  margin: 0;
}

.single-product .elementor-widget-wd_single_product_add_to_cart form.cart::before {
  content: "تعداد";
  color: var(--cxp-ink-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.single-product .elementor-widget-wd_single_product_add_to_cart form.cart .quantity {
  align-self: flex-start;
  height: 46px;
  margin: 0;
}

.single-product .elementor-widget-wd_single_product_add_to_cart form.cart .quantity .minus,
.single-product .elementor-widget-wd_single_product_add_to_cart form.cart .quantity .plus {
  flex: 0 0 46px;
  width: 46px;
}

.single-product .elementor-widget-wd_single_product_add_to_cart form.cart .quantity input.qty {
  width: 64px;
  font-size: 16px;
  font-weight: 700;
}

.single-product .elementor-widget-wd_single_product_add_to_cart form.cart .cx-step-note {
  margin: 0;
  color: var(--cxp-ink-2);
  font-size: 12.5px;
  line-height: 1.7;
}

.single-product .elementor-widget-wd_single_product_add_to_cart form.cart .single_add_to_cart_button {
  width: 100% !important;
  min-height: 54px !important;
  margin: 4px 0 0 !important;
  padding: 0 18px !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

.single-product .elementor-widget-wd_single_product_add_to_cart form.cart .single_add_to_cart_button:focus-visible {
  outline: 2px solid var(--cxp-green);
  outline-offset: 3px;
}

/* ---------- موبایل ---------- */
@media (max-width: 767.98px) {
  .single-product .elementor-widget-wrap:has(> .elementor-widget-wd_single_product_add_to_cart) {
    padding: 16px !important;
    border-radius: 14px !important;
  }

  .single-product .cx-order-total {
    margin: 12px 0 14px;
    padding: 12px 14px;
  }

  .single-product .elementor-widget-wd_single_product_add_to_cart form.cart .single_add_to_cart_button {
    min-height: 52px !important;
    font-size: 15.5px !important;
  }

  .single-product .elementor-widget-wd_single_product_title .product_title {
    font-size: 20px;
  }
}

/* ===== CARTONIX PDP v1 — end ===== */

/* ===== CARTONIX PDP v2 — استایل پنل‌های راهنمای سایز — start =====
   سه بخشی که shop.js می‌سازد را استایل می‌دهد:
   .cx-fit  → «این کارتن مناسب چه چیزهایی است» داخل ستون خرید
   .cx-cmp  → «مقایسه با سایزهای نزدیک» سه‌کارتی، بعد از بخش اصلی
   .cx-all  → «همهٔ سایزهای کارتن پستی» شبکهٔ کامل، انتهای صفحه
   شبکه‌ها با grid و ستون‌های مساوی ساخته شده‌اند تا کارت‌ها هم‌ارتفاع
   بمانند و با تغییر اندازهٔ پنجره جای‌شان عوض نشود. */

.single-product .cx-fit,
.single-product .cx-cmp,
.single-product .cx-all {
  --cxv-ink: #0f2233;
  --cxv-ink-2: #54626b;
  --cxv-ink-3: #78848c;
  --cxv-line: rgba(15, 34, 51, .12);
  --cxv-green: #3e7b18;
  --cxv-green-deep: #2d5c0f;
  --cxv-green-soft: #f1f7e9;
  font-variant-numeric: tabular-nums;
}

/* ---------- ۱) این کارتن مناسب چه چیزهایی است ---------- */
.single-product .cx-fit {
  margin: 16px 0 0;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--cxv-line);
  border-radius: 14px;
}

.single-product .cx-fit-h {
  margin: 0 0 10px;
  color: var(--cxv-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
}

.single-product .cx-fit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.single-product .cx-fit-list li {
  margin: 0;
  padding: 5px 11px;
  background: var(--cxv-green-soft);
  border: 1px solid rgba(62, 123, 24, .2);
  border-radius: 999px;
  color: var(--cxv-green-deep);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
}

.single-product .cx-fit-note {
  margin: 11px 0 0;
  color: var(--cxv-ink-2);
  font-size: 13px;
  line-height: 1.9;
}

/* ---------- عنوان مشترک بخش‌های تمام‌عرض ---------- */
.single-product .cx-cmp,
.single-product .cx-all {
  margin: 34px auto;
  padding: 0 15px;
  max-width: 1222px;
}

.single-product .cx-cmp-h,
.single-product .cx-all-h {
  margin: 0 0 4px;
  color: var(--cxv-ink);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  line-height: 1.6;
}

.single-product .cx-cmp-sub,
.single-product .cx-all-sub {
  margin: 0 0 16px;
  color: var(--cxv-ink-2);
  font-size: 14px;
  line-height: 1.9;
}

/* ---------- ۲) مقایسه با سایزهای نزدیک ---------- */
.single-product .cx-cmp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.single-product .cx-cmp-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 18px 20px;
  background: #fff;
  border: 1px solid var(--cxv-line);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.single-product a.cx-cmp-card:hover,
.single-product a.cx-cmp-card:focus-visible {
  border-color: rgba(62, 123, 24, .5);
  box-shadow: 0 10px 26px -20px rgba(15, 34, 51, .6);
}

.single-product a.cx-cmp-card:focus-visible {
  outline: 2px solid var(--cxv-green);
  outline-offset: 3px;
}

.single-product .cx-cmp-card.is-current {
  background: var(--cxv-green-soft);
  border-color: rgba(62, 123, 24, .35);
}

.single-product .cx-cmp-tag {
  color: var(--cxv-ink-3);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
}

.single-product .cx-cmp-card.is-current .cx-cmp-tag { color: var(--cxv-green-deep); }

.single-product .cx-cmp-name {
  color: var(--cxv-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
}

.single-product .cx-cmp-layer {
  color: var(--cxv-ink-2);
  font-size: 13px;
  line-height: 1.7;
}

.single-product .cx-cmp-spec {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 8px;
}

.single-product .cx-cmp-spec b {
  color: var(--cxv-ink);
  font-size: 16px;
  font-weight: 700;
}

.single-product .cx-cmp-spec i,
.single-product .cx-cmp-price i {
  color: var(--cxv-ink-3);
  font-size: 12px;
  font-style: normal;
}

.single-product .cx-cmp-vol {
  color: var(--cxv-ink-2);
  font-size: 13px;
  line-height: 1.7;
}

.single-product .cx-cmp-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
}

.single-product .cx-cmp-price b {
  color: var(--cxv-green);
  font-size: 17px;
  font-weight: 800;
}

.single-product .cx-cmp-all {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  padding: 10px 18px;
  background: #fff;
  border: 1px solid rgba(62, 123, 24, .4);
  border-radius: 10px;
  color: var(--cxv-green-deep);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.single-product .cx-cmp-all:hover,
.single-product .cx-cmp-all:focus-visible {
  background: var(--cxv-green-soft);
  color: var(--cxv-green-deep);
}

.single-product .cx-cmp-all:focus-visible {
  outline: 2px solid var(--cxv-green);
  outline-offset: 3px;
}

/* ---------- ۳) همهٔ سایزها ---------- */
.single-product .cx-all-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.single-product .cx-all-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 15px 16px;
  background: #fff;
  border: 1px solid var(--cxv-line);
  border-radius: 13px;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.single-product a.cx-all-card:hover,
.single-product a.cx-all-card:focus-visible {
  border-color: rgba(62, 123, 24, .5);
  box-shadow: 0 8px 22px -18px rgba(15, 34, 51, .6);
}

.single-product a.cx-all-card:focus-visible {
  outline: 2px solid var(--cxv-green);
  outline-offset: 3px;
}

.single-product .cx-all-card.is-current {
  background: var(--cxv-green-soft);
  border-color: rgba(62, 123, 24, .35);
}

.single-product .cx-all-name {
  color: var(--cxv-ink);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.7;
}

.single-product .cx-all-layer,
.single-product .cx-all-vol {
  color: var(--cxv-ink-2);
  font-size: 12.5px;
  line-height: 1.7;
}

.single-product .cx-all-spec b {
  color: var(--cxv-ink);
  font-size: 13.5px;
  font-weight: 600;
}

.single-product .cx-all-price {
  margin-top: auto;
  padding-top: 9px;
  color: var(--cxv-green);
  font-size: 15px;
  font-weight: 800;
}

.single-product .cx-all-badge {
  margin-top: 6px;
  color: var(--cxv-green-deep);
  font-size: 11.5px;
  font-weight: 600;
}

/* ---------- ریسپانسیو ----------
   عمداً از auto-fit استفاده نشده تا تعداد ستون‌ها با تغییر جزئی
   عرض پنجره بالا و پایین نپرد. */
@media (max-width: 1023.98px) {
  .single-product .cx-all-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  .single-product .cx-cmp-grid { grid-template-columns: minmax(0, 1fr); }
  .single-product .cx-all-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .single-product .cx-cmp,
  .single-product .cx-all { margin: 26px auto; }
}

@media (max-width: 419.98px) {
  .single-product .cx-all-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ===== CARTONIX PDP v2 — استایل پنل‌های راهنمای سایز — end ===== */
/* ===== CARTONIX PDP v4.1 + v4.2 =====
   محل نصب فعلی: قالب فرزند → style.css (انتهای فایل)
   کاری که می‌کند: جدول «توضیحات تکمیلی» صفحهٔ محصول

   ۱) فونت جدول را با بقیهٔ سایت یکی می‌کند.
      پیش از این قالب روی این جدول IRANSansXFaNum را می‌گذاشت که
      اصلاً روی سایت بارگذاری نمی‌شود؛ نتیجه‌اش این بود که ارقام
      لاتین دیده می‌شدند («0.113» به‌جای «۰٫۱۱۳»).
   ۲) tbody قالب یک گرید دوستونی بود؛ چون تعداد ویژگی‌ها فرد است
      یک خانهٔ خالی ته جدول می‌ماند. حالا هر ویژگی یک ردیف کامل است.
   ۳) نکتهٔ ریز ولی مهم: قالب روی tbody یک margin-bottom منفی
      می‌گذارد تا padding پایین ردیف‌ها را جبران کند. چون آن padding
      را صفر کردیم، آن margin منفی ردیف آخر را می‌بُرید — با
      margin:0 خنثی شد.
*/

.single-product .woocommerce-product-attributes.shop_attributes,
.single-product .shop_attributes th,
.single-product .shop_attributes td,
.single-product .shop_attributes td p,
.single-product .shop_attributes td span {
  font-family: 'YekanBakhFaNum', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-variant-numeric: tabular-nums;
}

.single-product .woocommerce-product-attributes.shop_attributes {
  width: 100%;
  margin: 0 0 6px;
  border: 1px solid rgba(15, 34, 51, .12) !important;
  border-radius: 12px;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  display: block !important;
  overflow: hidden;
  font-size: 14px;
}

.single-product .shop_attributes tbody {
  display: block !important;
  margin: 0 !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}

.single-product .shop_attributes tbody tr {
  display: flex !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  align-items: stretch;
  border: 0 !important;
  border-bottom: 1px solid rgba(15, 34, 51, .1) !important;
}

.single-product .shop_attributes tbody tr:last-child { border-bottom: 0 !important; }

.single-product .shop_attributes tbody tr > th {
  display: flex !important;
  align-items: center;
  flex: 0 0 38% !important;
  max-width: 38% !important;
  width: 38% !important;
  padding: 13px 16px !important;
  background: #f4f7f1 !important;
  border: 0 !important;
  border-inline-end: 1px solid rgba(15, 34, 51, .1) !important;
  color: #54626b !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  line-height: 1.7 !important;
  text-align: start !important;
}

.single-product .shop_attributes tbody tr > td {
  display: flex !important;
  align-items: center;
  flex: 1 1 auto !important;
  min-width: 0;
  width: auto !important;
  padding: 13px 16px !important;
  background: #fff !important;
  border: 0 !important;
  color: #0f2233 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.7 !important;
  text-align: start !important;
}

.single-product .shop_attributes tbody tr > td p { margin: 0 !important; }

@media (max-width: 575.98px) {
  .single-product .woocommerce-product-attributes.shop_attributes { font-size: 13px; }
  .single-product .shop_attributes tbody tr > th {
    flex-basis: 42% !important;
    max-width: 42% !important;
    width: 42% !important;
    padding: 11px 12px !important;
    font-size: 12.5px !important;
  }
  .single-product .shop_attributes tbody tr > td {
    padding: 11px 12px !important;
    font-size: 13px !important;
  }
}

/* ===== CARTONIX SHOP FIX v5 — start =====
   چهار مورد فروشگاه:
   ۱) انتخابگر «نمایش ۹ / ۱۲ / …» برداشته شد.
   ۲) علاقه‌مندی‌ها و آیکن قلب همه‌جا برداشته شد (کارت محصول، هدر،
      منو و دکمهٔ صفحهٔ محصول).
   ۳) نوار اعتماد صفحهٔ محصول جایگاه ثابت گرفت: بالای ۱۰۲۴ پیکسل
      دقیقاً پنج ستون، پایین‌تر یک ستون. قبلاً با auto-fit ساخته شده
      بود و با تغییر عرض پنجره از پنج به چهار و سه ستون می‌پرید و یک
      کارت یتیم ته ردیف می‌ماند. */

/* ۱) انتخابگر تعداد در صفحه */
.wd-products-per-page { display: none !important; }

/* ۲) علاقه‌مندی‌ها */
.wd-wishlist-btn,
.wd-wishlist-icon,
.wd-header-wishlist,
.menu-item-wishlist,
.wd-action-btn.wd-wishlist-btn,
.single-product .elementor-widget-wd_single_product_wishlist_button { display: none !important; }

/* ۳) نوار اعتماد صفحهٔ محصول
   انتخابگر بر اساس ساختار است نه شناسهٔ المنتور: تنها سکشن تاپ‌لِوِلی
   که ستون‌های ۲۰ درصدی دارد. */
.single-product .single-product-page .elementor-top-section:has(> .elementor-container > .elementor-column.elementor-col-20) .elementor-container {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.single-product .single-product-page .elementor-top-section:has(> .elementor-container > .elementor-column.elementor-col-20) .elementor-column {
  width: auto !important;
  max-width: none !important;
}

@media (max-width: 1023.98px) {
  .single-product .single-product-page .elementor-top-section:has(> .elementor-container > .elementor-column.elementor-col-20) .elementor-container {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .single-product .single-product-page .elementor-top-section:has(> .elementor-container > .elementor-column.elementor-col-20) .elementor-widget-wrap {
    align-items: center !important;
    padding: 13px 15px !important;
  }
  .single-product .single-product-page .elementor-top-section:has(> .elementor-container > .elementor-column.elementor-col-20) .elementor-icon-box-wrapper {
    align-items: center !important;
  }
  .single-product .single-product-page .elementor-top-section:has(> .elementor-container > .elementor-column.elementor-col-20) .elementor-icon-box-title {
    margin-bottom: 2px !important;
  }
}

/* ===== CARTONIX SHOP FIX v5 — end ===== */

