/* 產品資訊頁：字級、圖片大小統一（只動這兩件事，其餘沿用匯出的 Elementor CSS） */

/* 介紹區的標題、說明：跟首頁「主要產品」同字級（標題 28px、內文 16px/#333） */
body .elementor .elementor-element .elementor-heading-title.sj-p-title {
  font-family: Roboto, sans-serif !important;
  font-size: 28px !important;
  font-weight: 600 !important;
  line-height: 28px !important;
  letter-spacing: normal !important;
  color: #000 !important;
}
body .elementor .sj-p-desc,
body .elementor .sj-p-desc p {
  font-size: 16px !important;
  line-height: 24px !important;
  color: #333 !important;
}

/* 圖片大小：固定值（含單相／三相規格表裡的圖），四個角圓角。
 *   橫式 398×298（同首頁產品圖的顯示大小）、直式轉向 298×398、圓角 25px（同首頁）。
 * 圖片用 cover 填滿固定框（比例不同的圖會裁掉邊緣一點，不會變形）。
 * 要調整只改下面這幾個數字。 */
:root { --sj-img-long: 398px; --sj-img-short: 298px; --sj-img-radius: 25px; }
body .elementor img.sj-img-land {
  width: var(--sj-img-long) !important; height: var(--sj-img-short) !important;
  max-width: 100% !important; aspect-ratio: auto !important;
  object-fit: cover; border-radius: var(--sj-img-radius) !important;
}
body .elementor img.sj-img-port {
  width: var(--sj-img-short) !important; height: var(--sj-img-long) !important;
  max-width: 100% !important; aspect-ratio: auto !important;
  object-fit: cover; border-radius: var(--sj-img-radius) !important;
}
/* 介紹區：圖片欄放寬，才放得下 398px（原本欄寬只有約 368px） */
@media (min-width: 768px) {
  body .elementor section:has(.sj-p-title) > .elementor-container > .elementor-column:first-child { width: 40% !important; }
  body .elementor section:has(.sj-p-title) > .elementor-container > .elementor-column:last-child { width: 60% !important; }
}

