/* ==========================================================================
   Targol Product UI — ظاهر مدرن صفحه‌ی محصول
   محدوده: body.tgl-product-modern (فقط is_product)
   ========================================================================== */

/* ---------- فونت Peyda (میزبانی محلی، همان فونت صفحه‌ی فروشگاه) ---------- */
@font-face {
  font-family: 'Peyda';
  src: url('/dorri/assets/fonts/peyda/PeydaWeb-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Peyda';
  src: url('/dorri/assets/fonts/peyda/PeydaWeb-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Peyda';
  src: url('/dorri/assets/fonts/peyda/PeydaWeb-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Peyda';
  src: url('/dorri/assets/fonts/peyda/PeydaWeb-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Peyda';
  src: url('/dorri/assets/fonts/peyda/PeydaWeb-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Peyda';
  src: url('/dorri/assets/fonts/peyda/PeydaWeb-ExtraBold.woff2') format('woff2');
  font-weight: 800 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- پایه ---------- */
body.tgl-product-modern {
  --tgl-green: #7ac142;
  --tgl-green-strong: #6db62f;
  --tgl-green-deep: #2f6b12;
  --tgl-ink: #17231a;
  --tgl-text: #37453b;
  --tgl-muted: #7a877d;
  --tgl-line: #e6ecdf;
  --tgl-surface: #ffffff;
  --tgl-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 18px 40px -24px rgba(16, 24, 40, .25);
  background:
    radial-gradient(900px 420px at 100% 0%, #eaf3df 0%, rgba(234, 243, 223, 0) 58%),
    radial-gradient(720px 380px at 0% 100%, #eef1fb 0%, rgba(238, 241, 251, 0) 55%),
    #f6f8f3 !important;
  color: var(--tgl-text);
  font-family: 'Peyda', 'Vazirmatn', 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

body.tgl-product-modern .site-main {
  max-width: 1120px !important;
  margin-inline: auto;
  padding: 26px 20px 76px;
}

/* هماهنگی فونت هدر و فوتر با محتوای محصول */
body.tgl-product-modern #masthead .hfe-menu-item,
body.tgl-product-modern #masthead .hfe-sub-menu-item,
body.tgl-product-modern #masthead .elementor-heading-title,
body.tgl-product-modern #masthead .hfe-search-form__input,
body.tgl-product-modern #masthead .hfe-nav-menu__toggle,
body.tgl-product-modern footer,
body.tgl-product-modern footer a,
body.tgl-product-modern footer p {
  font-family: 'Peyda', 'Vazirmatn', 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
}

/* تایپوگرافی پایه‌ی محتوای محصول */
body.tgl-product-modern .site-main h1,
body.tgl-product-modern .site-main h2,
body.tgl-product-modern .site-main h3,
body.tgl-product-modern .site-main h4,
body.tgl-product-modern .site-main h5,
body.tgl-product-modern .site-main h6,
body.tgl-product-modern .site-main button,
body.tgl-product-modern .site-main input,
body.tgl-product-modern .site-main select,
body.tgl-product-modern .site-main textarea {
  font-family: 'Peyda', 'Vazirmatn', 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
}

/* ---------- مسیر (breadcrumb) ---------- */
body.tgl-product-modern .woocommerce-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 18px !important;
  padding: 8px 16px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--tgl-line);
  border-radius: 999px;
  color: var(--tgl-muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.9;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
body.tgl-product-modern .woocommerce-breadcrumb a {
  color: #5f7a63;
  text-decoration: none;
  transition: color .18s ease;
}
body.tgl-product-modern .woocommerce-breadcrumb a:hover { color: var(--tgl-green-deep); }

/* ---------- شبکه‌ی صفحه: گالری + ستون خرید ---------- */
body.tgl-product-modern div.product {
  position: relative;
  display: grid !important;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 24px 26px;
  align-items: start;
}
body.tgl-product-modern div.product::before,
body.tgl-product-modern div.product::after {
  content: none !important;
  display: none !important;
}
body.tgl-product-modern div.product .woocommerce-product-gallery,
body.tgl-product-modern div.product .summary {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  background: var(--tgl-surface);
  border: 1px solid rgba(17, 24, 39, .05);
  border-radius: 24px;
  box-shadow: var(--tgl-shadow);
}

/* ---------- گالری ---------- */
body.tgl-product-modern div.product .woocommerce-product-gallery {
  position: relative;
  padding: 20px;
  overflow: hidden;
  opacity: 1 !important;
}
body.tgl-product-modern div.product .woocommerce-product-gallery::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 260px at 72% 0%, rgba(122, 193, 66, .10), transparent 65%);
  pointer-events: none;
}
body.tgl-product-modern .woocommerce-product-gallery__wrapper {
  margin: 0 !important;
}
body.tgl-product-modern .woocommerce-product-gallery__image,
body.tgl-product-modern .woocommerce-product-gallery .flex-viewport {
  border-radius: 16px;
  overflow: hidden;
}
body.tgl-product-modern .woocommerce-product-gallery img {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto;
  max-height: 540px;
  margin: 0 auto !important;
  border-radius: 16px;
  background: #f7f9f4;
  object-fit: contain;
}
body.tgl-product-modern .woocommerce-product-gallery .flex-control-thumbs {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  list-style: none;
}
body.tgl-product-modern .woocommerce-product-gallery .flex-control-thumbs li {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}
body.tgl-product-modern .woocommerce-product-gallery .flex-control-thumbs img {
  border: 2px solid transparent;
  border-radius: 10px;
  opacity: .55;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: opacity .18s ease, border-color .18s ease;
  cursor: pointer;
}
body.tgl-product-modern .woocommerce-product-gallery .flex-control-thumbs img:hover,
body.tgl-product-modern .woocommerce-product-gallery .flex-control-thumbs img.flex-active {
  opacity: 1;
  border-color: var(--tgl-green);
}
body.tgl-product-modern .woocommerce-product-gallery__trigger {
  top: 30px !important;
  inset-inline-end: 30px !important;
  inset-inline-start: auto !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background-color: rgba(255, 255, 255, .94) !important;
  box-shadow: 0 8px 18px -10px rgba(16, 24, 40, .45);
  z-index: 4;
}

/* بج تخفیف بالای گالری */
body.tgl-product-modern div.product > .onsale {
  position: absolute;
  z-index: 5;
  top: 30px;
  inset-inline-start: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  margin: 0 !important;
  padding: 8px 13px !important;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b6b, #e63946);
  color: #fff !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0;
  box-shadow: 0 10px 22px -12px rgba(230, 57, 70, .95);
}

/* ---------- ستون خرید ---------- */
body.tgl-product-modern div.product .summary {
  padding: 28px 28px 26px;
}
body.tgl-product-modern .summary .product_title {
  margin: 0 0 14px !important;
  padding: 0 !important;
  font-size: clamp(22px, 2.3vw, 30px) !important;
  font-weight: 800 !important;
  line-height: 1.6 !important;
  letter-spacing: -.2px;
  color: var(--tgl-ink);
}
body.tgl-product-modern .summary .woocommerce-product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
body.tgl-product-modern .summary .star-rating {
  float: none;
  margin: 0 !important;
  color: #f0a72a;
  font-size: 13px;
}
body.tgl-product-modern .summary .woocommerce-review-link {
  color: var(--tgl-muted);
  font-size: 12.5px;
  text-decoration: none;
}

/* قیمت */
body.tgl-product-modern .summary .price {
  display: flex !important;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0 0 14px !important;
  color: var(--tgl-green-deep) !important;
  font-size: clamp(20px, 2vw, 26px) !important;
  font-weight: 800 !important;
  line-height: 1.6;
}
body.tgl-product-modern .summary .price .amount {
  color: inherit !important;
  font-weight: inherit !important;
}
body.tgl-product-modern .summary .price del {
  order: 3;
  color: #a1aaa3 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  opacity: 1;
}
body.tgl-product-modern .summary .price del .amount {
  color: inherit !important;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}
body.tgl-product-modern .summary .price ins {
  order: 1;
  padding: 0;
  background: none;
  color: var(--tgl-green-deep) !important;
  font-weight: 800 !important;
  text-decoration: none;
}
body.tgl-product-modern .summary .woocommerce-Price-currencySymbol {
  margin-inline-start: 5px;
  color: #6b7a6e;
  font-size: .62em;
  font-weight: 600;
}

/* وضعیت موجودی */
body.tgl-product-modern .summary > .stock,
body.tgl-product-modern .woocommerce-variation-availability .stock {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  margin: 0 0 16px !important;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  background: #eef9e7 !important;
  color: #43801d !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1.9 !important;
}
body.tgl-product-modern .summary > .stock::before,
body.tgl-product-modern .woocommerce-variation-availability .stock::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(122, 193, 66, .18);
}
body.tgl-product-modern .summary > .stock.out-of-stock,
body.tgl-product-modern .woocommerce-variation-availability .stock.out-of-stock {
  background: #fdeeee !important;
  color: #c53a3a !important;
}
body.tgl-product-modern .summary > .stock.out-of-stock::before,
body.tgl-product-modern .woocommerce-variation-availability .stock.out-of-stock::before {
  box-shadow: 0 0 0 3px rgba(197, 58, 58, .14);
}

/* توضیح کوتاه */
body.tgl-product-modern .summary .woocommerce-product-details__short-description {
  margin: 0 0 16px;
  color: #4a584d;
  font-size: 14px;
  line-height: 2.05;
}
body.tgl-product-modern .summary .woocommerce-product-details__short-description p:last-child { margin-bottom: 0; }

/* ---------- فرم خرید / تنوع‌ها ---------- */
body.tgl-product-modern form.cart {
  margin: 0 !important;
}
body.tgl-product-modern table.variations {
  width: 100%;
  margin: 0 0 14px !important;
  border: 0 !important;
  border-collapse: collapse;
  background: none !important;
}
body.tgl-product-modern table.variations tbody,
body.tgl-product-modern table.variations tr {
  display: block;
  border: 0 !important;
  background: none !important;
}
body.tgl-product-modern table.variations th.label,
body.tgl-product-modern table.variations td.value {
  display: block;
  width: 100%;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
}
body.tgl-product-modern table.variations th.label {
  margin: 0 0 7px;
  color: #65736a;
  font-size: 12.5px;
  font-weight: 600;
  text-align: right;
}
body.tgl-product-modern table.variations td.value {
  position: relative;
  margin: 0 0 14px;
}
body.tgl-product-modern table.variations select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid var(--tgl-line);
  border-radius: 13px;
  background: #fbfcf9;
  color: var(--tgl-ink);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.8;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
body.tgl-product-modern table.variations select:focus {
  border-color: #a9d97a;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(122, 193, 66, .16);
}
body.tgl-product-modern table.variations td.value::after {
  content: "";
  position: absolute;
  top: 23px;
  left: 18px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #8b958d;
  border-bottom: 2px solid #8b958d;
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}
body.tgl-product-modern a.reset_variations {
  display: inline-block;
  margin-top: 5px;
  color: #8a968d;
  font-size: 12px;
  text-decoration: none;
}
body.tgl-product-modern a.reset_variations:hover { color: var(--tgl-green-deep); }

body.tgl-product-modern .woocommerce-variation:empty { display: none; }
body.tgl-product-modern .woocommerce-variation {
  margin: 0 0 10px;
  padding: 10px 14px;
  border: 1px dashed #dbe8cf;
  border-radius: 13px;
  background: #f8fbf4;
  font-size: 13px;
}
body.tgl-product-modern .woocommerce-variation .price {
  margin: 0 !important;
  color: var(--tgl-green-deep) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
}
body.tgl-product-modern .woocommerce-variation-availability .stock {
  margin: 6px 0 0 !important;
}
body.tgl-product-modern .woocommerce-variation-description {
  margin: 0 0 8px;
  color: #5c6b60;
  font-size: 12.5px;
}
body.tgl-product-modern .woocommerce-variation-description p { margin: 0; }

/* تعداد */
body.tgl-product-modern form.cart .quantity {
  display: inline-flex;
  align-items: center;
  height: 48px;
  margin: 0 !important;
  padding: 0 3px;
  border: 1px solid var(--tgl-line);
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
}
body.tgl-product-modern form.cart .quantity input.qty {
  width: 50px;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: var(--tgl-ink);
  font-family: inherit;
  font-size: 15px !important;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
body.tgl-product-modern form.cart .quantity input.qty::-webkit-outer-spin-button,
body.tgl-product-modern form.cart .quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
body.tgl-product-modern .tgl-qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: #7a877d;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
body.tgl-product-modern .tgl-qty-btn:hover {
  background: #f2f7ec;
  color: var(--tgl-green-deep);
}

/* چیدمان تعداد + دکمه */
body.tgl-product-modern form.cart .woocommerce-variation-add-to-cart {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}
body.tgl-product-modern form.cart .woocommerce-variation-add-to-cart .quantity { flex: 0 0 auto; }
body.tgl-product-modern form.cart .woocommerce-variation-add-to-cart .single_add_to_cart_button { flex: 1 1 180px; }
body.tgl-product-modern form.cart:not(.variations_form) {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}
body.tgl-product-modern form.cart:not(.variations_form) .quantity { flex: 0 0 auto; }
body.tgl-product-modern form.cart:not(.variations_form) .single_add_to_cart_button { flex: 1 1 180px; }

/* دکمه‌ی خرید */
body.tgl-product-modern .single_add_to_cart_button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: linear-gradient(135deg, #8bd052, #6db62f) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.7 !important;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 14px 24px -16px rgba(109, 182, 47, .95);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
body.tgl-product-modern .single_add_to_cart_button:hover {
  transform: translateY(-1px);
  filter: saturate(1.06) brightness(1.02);
  box-shadow: 0 18px 28px -16px rgba(109, 182, 47, 1);
}
body.tgl-product-modern .single_add_to_cart_button:active { transform: translateY(0); }
body.tgl-product-modern .single_add_to_cart_button.disabled,
body.tgl-product-modern .single_add_to_cart_button:disabled {
  background: #e2e8dc !important;
  color: #8e9a90 !important;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* ---------- مشخصات محصول ---------- */
body.tgl-product-modern .tgl-specs {
  margin: 18px 0 2px;
  padding: 15px 16px;
  border: 1px solid #e8efe1;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbf4, #f4f8ef);
}
body.tgl-product-modern .tgl-specs__head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: #4f6345;
  font-size: 12.5px;
  font-weight: 700;
}
body.tgl-product-modern .tgl-specs__head svg {
  width: 16px;
  height: 16px;
  color: var(--tgl-green-strong);
  flex: 0 0 auto;
}
body.tgl-product-modern .tgl-specs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 0;
}
body.tgl-product-modern .tgl-specs__item {
  padding: 8px 10px;
  border: 1px solid #edf2e8;
  border-radius: 11px;
  background: #fff;
}
body.tgl-product-modern .tgl-specs__item dt {
  margin: 0 0 2px;
  color: #8a968d;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.7;
}
body.tgl-product-modern .tgl-specs__item dd {
  margin: 0;
  color: #28382c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

/* ---------- متای محصول و قیمت عمده ---------- */
body.tgl-product-modern .product_meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px dashed #e6ece0;
  color: var(--tgl-muted);
  font-size: 12.5px;
}
body.tgl-product-modern .product_meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  border: 1px solid #ecf1e6;
  border-radius: 999px;
  background: #f6f9f2;
}
body.tgl-product-modern .product_meta a {
  color: #5d8f33;
  text-decoration: none;
  transition: color .18s ease;
}
body.tgl-product-modern .product_meta a:hover { color: var(--tgl-green-deep); }
body.tgl-product-modern .product_meta h3 {
  flex: 1 1 100%;
  margin: 12px 0 2px !important;
  color: #55684b;
  font-size: 13.5px;
  font-weight: 700;
}
body.tgl-product-modern .wad-qty-pricing-table {
  width: 100%;
  margin: 0 0 10px;
  border: 1px solid var(--tgl-line);
  border-radius: 14px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: #fff;
  color: #42523f;
  font-size: 12.5px;
}
body.tgl-product-modern .wad-qty-pricing-table th {
  padding: 9px 8px !important;
  border: 0 !important;
  background: #f4f8ee !important;
  color: #5b6f4c !important;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
body.tgl-product-modern .wad-qty-pricing-table td {
  padding: 9px 8px !important;
  border: 0 !important;
  border-top: 1px solid #eef3e8 !important;
  text-align: center;
}
body.tgl-product-modern .wad-qty-pricing-table tbody tr:first-child td { border-top: 0 !important; }
body.tgl-product-modern .wad-qty-pricing-table .amount { font-weight: 700; }

/* ---------- تب‌ها ---------- */
body.tgl-product-modern .woocommerce-tabs {
  grid-column: 1 / -1;
  margin: 4px 0 0;
}
body.tgl-product-modern .woocommerce-tabs ul.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px !important;
  padding: 6px !important;
  border: 1px solid var(--tgl-line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
  list-style: none;
}
body.tgl-product-modern .woocommerce-tabs ul.tabs::before,
body.tgl-product-modern .woocommerce-tabs ul.tabs::after {
  content: none !important;
  display: none !important;
}
body.tgl-product-modern .woocommerce-tabs ul.tabs li {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: none !important;
}
body.tgl-product-modern .woocommerce-tabs ul.tabs li::before,
body.tgl-product-modern .woocommerce-tabs ul.tabs li::after {
  content: none !important;
  display: none !important;
}
body.tgl-product-modern .woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 9px 18px;
  border-radius: 12px;
  color: #6b7a6e;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.8;
  text-decoration: none;
  transition: background-color .18s ease;
}
body.tgl-product-modern .woocommerce-tabs ul.tabs li a:hover {
  background: #f3f7ee;
  color: #4c7a26;
}
body.tgl-product-modern .woocommerce-tabs ul.tabs li.active {
  background: linear-gradient(135deg, #8bd052, #6db62f) !important;
  color: #fff !important;
  box-shadow: 0 8px 16px -12px rgba(109, 182, 47, .9);
}
body.tgl-product-modern .woocommerce-tabs ul.tabs li.active a {
  color: #fff !important;
}

body.tgl-product-modern .woocommerce-Tabs-panel {
  margin: 0 0 22px !important;
  padding: 24px 26px !important;
  border: 1px solid rgba(17, 24, 39, .05);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03), 0 18px 36px -30px rgba(16, 24, 40, .3);
}
body.tgl-product-modern .woocommerce-Tabs-panel > h2 {
  margin: 0 0 14px !important;
  padding: 0 !important;
  color: var(--tgl-ink);
  font-size: 19px !important;
  font-weight: 800;
  line-height: 1.6;
}
body.tgl-product-modern .woocommerce-Tabs-panel p {
  margin: 0 0 12px;
  color: #3c4a3f;
  font-size: 14.5px;
  line-height: 2.1;
}
body.tgl-product-modern .woocommerce-Tabs-panel p:last-child { margin-bottom: 0; }
body.tgl-product-modern .woocommerce-Tabs-panel hr {
  height: 1px;
  margin: 16px 0;
  border: 0;
  background: #eef3e8;
}
body.tgl-product-modern .woocommerce-Tabs-panel ul,
body.tgl-product-modern .woocommerce-Tabs-panel ol {
  padding-inline-start: 22px;
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 2.1;
  color: #3c4a3f;
}

/* جدول ویژگی‌ها */
body.tgl-product-modern .woocommerce-product-attributes {
  width: 100%;
  border: 1px solid var(--tgl-line);
  border-radius: 14px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: #fff;
}
body.tgl-product-modern .woocommerce-product-attributes th,
body.tgl-product-modern .woocommerce-product-attributes td {
  padding: 11px 14px !important;
  border: 0 !important;
  text-align: right;
  vertical-align: top;
  font-size: 13px;
}
body.tgl-product-modern .woocommerce-product-attributes th {
  width: 34%;
  background: #f7faf3 !important;
  color: #4f6345;
  font-weight: 700;
}
body.tgl-product-modern .woocommerce-product-attributes tr + tr th,
body.tgl-product-modern .woocommerce-product-attributes tr + tr td {
  border-top: 1px solid #eef3e8 !important;
}
body.tgl-product-modern .woocommerce-product-attributes td p {
  margin: 0 !important;
  color: #37453b;
  font-size: 13px;
  line-height: 1.9;
}

/* ---------- نظرات ---------- */
body.tgl-product-modern #reviews .woocommerce-Reviews-title {
  margin: 0 0 12px !important;
  color: var(--tgl-ink);
  font-size: 17px !important;
  font-weight: 700;
}
body.tgl-product-modern #reviews .woocommerce-noreviews {
  margin: 0 0 18px;
  color: var(--tgl-muted);
  font-size: 13.5px;
}
body.tgl-product-modern #review_form_wrapper {
  padding-top: 16px;
  border-top: 1px dashed #e6ece0;
}
body.tgl-product-modern .comment-respond .comment-reply-title {
  display: block;
  margin: 0 0 12px;
  color: var(--tgl-ink);
  font-size: 15px;
  font-weight: 700;
}
body.tgl-product-modern .comment-form label {
  display: block;
  margin: 0 0 5px;
  color: #55684b;
  font-size: 12.5px;
  font-weight: 600;
}
body.tgl-product-modern .comment-form input[type="text"],
body.tgl-product-modern .comment-form input[type="email"],
body.tgl-product-modern .comment-form select,
body.tgl-product-modern .comment-form textarea {
  width: 100%;
  padding: 10px 12px !important;
  border: 1px solid var(--tgl-line) !important;
  border-radius: 12px !important;
  background: #fbfcf9 !important;
  color: var(--tgl-ink);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.9;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
body.tgl-product-modern .comment-form input:focus,
body.tgl-product-modern .comment-form select:focus,
body.tgl-product-modern .comment-form textarea:focus {
  border-color: #a9d97a !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(122, 193, 66, .16);
}
body.tgl-product-modern .comment-form textarea { min-height: 110px; resize: vertical; }
body.tgl-product-modern .comment-form .submit {
  min-height: 44px;
  padding: 10px 26px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #8bd052, #6db62f) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer;
  box-shadow: 0 12px 22px -16px rgba(109, 182, 47, .95);
}

/* ---------- پیام‌ها ---------- */
body.tgl-product-modern .woocommerce-message,
body.tgl-product-modern .woocommerce-info,
body.tgl-product-modern .woocommerce-error {
  margin: 0 0 18px !important;
  padding: 12px 16px !important;
  border: 1px solid var(--tgl-line) !important;
  border-top: 3px solid var(--tgl-green) !important;
  border-radius: 14px !important;
  background: #fff !important;
  color: #3c4a3f;
  font-size: 13px;
  list-style: none;
}
body.tgl-product-modern .woocommerce-error { border-top-color: #e05a5a !important; }

/* ---------- محصولات مرتبط ---------- */
body.tgl-product-modern .related.products {
  grid-column: 1 / -1;
  margin: 6px 0 0;
}
body.tgl-product-modern .related.products > h2 {
  position: relative;
  margin: 0 0 18px !important;
  padding: 0 0 10px !important;
  color: var(--tgl-ink);
  font-size: 22px !important;
  font-weight: 800;
  line-height: 1.6;
}
body.tgl-product-modern .related.products > h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 52px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7ac142, #a9d97a);
}
body.tgl-product-modern .related.products ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  clear: both;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}
body.tgl-product-modern .related.products ul.products::before,
body.tgl-product-modern .related.products ul.products::after {
  content: none !important;
  display: none !important;
}
body.tgl-product-modern .related.products ul.products li.product {
  position: relative;
  display: flex;
  flex-direction: column;
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  padding: 14px;
  border: 1px solid rgba(17, 24, 39, .04);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 14px 34px -20px rgba(16, 24, 40, .24);
  transition: transform .25s ease, box-shadow .25s ease;
}
body.tgl-product-modern .related.products ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 6px rgba(16, 24, 40, .05), 0 24px 46px -20px rgba(16, 24, 40, .30);
}
body.tgl-product-modern .related.products ul.products li.product .woocommerce-LoopProduct-link {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}
body.tgl-product-modern .related.products ul.products li.product img {
  display: block;
  width: 100%;
  max-width: 180px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 4px auto 12px !important;
  border-radius: 13px;
  background: #f7f8f5;
  transition: transform .35s ease;
}
body.tgl-product-modern .related.products ul.products li.product:hover img { transform: scale(1.035); }
body.tgl-product-modern .related.products ul.products li.product .woocommerce-loop-product__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 3.7em;
  margin: 0 0 6px !important;
  padding: 0 !important;
  color: #1f2937;
  font-family: inherit;
  font-size: 14px !important;
  font-weight: 600;
  line-height: 1.85;
  text-align: center;
}
body.tgl-product-modern .related.products ul.products li.product .star-rating {
  float: none;
  margin: 0 auto 8px !important;
  color: #f0a72a;
  font-size: 11.5px !important;
}
body.tgl-product-modern .related.products ul.products li.product .price {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: auto 0 12px !important;
  color: #4b5563;
  font-family: inherit;
  font-size: 14px !important;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
}
body.tgl-product-modern .related.products ul.products li.product .price del {
  display: none;
  color: #c2c8ce !important;
  font-size: 12px !important;
  font-weight: 400;
}
body.tgl-product-modern .related.products ul.products li.product .price ins {
  background: none;
  color: #374151;
  font-weight: 700;
  text-decoration: none;
}
body.tgl-product-modern .related.products ul.products li.product .onsale { display: none !important; }
body.tgl-product-modern .related.products ul.products li.product .button {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 11px 12px !important;
  border: none !important;
  border-radius: 11px !important;
  background: #7ac142 !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.7 !important;
  text-align: center !important;
  text-decoration: none !important;
  box-shadow: 0 10px 18px -12px rgba(122, 193, 66, .95);
  transition: background .2s ease, transform .2s ease;
}
body.tgl-product-modern .related.products ul.products li.product .button:hover {
  background: #6cb236 !important;
  color: #fff !important;
  transform: translateY(-1px);
}
body.tgl-product-modern .related.products ul.products li.product .added_to_cart {
  display: block;
  margin-top: 8px !important;
  color: #6b7280;
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
  text-decoration: underline;
}

/* ---------- دسترسی‌پذیری ---------- */
body.tgl-product-modern .single_add_to_cart_button:focus-visible,
body.tgl-product-modern .woocommerce-tabs ul.tabs li a:focus-visible,
body.tgl-product-modern table.variations select:focus-visible,
body.tgl-product-modern .tgl-qty-btn:focus-visible,
body.tgl-product-modern .woocommerce-breadcrumb a:focus-visible,
body.tgl-product-modern .related.products ul.products li.product .button:focus-visible {
  outline: 3px solid rgba(122, 193, 66, .45);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  body.tgl-product-modern .single_add_to_cart_button,
  body.tgl-product-modern .woocommerce-product-gallery img,
  body.tgl-product-modern .related.products ul.products li.product,
  body.tgl-product-modern .related.products ul.products li.product img {
    transition: none !important;
  }
  body.tgl-product-modern .single_add_to_cart_button:hover,
  body.tgl-product-modern .related.products ul.products li.product:hover,
  body.tgl-product-modern .related.products ul.products li.product:hover img {
    transform: none !important;
  }
}

/* ---------- ریسپانسیو ---------- */
@media (max-width: 980px) {
  body.tgl-product-modern div.product {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  body.tgl-product-modern div.product .summary { padding: 22px; }
  body.tgl-product-modern div.product .woocommerce-product-gallery { padding: 16px; }
  body.tgl-product-modern .woocommerce-product-gallery img { max-height: 470px; }
}

@media (max-width: 600px) {
  body.tgl-product-modern .site-main { padding: 16px 12px 56px; }
  body.tgl-product-modern .woocommerce-breadcrumb {
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 11.5px;
  }
  body.tgl-product-modern div.product .woocommerce-product-gallery {
    padding: 12px;
    border-radius: 20px;
  }
  body.tgl-product-modern div.product .summary {
    padding: 18px 16px;
    border-radius: 20px;
  }
  body.tgl-product-modern .summary .product_title { font-size: 21px !important; }
  body.tgl-product-modern .summary .price { font-size: 20px !important; }
  body.tgl-product-modern div.product > .onsale { top: 20px; inset-inline-start: 20px; }
  body.tgl-product-modern .woocommerce-product-gallery__trigger { top: 20px !important; inset-inline-end: 20px !important; }
  body.tgl-product-modern .tgl-specs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.tgl-product-modern .woocommerce-Tabs-panel {
    padding: 18px 16px !important;
    border-radius: 16px;
  }
  body.tgl-product-modern .woocommerce-tabs ul.tabs li a {
    padding: 8px 13px;
    font-size: 12.5px;
  }
  body.tgl-product-modern .woocommerce-product-attributes th { width: 42%; }
  body.tgl-product-modern .woocommerce-product-attributes th,
  body.tgl-product-modern .woocommerce-product-attributes td { padding: 9px 10px !important; }
  body.tgl-product-modern .related.products ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  body.tgl-product-modern .related.products ul.products li.product { padding: 10px; border-radius: 14px; }
  body.tgl-product-modern .related.products ul.products li.product .button {
    padding: 10px 8px !important;
    font-size: 12.5px !important;
  }
}

@media (max-width: 420px) {
  body.tgl-product-modern .tgl-specs__grid { grid-template-columns: 1fr; }
}
