
:root{
  --khcr-green:#173b2c;
  --khcr-green-2:#244d3a;
  --khcr-ivory:#faf8f3;
  --khcr-sage:#e9efe8;
  --khcr-gold:#b9975b;
  --khcr-border:rgba(23,59,44,.13);
  --khcr-muted:#66736c;
}
.khcr-source{display:none}
.khcr-source.is-mounted{display:block}

.khcr-source{display:none}
.khcr-source.is-mounted{display:block}
.khcr-section{
  background:#fff;
  border-top:1px solid var(--khcr-border);
  border-bottom:1px solid var(--khcr-border);
  padding:64px 0 70px;
}
.khcr-container{
  width:min(calc(100% - 48px),1180px);
  margin:0 auto;
}
.khcr-heading{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:24px;
  margin-bottom:28px;
}
.khcr-eyebrow{
  display:block;
  color:var(--khcr-green-2);
  font-size:.69rem;
  line-height:1.2;
  font-weight:850;
  letter-spacing:.14em;
  text-transform:uppercase;
  margin-bottom:8px;
}
.khcr-heading h2,
.khcr-form-card h3,
.khcr-empty h3{
  color:var(--khcr-green);
  margin:0;
}
.khcr-heading h2{
  font-family:var(--kh-heading,Georgia,serif);
  font-size:clamp(2.45rem,4.4vw,3.7rem);
  line-height:.98;
}
.khcr-write-link{
  appearance:none;
  border:0;
  background:transparent;
  color:var(--khcr-green-2);
  font:inherit;
  font-weight:800;
  text-decoration:none;
  white-space:nowrap;
  cursor:pointer;
  padding:8px 0;
}
.khcr-write-link:hover{color:var(--khcr-gold)}
.khcr-grid{
  display:grid;
  grid-template-columns:250px minmax(0,1fr);
  gap:34px;
  align-items:start;
}
.khcr-summary{
  position:sticky;
  top:110px;
  border:1px solid rgba(23,59,44,.12);
  background:
    linear-gradient(145deg,rgba(250,248,243,.99),rgba(247,244,236,.96));
  border-radius:16px;
  padding:21px 20px;
  box-shadow:0 8px 22px rgba(23,59,44,.035);
}
.khcr-summary__score{
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:13px;
  padding-bottom:17px;
  border-bottom:1px solid var(--khcr-border);
}
.khcr-summary__score>strong{
  font-family:var(--kh-heading,Georgia,serif);
  color:var(--khcr-green);
  font-size:3.15rem;
  line-height:.9;
}
.khcr-summary__score .khcr-stars span{
  font-size:1rem;
}
.khcr-summary__score p{
  margin:5px 0 0;
  color:var(--khcr-muted);
  font-size:.78rem;
}
.khcr-stars{
  display:inline-flex;
  gap:2px;
  line-height:1;
}
.khcr-stars span{color:#d8d5cb;font-size:1.05rem}
.khcr-stars span.is-filled{color:var(--khcr-gold)}
.khcr-breakdown{display:grid;gap:9px;margin-top:17px}
.khcr-breakdown__row{
  display:grid;
  grid-template-columns:30px minmax(0,1fr) 24px;
  align-items:center;
  gap:8px;
  color:var(--khcr-muted);
  font-size:.72rem;
  font-weight:700;
}
.khcr-breakdown__bar{
  display:block;
  height:5px;
  border-radius:999px;
  background:#dddeda;
  overflow:hidden;
}
.khcr-breakdown__bar i{
  display:block;
  height:100%;
  background:linear-gradient(90deg,#c9a55d,#b48d45);
  border-radius:inherit;
}
.khcr-content{min-width:0}
.khcr-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}
.khcr-review{
  min-width:0;
  border:1px solid rgba(23,59,44,.11);
  border-radius:14px;
  padding:18px 19px;
  background:#fff;
  box-shadow:0 4px 14px rgba(23,59,44,.025);
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.khcr-review:hover{
  border-color:rgba(185,151,91,.30);
  box-shadow:0 8px 20px rgba(23,59,44,.05);
  transform:translateY(-1px);
}
.khcr-review__head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.khcr-review__head time{
  color:#7a847e;
  font-size:.69rem;
  white-space:nowrap;
}
.khcr-review__author{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin-top:7px;
  color:var(--khcr-green);
}
.khcr-review__author strong{
  font-size:.91rem;
  letter-spacing:-.01em;
}
.khcr-verified{
  display:inline-flex;
  align-items:center;
  gap:4px;
  border-radius:999px;
  background:#edf4ee;
  border:1px solid rgba(36,77,58,.10);
  color:var(--khcr-green-2);
  padding:3px 7px;
  font-size:.62rem;
  font-weight:850;
}
.khcr-review__body{
  color:#4f5b54;
  line-height:1.62;
  font-size:.89rem;
  margin-top:12px;
}
.khcr-review__body p:last-child{margin-bottom:0}
.khcr-empty{
  background:linear-gradient(135deg,var(--khcr-ivory),#fff);
  border:1px solid var(--khcr-border);
  border-radius:14px;
  padding:25px;
  margin-bottom:16px;
  text-align:center;
}
.khcr-empty__stars{
  color:#d7d3c9;
  letter-spacing:.12em;
  margin-bottom:10px;
}
.khcr-empty h3{font-size:1.25rem}
.khcr-empty p{color:var(--khcr-muted);margin:7px 0 14px}
.khcr-empty__cta{
  appearance:none;
  border:0;
  background:transparent;
  color:var(--khcr-green);
  font:inherit;
  font-size:.84rem;
  font-weight:800;
  cursor:pointer;
}
.khcr-empty__cta:hover{color:var(--khcr-gold)}

/* Collapsible review composer */
.khcr-review-form-wrap{
  margin-top:18px;
}
.khcr-form-toggle{
  width:100%;
  display:grid;
  grid-template-columns:32px minmax(0,1fr) 22px;
  align-items:center;
  gap:10px;
  min-height:54px;
  padding:10px 14px;
  border:1px solid rgba(23,59,44,.15);
  border-radius:12px;
  background:#fff;
  color:var(--khcr-green);
  font:inherit;
  cursor:pointer;
  text-align:left;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.khcr-form-toggle:hover,
.khcr-form-toggle[aria-expanded="true"]{
  border-color:rgba(185,151,91,.38);
  background:#fffdf8;
  box-shadow:0 6px 16px rgba(23,59,44,.05);
}
.khcr-form-toggle__icon{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:999px;
  background:var(--khcr-green);
  color:#fff;
  font-size:.78rem;
}
.khcr-form-toggle__label{
  font-weight:850;
  font-size:.93rem;
}
.khcr-form-toggle__arrow{
  justify-self:end;
  color:var(--khcr-gold);
  font-weight:900;
  transition:transform .2s ease;
}
.khcr-form-toggle[aria-expanded="true"] .khcr-form-toggle__arrow{
  transform:rotate(180deg);
}
.khcr-form-panel{
  margin-top:10px;
}
.khcr-form-panel[hidden]{display:none!important}
.khcr-form-card{
  border-radius:14px;
  background:var(--khcr-green);
  color:#fff;
  padding:24px;
}
.khcr-form-card .khcr-eyebrow{color:#d7c28e}
.khcr-form-card h3{
  color:#fff;
  font-family:var(--kh-heading,Georgia,serif);
  font-size:1.7rem;
}
.khcr-form-card__intro>p{
  color:rgba(255,255,255,.73);
  margin:7px 0 18px;
  font-size:.88rem;
}
.khcr-form{display:grid;gap:14px}
.khcr-form__two{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.khcr-field{display:grid;gap:6px}
.khcr-field label{font-weight:750;font-size:.81rem}
.khcr-field input,
.khcr-field select,
.khcr-field textarea{
  width:100%;
  box-sizing:border-box;
  min-height:47px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:8px;
  background:#fff;
  color:#23352c;
  padding:10px 12px;
  font:inherit;
}
.khcr-field textarea{min-height:116px;resize:vertical}
.khcr-field small{color:rgba(255,255,255,.63);font-size:.68rem}
.khcr-form__actions{
  display:flex;
  align-items:center;
  gap:15px;
  flex-wrap:wrap;
}
.khcr-submit{
  appearance:none;
  border:0;
  border-radius:8px;
  background:#fff;
  color:var(--khcr-green);
  min-height:46px;
  padding:0 20px;
  font-weight:850;
  cursor:pointer;
}
.khcr-submit:hover{background:#f4efe4}
.khcr-form__actions p{
  margin:0;
  max-width:440px;
  color:rgba(255,255,255,.60);
  font-size:.69rem;
  line-height:1.45;
}
.khcr-form-note{
  border:1px solid var(--khcr-border);
  border-radius:12px;
  background:var(--khcr-ivory);
  color:var(--khcr-green);
  padding:16px;
}
.khcr-hero-rating{
  display:flex;
  align-items:center;
  gap:9px;
  margin:9px 0 15px;
  color:var(--khcr-muted);
  font-size:.78rem;
}
.khcr-hero-rating a{
  color:inherit;
  text-decoration:none;
  font-weight:700;
}
.khcr-hero-rating .khcr-stars span{font-size:.9rem}

/* Thai typography */
.kh-lang-th .khcr-eyebrow{
  text-transform:none;
  letter-spacing:0;
}
.kh-lang-th .khcr-heading h2,
.kh-lang-th .khcr-form-card h3{
  line-height:1.25;
}

@media(max-width:980px){
  .khcr-grid{
    grid-template-columns:220px minmax(0,1fr);
    gap:24px;
  }
  .khcr-list{
    grid-template-columns:1fr;
  }
}
@media(max-width:760px){
  .khcr-section{padding:48px 0}
  .khcr-grid{grid-template-columns:1fr;gap:20px}
  .khcr-summary{position:static}
}
@media(max-width:640px){
  .khcr-container{width:min(calc(100% - 30px),1180px)}
  .khcr-section{padding:40px 0 44px}
  .khcr-heading{align-items:flex-start;flex-direction:column;gap:7px;margin-bottom:22px}
  .khcr-heading h2{font-size:2.3rem}
  .khcr-write-link{padding:0}
  .khcr-review{padding:17px}
  .khcr-review__head{display:block}
  .khcr-review__head time{display:block;margin-top:7px}
  .khcr-form-card{padding:20px 16px}
  .khcr-form__two{grid-template-columns:1fr}
  .khcr-field input,
  .khcr-field select,
  .khcr-field textarea{font-size:16px}
  .khcr-form__actions{display:block}
  .khcr-submit{width:100%}
  .khcr-form__actions p{margin-top:10px}
}

/* v1.6 — Premium product-card review strip */
.khcr-card-rating{
  position:relative;
  display:grid;
  grid-template-columns:30px minmax(0,1fr) 18px;
  align-items:center;
  gap:9px;
  margin:10px 0 12px;
  padding:9px 10px;
  min-height:44px;
  border:1px solid rgba(185,151,91,.28);
  border-radius:11px;
  background:
    linear-gradient(135deg, rgba(250,248,243,.98), rgba(255,255,255,.98));
  box-shadow:0 3px 10px rgba(23,59,44,.035);
  color:var(--khcr-green);
  text-decoration:none!important;
  overflow:hidden;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease,
    background .18s ease;
}
.khcr-card-rating::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:3px;
  background:linear-gradient(180deg,#d2b06a,#a98139);
}
.khcr-card-rating:hover,
.khcr-card-rating:focus-visible{
  border-color:rgba(185,151,91,.52);
  background:#fffdf8;
  box-shadow:0 7px 18px rgba(23,59,44,.08);
  transform:translateY(-1px);
  color:var(--khcr-green);
}
.khcr-card-rating:focus-visible{
  outline:2px solid rgba(185,151,91,.45);
  outline-offset:2px;
}
.khcr-card-rating__icon{
  display:grid;
  place-items:center;
  width:29px;
  height:29px;
  border-radius:999px;
  background:linear-gradient(135deg,#c8a45a,#a9833e);
  color:#fff;
  font-size:.88rem;
  line-height:1;
  box-shadow:0 3px 8px rgba(185,151,91,.24);
}
.khcr-card-rating__content{
  display:grid;
  gap:3px;
  min-width:0;
}
.khcr-card-rating .khcr-stars{
  display:flex;
  gap:1px;
  line-height:1;
}
.khcr-card-rating .khcr-stars span{
  color:#d9d5cb;
  font-size:.76rem;
}
.khcr-card-rating .khcr-stars span.is-filled{
  color:var(--khcr-gold);
}
.khcr-card-rating__meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:4px;
  min-width:0;
  color:#647069;
  font-size:.69rem;
  line-height:1.25;
}
.khcr-card-rating__score{
  color:var(--khcr-green);
  font-size:.78rem;
  font-weight:850;
}
.khcr-card-rating__count{
  color:#6e7772;
  font-weight:650;
}
.khcr-card-rating__empty{
  color:#6b736f;
  font-weight:700;
}
.khcr-card-rating__arrow{
  color:var(--khcr-gold);
  font-size:.9rem;
  font-weight:900;
  transition:transform .18s ease;
}
.khcr-card-rating:hover .khcr-card-rating__arrow{
  transform:translateX(2px);
}

/* Cards with real social proof get a subtly stronger emphasis. */
.khcr-card-rating.has-reviews{
  border-color:rgba(185,151,91,.38);
  background:
    linear-gradient(135deg, rgba(251,247,237,.99), rgba(255,255,255,.99));
}
.khcr-card-rating.has-reviews .khcr-card-rating__icon{
  background:linear-gradient(135deg,#caa85e,#9e7833);
}

/* Empty-review cards remain inviting but visually quieter. */
.khcr-card-rating.no-reviews{
  border-color:rgba(23,59,44,.11);
  background:rgba(250,248,243,.72);
}
.khcr-card-rating.no-reviews::before{
  background:rgba(23,59,44,.22);
}
.khcr-card-rating.no-reviews .khcr-card-rating__icon{
  background:var(--khcr-sage);
  color:var(--khcr-green-2);
  box-shadow:none;
}
.khcr-card-rating.no-reviews .khcr-stars span{
  color:#d4d7d1;
}
.khcr-card-rating.no-reviews .khcr-card-rating__arrow{
  color:#87928b;
}

/* Keep the premium strip tidy inside KHINTAWAN custom cards. */
.kh-shop-card--v63 .khcr-card-rating,
.kh-search-product-card .khcr-card-rating,
.kh-pdp65-card .khcr-card-rating{
  width:100%;
  box-sizing:border-box;
}

.kh-lang-th .khcr-card-rating__meta{
  font-weight:600;
}

@media(max-width:640px){
  .khcr-card-rating{
    grid-template-columns:28px minmax(0,1fr) 16px;
    gap:8px;
    margin:8px 0 10px;
    padding:8px 9px;
    min-height:42px;
    border-radius:10px;
  }
  .khcr-card-rating__icon{
    width:27px;
    height:27px;
    font-size:.82rem;
  }
  .khcr-card-rating .khcr-stars span{
    font-size:.72rem;
  }
  .khcr-card-rating__meta{
    font-size:.66rem;
  }
}

/* v1.4 — dedicated review submission feedback */
.khcr-hp{
  position:absolute!important;
  left:-9999px!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
}
.khcr-notice{
  border-radius:9px;
  padding:12px 14px;
  margin:0 0 16px;
  font-size:.84rem;
  font-weight:700;
  line-height:1.45;
}
.khcr-notice--success{
  background:#eef6f0;
  border:1px solid rgba(36,77,58,.18);
  color:#1f5b3d;
}
.khcr-notice--error{
  background:#fff1ef;
  border:1px solid rgba(155,56,45,.18);
  color:#923c32;
}

/* v1.7.1 — Final review visual polish only */
.khcr-section{
  padding-bottom:52px;
}
.khcr-write-link{
  font-size:.82rem;
  font-weight:760;
  opacity:.86;
}
.khcr-write-link:hover{
  opacity:1;
}
.khcr-review{
  background:#fffdfa;
}
.khcr-review:hover{
  background:#fffaf2;
}
.khcr-review__author strong{
  color:#123829;
  font-weight:850;
}
.khcr-review__body{
  color:#48554d;
}
.khcr-section + .kh-pdp65-related,
.khcr-source + .kh-pdp65-related{
  margin-top:0!important;
}
@media(max-width:760px){
  .khcr-section{
    padding-bottom:38px;
  }
}