/* =========================================================
 * 產品頁字級統一（橫幅不動）
 *   標題：全部同「介紹區標題」→ 28px / 字重 600 / 無字距
 *   內文：全部同「介紹區說明」→ 16px / 行高 24px / #333
 * 要調整只改下面兩組數字。
 * ========================================================= */
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) { --sj-title-size: 28px; --sj-title-weight: 600; --sj-body-size: 16px; --sj-body-lh: 24px; --sj-body-color: #333; }

/* 標題（橫幅以外的所有標題） */
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .elementor-heading-title {
  font-size: var(--sj-title-size) !important;
  font-weight: var(--sj-title-weight) !important;
  line-height: 1.3 !important;
  letter-spacing: normal !important;
}
/* 標題上方的小英文：同內文大小，首頁用綠色 */
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .elementor-widget-text-editor:has(+ .elementor-widget-heading) {
  font-size: var(--sj-body-size) !important; font-weight: 400 !important; color: #10A063 !important; letter-spacing: normal !important; text-transform: none !important;
}
/* 內文、列表、表格、分頁標籤、按鈕旁文字 */
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .elementor-widget-text-editor:not(:has(+ .elementor-widget-heading)),
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .elementor-widget-text-editor:not(:has(+ .elementor-widget-heading)) p,
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .elementor-widget-text-editor:not(:has(+ .elementor-widget-heading)) li,
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .elementor-tab-content td,
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .elementor-tab-content td pre,
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .elementor-icon-list-text,
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .elementor-image-box-title,
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .elementor-image-box-description {
  font-size: var(--sj-body-size) !important; line-height: var(--sj-body-lh) !important; color: var(--sj-body-color) !important; font-weight: 400 !important;
}
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .elementor-tab-title { font-size: var(--sj-body-size) !important; font-weight: 700 !important; }
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .elementor-button { font-size: 15px !important; }

/* =========================================================
 * 單相／三相規格區：內容寬度不超過首頁產品區塊
 * 首頁區塊容器 1140px，但內容實際落在 175→1153（約 978px）：
 * 左邊留 62px、右邊留 100px。字體不動。
 * ========================================================= */
@media (min-width: 1100px) {
  body .elementor section:has(.elementor-widget-tabs, .sj-spec) > .elementor-container > .elementor-column > .elementor-widget-wrap {
    box-sizing: border-box;
    padding-left: 62px !important;
    padding-right: 100px !important;
  }
}

/* =========================================================
 * 單相／三相：不要外框
 * 去掉分頁內容、標籤列的框線與內距，以及規格表最外圈的線（字體不動）
 * ========================================================= */
body .elementor .elementor-widget-tabs .elementor-tabs-content-wrapper,
body .elementor .elementor-widget-tabs .elementor-tab-content {
  border: 0 !important; padding: 0 !important; background: transparent !important;
}
body .elementor .elementor-widget-tabs .elementor-tabs-wrapper { border: 0 !important; }
body .elementor .elementor-widget-tabs .elementor-tab-desktop-title,
body .elementor .elementor-widget-tabs .elementor-tab-desktop-title.elementor-active {
  border-color: transparent !important;
}
body .elementor .elementor-widget-tabs .elementor-tab-desktop-title.elementor-active::before,
body .elementor .elementor-widget-tabs .elementor-tab-desktop-title.elementor-active::after { display: none !important; }
body .elementor .elementor-widget-tabs .elementor-tab-content table { border: 0 !important; width: 100%; }
body .elementor .elementor-widget-tabs .elementor-tab-content table tr:first-child td { border-top: 0 !important; }
body .elementor .elementor-widget-tabs .elementor-tab-content table tr:last-child td { border-bottom: 0 !important; }
body .elementor .elementor-widget-tabs .elementor-tab-content table td:first-child { border-left: 0 !important; }
body .elementor .elementor-widget-tabs .elementor-tab-content table td:last-child { border-right: 0 !important; }
body .elementor .elementor-widget-tabs .elementor-tab-content table td[rowspan] { border-bottom: 0 !important; }

/* 沒有外框後，用綠字＋綠色底線標示目前選中的分頁（字級不動） */
body .elementor .elementor-widget-tabs .elementor-tab-desktop-title.elementor-active {
  color: #10A063 !important;
  border-bottom: 3px solid #10A063 !important;
}


/* =========================================================
 * 單相／三相：右邊改條列（公司 logo 當項目符號，同首頁），不用表格
 * 字體：16px / 24px / #333，同內文
 * ========================================================= */
body .elementor .sj-spec { display: flex; align-items: center; gap: 48px; }
body .elementor .sj-spec__media { flex: none; }
body .elementor .sj-spec__list { flex: 1; min-width: 0; list-style: none; margin: 0; padding: 0; }
body .elementor .sj-spec__list li {
  display: flex; align-items: center; gap: 16px; margin: 0 0 12px; padding: 0;
  font-size: 16px; line-height: 24px; color: #333;
}
body .elementor .sj-spec__list li:last-child { margin-bottom: 0; }
body .elementor .sj-spec__list img.sj-bullet { flex: none; width: 36px; height: 36px; border-radius: 0; }
body .elementor .sj-spec__list .sj-l { display: inline-block; min-width: 5.5em; margin-right: 12px; color: #333; }
body .elementor .sj-spec__list .sj-v { color: #333; }
@media (max-width: 767px) {
  body .elementor .sj-spec { flex-direction: column; align-items: center; gap: 24px; }
  body .elementor .sj-spec__list { width: 100%; }
  body .elementor .sj-spec__list li { align-items: flex-start; }
  body .elementor .sj-spec__list .sj-l { display: block; min-width: 0; margin-right: 0; }
}

/* 切換單相／三相時，右邊條列位置必須不動：
 * 圖片放進固定大小的格子（398×398，橫圖直圖都放得下），條列的位置就不會因圖片不同而位移。 */
body .elementor .sj-spec__media {
  width: var(--sj-img-long); height: var(--sj-img-long); max-width: 100%;
  display: flex; align-items: center; justify-content: center; flex: none;
}

/* 條列頂端對齊：不管文字換不換行，切換單相／三相時起始位置都一樣 */
body .elementor .sj-spec { align-items: flex-start; }
body .elementor .sj-spec__list { align-self: flex-start; margin-top: 36px; }

/* 規格區底部一條線，下面才是說明文字 */
body .elementor .elementor-widget-tabs {
  padding-bottom: 28px; margin-bottom: 24px;
  border-bottom: 1px solid rgba(45, 86, 140, 0.3);
}


/* 去背圖（單相變壓器）：完整放進固定框，不裁切 */
body .elementor img.sj-img-cut { object-fit: contain; }
/* 沒有背景的圖：淺黑色外框，框含在固定尺寸內（顏色改下面 --sj-frame-color） */
:root { --sj-frame-color: #a3a8ad; }
body .elementor img.sj-img-cut,
body .elementor img.sj-img-frame { box-sizing: border-box !important; border: 2px solid var(--sj-frame-color) !important; background: #fff; }

/* 規格區下方的說明（非晶質硬度高…）：字體再小一點 */
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) { --sj-note-size: 14px; --sj-note-lh: 22px; }
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .elementor-widget-tabs + .elementor-widget-text-editor,
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .elementor-widget-tabs + .elementor-widget-text-editor p,
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .elementor-widget-tabs + .elementor-widget-text-editor li {
  font-size: var(--sj-note-size) !important; line-height: var(--sj-note-lh) !important;
}


/* 介紹區（首頁區塊）上方的英文小標：同首頁「OUR PRODUCT」16px 綠色 */
body .elementor .sj-home-block .sj-eyebrow,
body .elementor .sj-home-block .sj-eyebrow p {
  font-size: 16px; line-height: 24px; font-weight: 400; color: #10A063; margin: 0 0 4px;
}

/* 分頁標籤與下方內容之間留一點空隙（加框後圖片會貼到標籤底線） */
body .elementor .sj-spec { margin-top: 20px; }


/* 指定不要外框的圖（分類區的兩個鐵心圖）：不加框、背景透明，其餘維持固定大小與圓角 */
body .elementor img.sj-img-cut.sj-img-noframe,
body .elementor img.sj-img-frame.sj-img-noframe { border: 0 !important; background: transparent !important; }


/* 沒有分頁的規格段（桿上型變壓器）：同樣底線與下方小字說明 */
body .elementor .sj-spec-widget {
  padding-bottom: 28px; margin-bottom: 24px;
  border-bottom: 1px solid rgba(45, 86, 140, 0.3);
}
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .sj-spec-widget + .elementor-widget-text-editor,
:is(body.page-id-127, body.page-id-166, body.page-id-1111, body.page-id-1113) .elementor .elementor-top-section:not(:first-of-type) .sj-spec-widget + .elementor-widget-text-editor p {
  font-size: var(--sj-note-size) !important; line-height: var(--sj-note-lh) !important;
}

/* 手機：Elementor 給欄位加了左邊距，但欄位寬度又是 100%，結果多出 18px 橫向溢出。改成吃掉剩下的寬度。 */
@media (max-width: 767px) {
  .elementor-column > .elementor-widget-wrap.elementor-element-populated { width: auto; flex: 1 1 0; min-width: 0; }
}
