
.xm-course-page{
  --ink:#2a211d;
  --theme:#9a4a1b;
  --theme-dark:#7d3512;
  --cream:#f8efe7;
  width:100%;
  max-width:1240px;
  margin:0 auto;
  background:#f7eee7;
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"PingFang TC","Noto Sans TC","Microsoft JhengHei",Arial,sans-serif;
  box-sizing:border-box;
  overflow:hidden;
}
.xm-course-page *,
.xm-course-page *::before,
.xm-course-page *::after{box-sizing:border-box}

.xm-course-page .top-layout{
  width:100%;
  display:block;
}
.xm-course-page section{margin:0}

.xm-course-page .hero-image{
  margin:0;
  padding:0;
  line-height:0;
  font-size:0;
  background:#fff;
}
.xm-course-page .hero-image img{
  display:block;
  width:100%;
  height:auto;
  margin:0;
  padding:0;
}

.xm-course-page .product{
  padding:26px 24px 10px;
  background:#fff;
}
.xm-course-page .crumb{
  font-size:13px;
  color:var(--theme);
  margin-bottom:9px;
}
.xm-course-page .product h2{
  font-size:29px;
  line-height:1.35;
  margin:0 0 12px;
  color:#2a211d;
}
.xm-course-page .price{
  font-size:22px;
  color:#565656;
  margin-bottom:20px;
  display:flex;
  align-items:baseline;
  gap:12px;
  flex-wrap:wrap;
}
.xm-course-page .price .original{
  color:#8b817b;
  text-decoration:line-through;
  font-size:.88em;
}
.xm-course-page .price .promo{
  color:#a84218;
  font-weight:800;
  font-size:1.15em;
}
.xm-course-page .price .label{
  font-size:.72em;
  font-weight:700;
  margin-right:4px;
  text-decoration:none;
  display:inline-block;
}
.xm-course-page .desc{
  font-size:15px;
  line-height:1.9;
  color:#4f4a45;
}

