/* treatments.css — the treatment menu, technology, packages, what's new and
   skincare pages. Same editorial language as the home page: photograph-led
   cards on a 4:3 crop, hairline rules, generous whitespace, squared CTAs.
   Prefix .tr- */

.tr-page { display: block; min-width: 0; }
.tr-page.shell { width: min(var(--st-shell), 100%); max-width: var(--st-shell); padding-inline: var(--st-gutter); }
.tr-page .st-section { padding: clamp(40px, 5vw, 72px) 0; }

/* ------------------------------------------------------------- toolbars */

.tr-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 18px 0; border-bottom: 1px solid var(--line); margin-bottom: 30px;
}
.tr-search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 4px 4px 14px; flex: 1 1 280px; min-width: 0; }
.tr-search .input { border: 0; background: none; min-height: 40px; }
.tr-search svg { width: 17px; height: 17px; color: var(--ink-faint); flex: none; }
.tr-toolbar .select { border-radius: 8px; min-height: 46px; flex: 0 1 220px; }
.tr-tabs { flex-wrap: wrap; overflow: visible; }
.tr-tabs button { white-space: normal; max-width: 100%; padding-block: 10px; }
.tr-mobile-category { display: none; }
.tr-concern-filter { border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tr-concern-filter summary { display: flex; align-items: center; gap: 10px; padding: 0 0 18px; list-style: none; cursor: pointer; font-size: .88rem; font-weight: 600; }
.tr-concern-filter summary::-webkit-details-marker { display: none; }
.tr-concern-filter summary > svg:last-child { margin-left: auto; transition: transform .2s var(--ease); }
.tr-concern-filter[open] summary > svg:last-child { transform: rotate(180deg); }
.tr-active-concern { color: var(--aqua-text); font-size: .8rem; overflow-wrap: anywhere; }
.tr-concerns { padding-bottom: 20px; }
.tr-concerns .chip { max-width: 100%; white-space: normal; padding-block: 8px; text-align: left; }

.tr-head { display: grid; gap: 14px; margin-bottom: 32px; }
.tr-head > * { margin: 0; }
.tr-head h1 { line-height: 1.2; }
.tr-group { margin-bottom: 52px; }
.tr-group-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px 24px; margin-bottom: 22px; }
.tr-group-head h2 { margin: 0; }
.tr-group-head p { grid-column: 1; margin: 0; max-width: 62ch; }
.tr-group-head > a { grid-column: 2; grid-row: 1 / span 2; font-size: .8rem; max-width: 230px; overflow-wrap: anywhere; }
.tr-group-head h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.tr-crumbs { font-size: 12.5px; letter-spacing: .04em; color: var(--ink-faint); margin-bottom: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- cards */

/* .tr-grid holds the category groups, one under another — the cards inside each
   group use base.css's .grid.grid-3. */
.tr-grid { display: grid; gap: clamp(44px, 5vw, 68px); }
.tr-list { display: block; }
/* Keep readable card widths while adapting to phone, tablet and desktop. */
.tr-list .tr-grid > .grid, .tr-group .grid, .tr-skincare .grid, .tr-technology .grid, .tr-packages .grid, .tr-related .grid, .tr-machine-page .grid {
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 34px 24px;
}

.tr-card {
  position: relative; background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0;
  display: flex; flex-direction: column; min-width: 0; height: 100%;
}
.tr-card:hover { box-shadow: none; transform: none; }
.tr-card-media {
  position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--radius-sm); background: var(--aqua-tint);
}
.tr-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.tr-card-media:has(.tr-card-cat)::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(5, 39, 46, .64)); pointer-events: none; z-index: 1; }
.tr-machine .tr-card-media img { object-fit: contain !important; padding: 18px; }
.tr-card:hover .tr-card-media img { transform: scale(1.045); }
.tr-machine .tr-card-media:has(img[data-photo="machine_m_hifu"]) { background: none; border-radius: 0; }
.tr-machine .tr-card-media img[data-photo="machine_m_hifu"] { padding: 0; transform: none; }
.tr-card-badge { position: absolute; top: 11px; left: 11px; z-index: 2; max-width: calc(100% - 22px); white-space: normal; line-height: 1.5; }
.tr-package-preview .tr-preview-badges { position: absolute; top: 11px; left: 11px; right: 11px; z-index: 2; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 10px; }
.tr-package-preview .tr-preview-badges .tag { max-width: 100%; padding: 4px 10px; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
.tr-badge-right { left: auto; right: 11px; }
.tr-card-cat {
  position: absolute; left: 11px; right: 11px; bottom: 11px; z-index: 2; font-size: 10.5px; letter-spacing: .16em; line-height: 1.5;
  text-transform: uppercase; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}
.tr-card-body { padding: 18px 2px 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tr-card-name { font-family: var(--font-body); font-size: 15.5px; font-weight: 600; line-height: 1.45; margin: 0; overflow-wrap: anywhere; }
.tr-card-name a { color: inherit; }
.tr-card-name a:hover { border-bottom: 1px solid currentColor; }
.tr-card-desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 12.8px; line-height: 1.6; margin: 0;
}
.tr-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; line-height: 1.5; color: var(--ink-faint); }
.tr-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.tr-meta-item svg { width: 14px; height: 14px; }
.tr-card-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tr-card-foot > * { min-width: 0; }
.tr-price { display: grid; gap: 6px; overflow-wrap: anywhere; }
.tr-new-item, .tr-new-item > * { min-width: 0; }
.tr-price { font-variant-numeric: tabular-nums; font-size: 15px; }
.tr-price-note { font-size: 12.5px; color: var(--ink-faint); }
.tr-card-foot .btn { border-radius: 2px; }

