/* ColoriModeTH — Bilingue TH (défaut) / EN + typographie adaptée au thaï */
html[data-lang="th"] [data-i18n-en]{display:none !important}
html[data-lang="en"] [data-i18n-th]{display:none !important}

body.colorimode-th{
  font-family:'Sukhumvit Set','Thonburi','Leelawadee UI','Noto Sans Thai',system-ui,-apple-system,sans-serif;
}
html[data-lang="th"] body.colorimode-th h1,
html[data-lang="th"] body.colorimode-th h2,
html[data-lang="th"] body.colorimode-th h3,
html[data-lang="th"] body.colorimode-th .cm-brand span{
  font-family:'Sukhumvit Set','Thonburi','Leelawadee UI','Noto Sans Thai',Georgia,serif;
  line-height:1.32;
}

.cmth-demo-bar{
  background:#1f1c19;
  color:#f6f1e7;
  text-align:center;
  font-size:12px;
  line-height:1.4;
  padding:6px 14px;
  letter-spacing:.02em;
}

.cmth-header-tools{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
}

.cmth-lang-switch{
  display:inline-flex;
  align-items:center;
  border:1px solid var(--cm-line,#d8cfc2);
  border-radius:999px;
  background:#fff;
  padding:2px;
  gap:2px;
}

.cmth-lang-btn{
  border:0;
  background:transparent;
  color:var(--cm-ink,#1f1c19);
  font:700 11px/1 system-ui,sans-serif;
  letter-spacing:.06em;
  padding:7px 10px;
  min-width:34px;
  min-height:30px;
  border-radius:999px;
  cursor:pointer;
  transition:background .15s ease,color .15s ease;
}

.cmth-lang-btn[aria-pressed="true"]{
  background:var(--cm-ink,#1f1c19);
  color:#fff;
}

.cmth-lang-btn:hover:not([aria-pressed="true"]){
  color:var(--cm-rust,#9a482e);
}

/* Moteur de recherche & fiches produits Thaïlande */
.cmth-search-wrap{margin:16px 0 36px}
.cmth-filters{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  padding:16px;
  background:#faf6ef;
  border:1px solid var(--cm-line,#d8cfc2);
  border-radius:4px;
  margin-bottom:20px;
  max-width:100%;
  box-sizing:border-box;
}
.cmth-filter-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:13px;
  font-weight:600;
  min-width:0;
  max-width:100%;
}
.cmth-filter-field select{
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  min-height:42px;
  padding:8px 10px;
  border:1px solid var(--cm-line,#d8cfc2);
  border-radius:3px;
  background:#fff;
  color:var(--cm-ink,#1f1c19);
  font:inherit;
  overflow:hidden;
  text-overflow:ellipsis;
}
.cmth-count-bar{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin:0 0 16px;
  font-size:13px;
  color:var(--cm-muted,#665d55);
}
.cmth-product-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.cmth-product-card{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:16px;
  background:#fff;
  border:1px solid var(--cm-line,#d8cfc2);
  border-radius:4px;
}
.cmth-product-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--cm-rust,#9a482e);
}
.cmth-product-swatch{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:500;
  color:var(--cm-muted,#665d55);
  text-transform:none;
  letter-spacing:0;
}
.cmth-product-swatch i{
  display:inline-block;
  width:16px;
  height:16px;
  border-radius:50%;
  border:1px solid rgba(0,0,0,.16);
}
.cmth-product-card h3{
  font-size:17px;
  line-height:1.35;
  margin:0;
}
.cmth-product-card p{
  font-size:13px;
  line-height:1.5;
  margin:0;
  color:var(--cm-muted,#665d55);
}
.cmth-product-meta{
  font-size:12px;
  color:var(--cm-ink,#1f1c19);
  margin-top:auto;
  padding-top:8px;
  border-top:1px solid #eee7dc;
}
.cmth-product-cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:8px 14px;
  background:var(--cm-ink,#1f1c19);
  color:#fff !important;
  text-decoration:none;
  border-radius:3px;
  font-size:13px;
  font-weight:600;
}
.cmth-product-cta:hover{background:var(--cm-rust,#9a482e)}

.cmth-note-box{
  padding:14px 16px;
  background:#efe8db;
  border-left:3px solid var(--cm-green,#3d5a46);
  font-size:13px;
  line-height:1.55;
  margin:14px 0 20px;
}

@media(max-width:900px){
  .cmth-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
  body.colorimode-th .cm-header-inner{
    width:calc(100% - 24px);
    min-height:70px;
    gap:8px;
  }
  body.colorimode-th .cm-brand{
    min-width:0;
    flex:1 1 auto;
    gap:6px;
  }
  body.colorimode-th .cm-brand img{
    width:34px;
    height:25px;
    flex:0 0 auto;
  }
  body.colorimode-th .cm-brand>span{
    font-size:17px;
    line-height:1.15;
    letter-spacing:-.02em;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  body.colorimode-th .cm-brand small{
    display:none;
  }
  body.colorimode-th .cmth-header-tools{
    flex:0 0 auto;
    gap:6px;
    margin-left:0;
  }
  body.colorimode-th .cmth-lang-switch{
    padding:2px;
    gap:1px;
  }
  body.colorimode-th .cmth-lang-btn{
    padding:5px 8px;
    min-width:30px;
    min-height:30px;
    font-size:11px;
  }
  body.colorimode-th .cm-mobile-nav summary{
    padding:6px 4px;
    gap:5px;
    font-size:13px;
    white-space:nowrap;
    min-height:38px;
  }
}
@media(max-width:640px){
  .cmth-filters{grid-template-columns:1fr;padding:12px}
  .cmth-product-grid{grid-template-columns:1fr}
}
@media(max-width:360px){
  body.colorimode-th .cm-header-inner{
    width:calc(100% - 16px);
    gap:6px;
  }
  body.colorimode-th .cm-brand img{
    width:28px;
    height:21px;
  }
  body.colorimode-th .cm-brand>span{
    font-size:15px;
  }
  body.colorimode-th .cmth-lang-btn{
    padding:4px 6px;
    min-width:26px;
    min-height:28px;
    font-size:10px;
  }
  body.colorimode-th .cm-mobile-nav summary{
    padding:4px 2px;
    gap:4px;
    font-size:12px;
  }
}