.xm-course-page a.buy{
  width:100%;
  border:0;
  border-radius:12px;
  background:linear-gradient(180deg,#b55a22,#8a3b14);
  display:block;
  text-align:center;
  text-decoration:none;
  color:#fff;
  font-size:20px;
  font-weight:800;
  letter-spacing:.08em;
  padding:18px 16px;
  margin:26px 0 14px;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(138,59,20,.18);
  transition:transform .18s ease,box-shadow .18s ease,filter .18s ease;
}
.xm-course-page a.buy:hover{
  color:#fff;
  filter:brightness(.99);
  transform:translateY(-1px);
  box-shadow:0 13px 28px rgba(138,59,20,.22);
}

.xm-course-page .contact-card{
  margin:20px 0 0;
  padding:15px;
  border:1px solid #ead7c7;
  border-radius:15px;
  background:linear-gradient(135deg,#fffaf5 0%,#f8ede3 100%);
}
.xm-course-page .contact-heading{
  margin:0 0 10px;
  color:#86401c;
  font-size:14px;
  font-weight:800;
  letter-spacing:.08em;
}
.xm-course-page .contact-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}
.xm-course-page a.contact-item{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:10px 12px;
  border:1px solid #eadfd6;
  border-radius:11px;
  background:rgba(255,255,255,.86);
  color:#3b2a22;
  text-decoration:none;
  box-shadow:0 3px 10px rgba(125,53,18,.04);
  transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease;
}
.xm-course-page a.contact-item:hover{
  color:#7d3512;
  border-color:#cf9a78;
  transform:translateY(-1px);
  box-shadow:0 5px 14px rgba(125,53,18,.08);
}
.xm-course-page .contact-label{
  color:#a16443;
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
}
.xm-course-page .contact-value{
  color:#3b2a22;
  font-size:14px;
  font-weight:700;
  line-height:1.35;
  overflow-wrap:anywhere;
}

.xm-course-page .course-intro-title{
  margin:34px 0 30px;
  text-align:center;
  font-family:"Songti TC","STSong","Noto Serif TC",serif;
  font-size:22px;
  font-weight:700;
  letter-spacing:.12em;
  color:#8f421a;
  position:relative;
}
.xm-course-page .course-intro-title::before,
.xm-course-page .course-intro-title::after{
  content:"";
  display:inline-block;
  width:34px;
  height:1px;
  background:#c89674;
  vertical-align:middle;
  margin:0 12px 5px;
}

.xm-course-page .currency-box{
  margin:24px 0 28px;
  border:1px solid #ead7c7;
  border-radius:18px;
  overflow:hidden;
  background:#fffaf5;
  box-shadow:0 10px 28px rgba(132,64,25,.08);
}
.xm-course-page .currency-title{
  padding:17px 18px 15px;
  background:linear-gradient(135deg,#9c4619,#b65e28);
  color:#fff9ef;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
}
.xm-course-page .currency-title span{
  font-size:18px;
  font-weight:800;
  letter-spacing:.05em;
}
.xm-course-page .currency-title small{
  font-size:12px;
  opacity:.82;
  font-weight:500;
  white-space:nowrap;
}
.xm-course-page .currency-table{padding:4px 14px 8px}
.xm-course-page .currency-row{
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:11px 4px;
  border-bottom:1px solid #efe3d9;
}
.xm-course-page .currency-row:last-child{border-bottom:0}
.xm-course-page .currency-name{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  font-size:15px;
  font-weight:650;
  color:#3b2a22;
}
.xm-course-page .currency-name span{white-space:nowrap}
.xm-course-page .currency-name em{
  font-style:normal;
  font-size:11px;
  font-weight:700;
  letter-spacing:.05em;
  color:#a16443;
  background:#f5e7dc;
  border-radius:999px;
  padding:3px 6px;
}
.xm-course-page .currency-amount{
  flex:0 0 auto;
  font-size:15px;
  font-weight:800;
  color:#9a431a;
  white-space:nowrap;
}

/* 課程詳情保持單欄閱讀，桌面端加寬但不把圖片拉得過大 */
.xm-course-page .details{
  padding:34px 28px 48px;
  background:linear-gradient(180deg,#f7ede3 0%,#f3e5d7 100%);
}
.xm-course-page .details-stack{
  width:100%;
  max-width:940px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:24px;
}
.xm-course-page .detail-card{
  background:rgba(255,255,255,.62);
  border-radius:20px;
  padding:10px;
  box-shadow:0 6px 20px rgba(125,53,18,.07);
}
.xm-course-page .detail-card img{
  display:block;
  width:100%;
  height:auto;
  border-radius:13px;
}


/* ===== v1.3 Elementor 桌面全寬修正 =====
   Elementor 的外層容器可能會限制 Shortcode 寬度。
   桌面端讓課程頁突破外層內容寬度，按照瀏覽器視窗自動放大並置中。
*/
.elementor-widget-shortcode .elementor-shortcode{
  width:100%;
  max-width:none;
}

/* 電腦 */
@media (min-width:1100px){
  .xm-course-page{
    width:min(1420px, calc(100vw - 56px));
    max-width:none;
    position:relative;
    left:50%;
    transform:translateX(-50%);
    margin:28px 0 48px;
    padding:30px;
    border-radius:30px;
    background:#f7eee7;
    box-shadow:0 18px 58px rgba(90,48,25,.11);
    overflow:hidden;
  }

  .xm-course-page .top-layout{
    display:grid;
    grid-template-columns:minmax(0,1.12fr) minmax(430px,.88fr);
    gap:34px;
    align-items:start;
    width:100%;
  }

  .xm-course-page .hero-image{
    width:100%;
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 12px 32px rgba(91,53,33,.11);
  }

  .xm-course-page .hero-image img{
    width:100%;
    height:auto;
  }

  .xm-course-page .product{
    width:100%;
    border-radius:24px;
    padding:34px 30px 20px;
    box-shadow:0 12px 32px rgba(91,53,33,.08);
  }

  .xm-course-page .product h2{
    font-size:34px;
    line-height:1.28;
  }

  .xm-course-page .price{
    font-size:23px;
  }

  .xm-course-page .currency-box{
    margin-top:22px;
  }

  .xm-course-page .currency-row{
    min-height:48px;
    padding:9px 5px;
  }

  .xm-course-page .currency-name,
  .xm-course-page .currency-amount{
    font-size:14px;
  }

  .xm-course-page .details{
    margin-top:32px;
    padding:42px 36px 56px;
    border-radius:24px;
  }

  .xm-course-page .details-stack{
    max-width:1080px;
    gap:26px;
  }
}

/* 小型筆電 / 平板橫向 */
@media (min-width:760px) and (max-width:1099px){
  .xm-course-page{
    width:min(940px, calc(100vw - 36px));
    max-width:none;
    position:relative;
    left:50%;
    transform:translateX(-50%);
    margin:18px 0 32px;
    border-radius:24px;
  }

  .xm-course-page .top-layout{
    display:block;
  }

  .xm-course-page .hero-image{
    border-radius:24px 24px 0 0;
    overflow:hidden;
  }

  .xm-course-page .product{
    padding:30px 30px 12px;
  }

  .xm-course-page .details{
    padding:28px 22px 38px;
  }

  .xm-course-page .details-stack{
    max-width:820px;
  }
}

/* 手機 */
@media (max-width:759px){
  .xm-course-page{
    width:100%;
    max-width:none;
    left:auto;
    transform:none;
    margin:0;
    padding:0;
    border-radius:0;
  }

  .xm-course-page .top-layout{
    display:block;
  }

  .xm-course-page .product{
    padding:24px 18px 4px;
  }

  .xm-course-page .product h2{
    font-size:22px;
  }

  .xm-course-page .price{
    font-size:18px;
  }

  .xm-course-page a.buy{
    font-size:18px;
    padding:16px 14px;
    margin:22px 0 12px;
  }

  .xm-course-page .details{
    padding:20px 12px 28px;
  }

  .xm-course-page .details-stack{
    gap:16px;
  }
}

@media (max-width:480px){
  .xm-course-page .contact-card{
    padding:13px;
  }

  .xm-course-page .contact-list{
    grid-template-columns:1fr;
    gap:7px;
  }

  .xm-course-page a.contact-item{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 11px;
  }

  .xm-course-page .contact-value{
    text-align:right;
    font-size:13px;
  }

  .xm-course-page .currency-box{
    margin:20px 0 25px;
    border-radius:15px;
  }

  .xm-course-page .currency-title{
    padding:15px 14px 13px;
  }

  .xm-course-page .currency-title span{
    font-size:16px;
  }

  .xm-course-page .currency-title small{
    font-size:10px;
  }

  .xm-course-page .currency-table{
    padding:3px 10px 7px;
  }

  .xm-course-page .currency-row{
    min-height:48px;
    padding:9px 2px;
    gap:8px;
  }

  .xm-course-page .currency-name{
    gap:5px;
    font-size:13px;
  }

  .xm-course-page .currency-name em{
    font-size:9px;
    padding:2px 5px;
  }

  .xm-course-page .currency-amount{
    font-size:13px;
  }
}


/* v1.4 幣種區塊精簡：桌面3欄、平板/手機2欄 */
.xm-course-page .currency-box{
  margin:20px 0 24px;
  border-radius:16px;
}
.xm-course-page .currency-title{
  padding:14px 16px 12px;
}
.xm-course-page .currency-title span{
  font-size:16px;
}
.xm-course-page .currency-title small{
  font-size:11px;
}
.xm-course-page .currency-table{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  padding:12px;
  background:#fffaf5;
}
.xm-course-page .currency-row{
  min-height:72px;
  padding:10px;
  border:1px solid #eadfd6;
  border-radius:12px;
  background:#fff;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:6px;
}
.xm-course-page .currency-row:last-child{
  border-bottom:1px solid #eadfd6;
}
.xm-course-page .currency-name{
  width:100%;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px;
  font-size:12px;
  line-height:1.25;
}
.xm-course-page .currency-name span{
  white-space:normal;
  font-weight:700;
}
.xm-course-page .currency-name em{
  font-size:9px;
  padding:2px 5px;
}
.xm-course-page .currency-amount{
  width:100%;
  font-size:15px;
  line-height:1.1;
  font-weight:800;
  color:#984218;
  text-align:left;
}
@media (min-width:760px) and (max-width:1199px){
  .xm-course-page .currency-table{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:759px){
  .xm-course-page .currency-table{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
    padding:9px;
  }
  .xm-course-page .currency-row{
    min-height:68px;
    padding:9px 8px;
  }
  .xm-course-page .currency-name{
    font-size:11px;
    gap:4px;
  }
  .xm-course-page .currency-name em{
    font-size:8px;
    padding:2px 4px;
  }
  .xm-course-page .currency-amount{
    font-size:14px;
  }
}
@media (max-width:360px){
  .xm-course-page .currency-table{
    grid-template-columns:1fr;
  }
  .xm-course-page .currency-row{
    min-height:56px;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
  }
  .xm-course-page .currency-name{
    width:auto;
  }
  .xm-course-page .currency-amount{
    width:auto;
    text-align:right;
    white-space:nowrap;
  }
}
