/* =========================================================
   product_description.css – Hosecraft 専用 (2025-06-03 • full)
   ---------------------------------------------------------
   • Serif copy ＋ brand accent (#013A63)
   • Rich spec tables : border / zebra / hover / sticky-header
   • Fallback: クラス無し <table> も同デザイン ＆ sticky
   =======================================================*/

/* ---------- 0. TOKENS ---------- */
:root{
  --hc-accent        : #013A63;  /* deep navy */
  --hc-accent-light  : #ebf3f9;  /* zebra */
  --hc-border        : #d0d7de;  /* grid */
  --hc-hover         : #ffecec;  /* row hover (pale red) */

  --fs-body  : 1rem;
  --fs-table : 0.85rem;
  --radius   : 8px;
  --shadow   : 0 2px 6px rgba(0,0,0,.08);
}

/* =========================================================
   1. TYPOGRAPHY / IMAGES / HR
   ---------------------------------------------------------*/
.tinymce-content{
  font-family:"Noto Sans JP","Hiragino Sans","Yu Gothic",Meiryo,system-ui,sans-serif;
  font-size:var(--fs-body);
  line-height:1.85;
  color:#1f2937;
}
.tinymce-content h2,
.tinymce-content h3,
.tinymce-content h4{
  font-weight:700;color:var(--hc-accent);margin:2.2rem 0 1rem;
}
.tinymce-content h2{font-size:1.55rem;border-left:6px solid var(--hc-accent);padding-left:.6rem;}
.tinymce-content h3{font-size:1.25rem;border-left:4px solid var(--hc-accent);padding-left:.5rem;}
.tinymce-content h4{font-size:1.10rem;border-left:3px solid var(--hc-accent);padding-left:.45rem;}
.tinymce-content p{margin:0 0 1rem;letter-spacing:0;}
.tinymce-content ul,
.tinymce-content ol{margin:0 0 1.4rem 1.4rem;padding:0;}
.tinymce-content li{margin:.55rem 0;}
.tinymce-content strong{font-weight:700;color:#000;}
.tinymce-content img{
  max-width:100%;height:auto;border-radius:8px;
  box-shadow:0 4px 14px rgba(0,0,0,.15);margin:2rem 0;
}
.tinymce-content hr{
  border:none;height:2px;margin:2.8rem 0;border-radius:1px;
  background:linear-gradient(90deg,transparent 0 10%,
                             var(--hc-accent) 10% 90%,
                             transparent 90% 100%);
}

/* =========================================================
   2. SPEC TABLE  (.spec-table / .pdx-table)
   ---------------------------------------------------------*/
.spec-table-container,
.pdx-scroll{max-height:480px;overflow:auto;}

.spec-table,.pdx-table{
  width:100%;border-collapse:separate;border-spacing:0;
  font-size:var(--fs-table);
  border:1px solid var(--hc-border);border-radius:var(--radius);
  box-shadow:var(--shadow);overflow:hidden;
}
.spec-table thead tr,
.pdx-table  thead tr{background:var(--hc-accent);color:#fff;}
.spec-table thead th,
.pdx-table  thead th{
  padding:8px 10px;font-weight:600;white-space:nowrap;
  border-right:1px solid rgba(255,255,255,.25);
}
.spec-table thead th:last-child,
.pdx-table  thead th:last-child{border-right:none;}

.spec-table-container thead th,
.pdx-scroll          thead th{
  position:sticky;top:0;z-index:2;
  background:var(--hc-accent);color:#fff;
}

.spec-table tbody td,
.pdx-table  tbody td{
  padding:7px 10px;text-align:center;white-space:nowrap;
  border-top:1px solid var(--hc-border);border-right:1px solid var(--hc-border);
}
.spec-table tbody td:last-child,
.pdx-table  tbody td:last-child{border-right:none;}
.spec-table tbody tr:nth-child(even),
.pdx-table  tbody tr:nth-child(even){background:var(--hc-accent-light);}
.spec-table tbody tr:hover,
.pdx-table  tbody tr:hover{background:var(--hc-hover);}

/* =========================================================
   3. FALLBACK  (クラス無し<table>)
   ---------------------------------------------------------*/
.tinymce-content table:not(.table):not(.pdx-table):not(.spec-table){
  width:100%;border-collapse:separate;border-spacing:0;
  font-size:var(--fs-table);
  border:1px solid var(--hc-border);border-radius:var(--radius);
  box-shadow:var(--shadow);overflow:hidden;
}
.tinymce-content table:not(.table):not(.pdx-table):not(.spec-table) thead tr{
  background:var(--hc-accent)!important;color:#fff!important;
}
.tinymce-content table:not(.table):not(.pdx-table):not(.spec-table) thead th{
  padding:8px 10px;font-weight:600;border-right:1px solid rgba(255,255,255,.25);
  position:sticky;top:0;z-index:2;background:var(--hc-accent);color:#fff;
}
.tinymce-content table:not(.table):not(.pdx-table):not(.spec-table) thead th:last-child{border-right:none;}
.tinymce-content table:not(.table):not(.pdx-table):not(.spec-table) tbody td{
  padding:7px 10px;text-align:center;border-top:1px solid var(--hc-border);
  border-right:1px solid var(--hc-border);
}
.tinymce-content table:not(.table):not(.pdx-table):not(.spec-table) tbody td:last-child{border-right:none;}
.tinymce-content table:not(.table):not(.pdx-table):not(.spec-table) tbody tr:nth-child(even){background:var(--hc-accent-light);}
.tinymce-content table:not(.table):not(.pdx-table):not(.spec-table) tbody tr:hover{background:var(--hc-hover);}

/* =========================================================
   4. RESPONSIVE
   ---------------------------------------------------------*/
@media (max-width:768px){
  .tinymce-content{font-size:0.95rem;}
  .spec-table,.pdx-table,
  .tinymce-content table:not(.table):not(.pdx-table):not(.spec-table){
    font-size:0.78rem;
  }
  .spec-table-container,
  .pdx-scroll{max-height:none;overflow-x:auto;}
}

/* =========================================================
   5. NOTE STYLE
   ---------------------------------------------------------*/
.spec-note{
  margin-top:1rem;font-size:0.8rem;color:#6c757d;line-height:1.5;
}

/* =========================================================
   6. PUBLIC PRODUCT DESCRIPTION
   ---------------------------------------------------------*/
.product-description-section {
  margin-top: 1rem;
}

.product-description-heading,
.product-spec-card__header {
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: .8rem;
}

.product-description-kicker {
  color: #0d6efd;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  margin: 0 0 .35rem;
}

.product-description-body {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 .35rem 1rem rgba(15, 23, 42, .05);
  padding: 1.15rem 1.25rem;
}

.product-description-body p:last-child {
  margin-bottom: 0;
}

.product-description-body .text-muted,
.product-description-body .small {
  color: #64748b !important;
}

.product-description-empty {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  padding: 1rem 1.15rem;
}

.product-spec-card {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.1rem;
}

.product-spec-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.product-spec-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  min-width: 0;
  padding: .85rem .95rem;
}

.product-spec-item dt {
  color: #64748b;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: .35rem;
}

.product-spec-item dd {
  color: #111827;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.product-reference-note {
  color: #64748b;
  font-size: .78rem;
  line-height: 1.65;
  margin: 1rem 0 0;
}

@media (max-width:768px){
  .product-description-body,
  .product-spec-card {
    padding: 1rem;
  }
  .product-spec-grid {
    grid-template-columns: 1fr;
  }
}