/* Packages read as a priced card with the saving called out. */
.tr-pkg { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; padding: 0; min-width: 0; height: 100%; }
.tr-pkg:hover { transform: none; }
.tr-packages .grid { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.tr-pkg .tr-card-media { border-radius: 0; aspect-ratio: 16 / 9; flex: none; width: 100%; }
.tr-pkg-head { padding: 24px 24px 0; display: grid; gap: 18px; }
.tr-pkg-head > * { min-width: 0; margin: 0; }
.tr-pkg-tags { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-start; }
.tr-pkg-tags .tag { padding: 6px 12px; line-height: 1.5; white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.tr-pkg-head > a { line-height: 1.6; overflow-wrap: anywhere; }
.tr-pkg-body { padding: 20px 24px 0; display: grid; gap: 16px; }
.tr-pkg-body > p { margin: 0; }
.tr-pkg-name { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.35; overflow-wrap: anywhere; }
.tr-pkg-foot { padding: 24px; margin-top: auto; display: grid; gap: 12px; }
.tr-pkg-price { display: grid; gap: 8px; font-variant-numeric: tabular-nums; font-size: 1.35rem; line-height: 1.4; }
.tr-pkg-foot .btn { border-radius: 2px; width: 100%; }
@media (min-width: 696px) {
  /* Keep prices aligned when one course description wraps to a second line. */
  .tr-packages .tr-pkg-body > p.small { min-height: 3.2em; line-height: 1.6; }
}

.tr-machine-thumb { width: 54px; height: 54px; border-radius: 8px; overflow: hidden; flex: none; }
.tr-machine-thumb img { width: 100%; height: 100%; object-fit: contain !important; padding: 4px; }
.tr-machine-thumb:has(img[data-photo="machine_m_hifu"]) { background: none; border-radius: 0; }
.tr-machine-thumb img[data-photo="machine_m_hifu"] { padding: 0; }
.tr-machine-inline {
  display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
}
.tr-machine-inline > .grow { display: grid; gap: 8px; min-width: 0; }
.tr-machine-inline > .grow > * { margin: 0; }

/* --------------------------------------------------------------- detail */

.tr-detail-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; margin-bottom: clamp(32px, 5vw, 56px); }
.tr-detail-hero > * { min-width: 0; }
.tr-detail-media { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--aqua-tint); }
.tr-detail-media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .tr-detail-hero { grid-template-columns: minmax(0, 1fr); } .tr-detail-media { border-radius: var(--radius-sm); } }

.tr-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 54px; align-items: start; }
.tr-detail-main { min-width: 0; display: grid; gap: 34px; }
.tr-detail-side { position: sticky; top: 110px; display: grid; gap: 16px; min-width: 0; }
@media (max-width: 980px) {
  .tr-detail-grid { grid-template-columns: 1fr; gap: 34px; }
  .tr-detail-side { position: static; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
}

.tr-detail-intro { display: grid; gap: 16px; font-size: 1.08rem; line-height: 1.65; color: var(--ink-soft); max-width: 62ch; }
.tr-detail-intro > * { margin: 0; }
.tr-detail-new { justify-self: start; max-width: 100%; white-space: normal; line-height: 1.5; }
.tr-detail-price { font-family: var(--font-display); font-size: 2rem; font-variant-numeric: tabular-nums; }
.tr-detail-intro .display-l { line-height: 1.2; overflow-wrap: anywhere; }
.tr-detail-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 12px; padding: 4px 0; }
.tr-detail-ctas { display: grid; gap: 10px; }
.tr-detail-ctas .btn { border-radius: 2px; width: 100%; }
.tr-detail-intro .tr-detail-ctas { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); margin-top: 4px; }
.tr-side-book, .tr-side-pkg { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--surface); display: grid; gap: 16px; }
.tr-side-book > *, .tr-side-pkg > * { margin: 0; }
.tr-side-pkg { background: var(--aqua-tint); border-color: transparent; gap: 18px; }

.tr-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tr-fact { background: var(--surface); padding: 16px 18px; display: grid; gap: 8px; }
.tr-fact-k { display: flex; align-items: center; gap: 7px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.tr-fact { min-width: 0; overflow-wrap: anywhere; }
.tr-fact-v { font-size: .98rem; line-height: 1.5; }

.tr-block { display: grid; gap: 12px; }
.tr-block h2 { font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
.tr-steps { display: grid; gap: 12px; margin: 0; padding-left: 24px; }
.tr-steps li { padding-left: 4px; }
.tr-down { color: var(--warn); }
.tr-aftercare { padding: 18px 20px; border-left: 2px solid var(--aqua-deep); background: var(--aqua-tint); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.tr-aftercare { list-style: none; display: grid; gap: 12px; margin: 0; }
.tr-aftercare li { display: flex; align-items: flex-start; gap: 10px; }
.tr-aftercare li svg { margin-top: 4px; }
.tr-related { border-top: 1px solid var(--line); padding-top: 40px; }
.tr-summary { color: var(--ink-soft); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }

/* ------------------------------------------- what's new, tech, skincare */

.tr-new-list { display: grid; gap: 34px 24px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); align-items: stretch; }
.tr-new-item { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; }
.tr-new-when { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.tr-machine-page .tr-detail-media { aspect-ratio: 16 / 9; }
.tr-machine-page .tr-detail-media img { object-fit: contain !important; padding: 24px; }
.tr-machine-page .tr-detail-media:has(img[data-photo="machine_m_hifu"]) {
  background: none; border: 0; border-radius: 0; aspect-ratio: auto;
  height: clamp(340px, 55vw, 620px);
}
.tr-machine-page .tr-detail-media img[data-photo="machine_m_hifu"] { padding: 0; }
.tr-new-when { display: flex; align-items: center; gap: 8px; }
.tr-product .tr-card-media { aspect-ratio: 1; }
.tr-skincare .tr-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

@media (max-width: 620px) {
  .tr-tabs { display: none; }
  .tr-mobile-category { display: block; margin-bottom: 16px; }
  .tr-toolbar { gap: 10px; padding-top: 0; margin-bottom: 22px; }
  .tr-toolbar .select { flex: 1 1 100%; }
  .tr-head { margin-bottom: 28px; }
  .tr-group-head { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tr-group-head > a { grid-column: 1; grid-row: auto; max-width: 100%; }
  .tr-group { margin-bottom: 0; }
  .tr-grid, .tr-new-list { gap: 36px; }
  /* Two cards across a 390px phone leaves ~170px each — enough for a photograph
     and a price, not for a package's tags and a wrapped button. */
  .tr-packages .grid { grid-template-columns: minmax(0, 1fr); }
  .tr-pkg-head, .tr-pkg-foot, .tr-pkg-foot > * { min-width: 0; }
  .tr-pkg-head { padding: 20px 20px 0; }
  .tr-pkg-body { padding: 18px 20px 0; }
  .tr-pkg-foot { padding: 22px 20px 20px; }
  .tr-card-foot .btn, .tr-pkg-foot .btn { font-size: .84rem; }
  .tr-card-desc { display: none; }
  .tr-card-foot { flex-direction: column; align-items: stretch; gap: 12px; }
  .tr-card-foot .btn { width: 100%; }
}

@media (max-width: 620px) {
  .tr-head h1, .tr-detail-intro .display-l { font-size: clamp(1.75rem, 7.5vw, 2.2rem); line-height: 1.25; }
  .tr-detail-intro { font-size: 1rem; gap: 18px; }
  .tr-meta { gap: 10px 18px; line-height: 1.6; }
  .tr-meta-item { align-items: flex-start; min-width: 0; }
  .tr-meta-item svg { flex: none; margin-top: 3px; }
  .tr-card-foot .btn { min-height: 44px; }
  .tr-pkg-tags { gap: 12px; }
  .tr-new-when { line-height: 1.6; overflow-wrap: anywhere; }
}
