/* ============================================================
   Product detail page — ts design (product-page-ts.html)
   Scoped under .td
   ============================================================ */
.td {
  --ink: #2b2622; --ink2: #5b544c; --ink3: #8a8178; --ink4: #a79c92;
  --green: #4f6e5c; --green-d: #41594b; --sale: #c9584a;
  --panel: #faf1ee; --panel2: #faf6f3; --line: #f1e7e1; --line2: #e4d9d2;
  --serif: 'Playfair Display', Georgia, serif;
  /* re-point theme accent vars to the ts green inside the detail page
     (site scheme resolves these to mauve #996DB2) */
  --accent-color-400: #4f6e5c; --accent-color-500: #41594b;
  --color-button-primary-background: #4f6e5c; --color-button-primary-border: #4f6e5c;
  --main-elements-color: #4f6e5c; --custom-accent-color-400: #4f6e5c;
  max-width: 1200px; margin: 0 auto; padding: 6px 0 64px;
  color: var(--ink); font-family: 'Inter', 'Lato', sans-serif;
}
.td * { box-sizing: border-box; }

/* ts-фон детальной страницы: розовый сверху → белый снизу (как в дизайне) */
body.td-page main { background: linear-gradient(180deg, #fdf1f2 0%, #fdf6f4 50%, #ffffff 100%) !important; }

.td__head { margin: 6px 0 18px; }
.td__title { font-family: var(--serif); font-weight: 500 !important; font-size: 30px !important; line-height: 1.15; letter-spacing: -.01em; color: var(--ink); margin: 0 0 6px; }
@media (min-width: 700px){ .td__title { font-size: 36px !important; } }
.td__sku { color: var(--ink4); font-size: 13px; }
/* код товара — неприметная строка под кнопкой/share */
.td .td__code { margin: 12px 0 0; font-size: 12px !important; line-height: 1.3; color: var(--ink4); white-space: nowrap; }
.td .td__code span { color: var(--ink4); font-size: 12px !important; }

/* ===== main panel ===== */
.td__main {
  background: #fff; border: 1px solid var(--line); border-radius: 28px;
  box-shadow: 0 20px 60px -30px rgba(60,40,30,.25);
  padding: 22px; display: grid; gap: 26px;
}
@media (min-width: 900px){ .td__main { grid-template-columns: 1.05fr 1fr; padding: 32px; gap: 40px; align-items: start; } }

/* ===== gallery ===== */
.td__stage { position: relative; aspect-ratio: 4/5; border-radius: 22px; overflow: hidden; background: var(--panel); }
@media (min-width: 900px){ .td__stage { aspect-ratio: 4/3; } }
.td__stage-img { width: 100%; height: 100%; object-fit: cover; }
.td__dims { position: absolute; inset: 16px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.td__dims[hidden] { display: none; }
.td__dim { align-self: center; background: rgba(255,255,255,.92); color: var(--ink); font-size: 12px; font-weight: 500; padding: 5px 11px; border-radius: 999px; box-shadow: 0 4px 10px -4px rgba(60,40,30,.3); }
.td__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.td__thumb { aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid #eee1da; background: var(--panel); padding: 0; cursor: pointer; }
.td__thumb.is-active { border: 2px solid var(--green); }
.td__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ===== buy box ===== */
.td__lead { color: var(--ink3); font-size: 14px; line-height: 1.5; margin: 0 0 20px; }

/* селектор размера (S/M/L/XL) из связанных товаров — как на ts */
.td__sizes { margin: 18px 0 4px; }
.td__sizes-label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.td__sizes-row { display: flex; flex-wrap: wrap; gap: 8px; }
.td__size { min-width: 46px; height: 46px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line2); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; transition: border-color .2s, background .2s, color .2s; }
.td__size:hover { border-color: var(--green); }
.td .td__size.is-active { border-color: var(--green); background: var(--green); color: #fff !important; }
/* один размер (нет связанных) — виден, но не кликается */
.td__size.is-static { cursor: default; pointer-events: none; }

/* reused price block */
.td .product-card__personal-cost { margin: 0 0 4px; }
.td .product-card__personal-cost > span { color: var(--ink3); font-size: 14px; }
.td .product-card__personal-cost > strong { font-family: var(--serif); font-weight: 500; font-size: 36px; color: var(--ink) !important; display: inline-block; line-height: 1.05; }
.td .product-card__main-cost { color: var(--ink4); }
.td .product-card__main-cost span { text-decoration: line-through; color: var(--ink4); }

/* size selector (modifications) */
.td .product-modification-container { margin: 18px 0 4px; display: flex; flex-direction: column; gap: 16px; }
.td .product-modification-params > span { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.td .product-mod-param { display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 999px; color: var(--ink); margin: 0 8px 8px 0; text-decoration: none; cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.td .product-mod-param:hover { border-color: var(--green); }
.td .product-mod-param.active { border-color: var(--green); background: var(--green); color: #fff; }
.td .product-card__select-options select { min-width: 160px; height: 46px; border: 1px solid var(--line2); border-radius: 12px; padding: 0 14px; background: #fff; color: var(--ink); }

/* qty + add-to-cart */
/* qty — своя строка; ниже [в корзину][share] (как на ts) */
.td .shopping-cart-product { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 20px; align-items: center; }
.td .shopping-cart-product .input-number, .td .shopping-cart-product .input-number--lg { grid-column: 1 / -1; justify-self: start; width: auto; }
.td .shopping-cart-product .shopping-cart-btn, .td .shopping-cart-product .not-for-sale, .td .shopping-cart-product .btn-border { grid-column: 1; width: 100% !important; min-width: 0; margin: 0 !important; }
.td .shopping-cart-product .td__share { grid-column: 2; }
.td .input-number, .td .input-number--lg { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 999px; background: #fff; padding: 4px; height: 56px; }
.td .input-number input { width: 46px; text-align: center; border: 0; background: transparent; font-size: 16px; font-weight: 600; color: var(--ink); -moz-appearance: textfield; }
.td .input-number input::-webkit-outer-spin-button, .td .input-number input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.td .order-down, .td .order-up { width: 42px; height: 42px; border-radius: 999px; background: var(--panel2); position: relative; cursor: pointer; }
/* +/− собираем сами, перебивая сайтовые псевдо (иначе «+» рендерится как «⌐») */
.td .order-down::before, .td .order-up::before, .td .order-up::after {
  content: '' !important; position: absolute !important; left: 50% !important; top: 50% !important;
  transform: translate(-50%, -50%) !important; background: var(--ink) !important;
  border: 0 !important; border-radius: 2px !important; margin: 0 !important;
}
.td .order-down::before, .td .order-up::before { width: 14px !important; height: 2px !important; }
.td .order-up::after { width: 2px !important; height: 14px !important; }
.td .order-down::after { display: none !important; }
.td .shopping-cart-btn, .td .shopping-cart-btn--lg {
  flex: 1 1 auto; min-height: 56px; display: inline-flex !important; align-items: center; justify-content: center; gap: 10px;
  padding: 0 30px !important; border-radius: 999px !important; background: var(--green) !important; color: #fff !important;
  font-weight: 600; font-size: 15px; border: 0 !important; text-decoration: none; transition: background .2s, transform .2s;
}
.td .shopping-cart-btn:hover { background: var(--green-d) !important; transform: translateY(-1px); }
.td .shopping-cart-btn:active { transform: scale(.97); }
/* клик по «в корзину» — пульс + чуть светлее (feedback) */
@keyframes td-cart-pop {
  0%   { transform: scale(1);    filter: brightness(1); }
  40%  { transform: scale(1.03); filter: brightness(1.2); }
  100% { transform: scale(1);    filter: brightness(1); }
}
.td .shopping-cart-btn.is-adding { animation: td-cart-pop .4s ease; }
.td .shopping-cart-btn .cart-icon { width: 20px; height: 20px; filter: brightness(0) invert(1); }
/* «Узнать цену» / нет в продаже. Тема (main.css) льёт `.button-theme { color: var(--color-text) !important }`
   — синий #2363d1 поверх нашего, поэтому цвет/фон/бордер форсим. */
.td .shopping-cart-product.not-available .btn-border, .td .not-for-sale {
  flex: 1 1 auto; min-height: 56px; display: inline-flex; align-items: center; justify-content: center; padding: 0 26px;
  border-radius: 999px; font-weight: 500; text-decoration: none;
  background: var(--green) !important;
  border: 1px solid var(--green) !important;
  color: #fff !important;
}
.td .shopping-cart-product.not-available .btn-border:hover, .td .not-for-sale:hover {
  background: var(--green-d) !important; border-color: var(--green-d) !important;
}

/* trust badges */
.td__trust { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 24px; }
@media (min-width: 560px){ .td__trust { grid-template-columns: repeat(4, 1fr); } }
.td__trust-item { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 14px 8px; border: 1px solid var(--line); border-radius: 18px; }
.td__trust-item svg { width: 22px; height: 22px; color: var(--green); stroke: var(--green); }
.td__trust-item span { font-size: 12px; line-height: 1.25; color: var(--ink2); }

/* ===== tabs ===== */
.td__tabs { margin-top: 40px; }
.td__tablist { display: flex; flex-wrap: wrap; gap: 30px; border-bottom: 1px solid var(--line); }
.td__tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 0 0 14px; margin-bottom: -1px; font-size: 16px; color: var(--ink3); cursor: pointer; font-family: inherit; transition: color .2s, border-color .2s; }
.td__tab:hover { color: var(--ink); }
.td__tab.is-active { color: var(--ink); border-bottom-color: var(--green); font-weight: 500; }
.td__panel { display: none; padding: 26px 0; }
.td__panel.is-active { display: block; }
.td__prose { color: var(--ink2); line-height: 1.7; }
.td__prose h2 { font-family: var(--serif); color: var(--ink); font-weight: 500 !important; font-size: 24px !important; }
.td__prose h3 { font-family: 'Inter', sans-serif !important; color: var(--ink); font-weight: 500 !important; font-size: 14px !important; }
.td__chars { display: grid; grid-template-columns: auto 1fr; gap: 12px 26px; max-width: 640px; margin: 0; }
.td__chars dt { color: var(--ink3); }
.td__chars dd { color: var(--ink); margin: 0; }

/* ===== section heading ===== */
.td__h2 { font-family: var(--serif); font-weight: 500 !important; font-size: 20px !important; color: var(--ink); margin: 40px 0 16px; }

/* ===== часто берут вместе ===== */
.td__extra-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px){ .td__extra-grid { grid-template-columns: repeat(3, 1fr); } }
.td__extra-card { position: relative; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.td__extra-link { position: absolute; inset: 0; z-index: 1; }
.td__extra-img { aspect-ratio: 1; background: var(--panel); overflow: hidden; }
.td__extra-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.td__extra-card:hover .td__extra-img img { transform: scale(1.05); }
.td__extra-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.td__extra-name { font-size: 14px; color: var(--ink); margin: 0; }
.td__extra-foot { margin-top: auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-direction: column; }
.td__extra-price { color: var(--green) !important; font-family: 'Inter','Lato',sans-serif; font-weight: 600; font-size: 15px; }
.td__extra-add { position: relative; z-index: 2; border: 1px solid var(--line2) !important; border-radius: 999px !important; padding: 8px 16px !important; font-size: 13px; font-weight: 500; color: var(--ink) !important; background: #fff !important; text-decoration: none; white-space: nowrap; transition: border-color .2s, color .2s; box-shadow: none !important; }
.td__extra-add:hover { border-color: var(--green) !important; color: var(--green) !important; background: #fff !important; }

/* ===== seo ===== */
.td__seo { margin-top: 24px; }
.td__seo-box { border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; background: transparent; }
.td__seo-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; cursor: pointer; font-family: 'Inter','Lato',sans-serif; font-size: 14px; font-weight: 500; color: var(--ink2); list-style: none; }
.td__seo-title::-webkit-details-marker { display: none; }
.td__seo-title::after { content: ''; flex: 0 0 auto; width: 9px; height: 9px; margin-right: 3px; border-right: 2px solid var(--ink3); border-bottom: 2px solid var(--ink3); transform: rotate(45deg); transition: transform .2s; }
.td__seo-box[open] .td__seo-title::after { transform: rotate(-135deg); }
.td__seo-box[open] .td__seo-title { border-bottom: 1px solid var(--line); }
.td__seo-box .td__prose { padding: 16px 0; font-size: 14px; }

/* ===== похожие ===== */
.td__similar-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px){ .td__similar-grid { grid-template-columns: repeat(3, 1fr); } }
.td__sim-card { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; text-decoration: none; display: block; transition: box-shadow .3s; }
.td__sim-card:hover { box-shadow: 0 16px 40px -24px rgba(60,40,30,.35); }
.td__sim-img { aspect-ratio: 4/5; background: var(--panel); overflow: hidden; }
.td__sim-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.td__sim-card:hover .td__sim-img img { transform: scale(1.05); }
.td__sim-body { padding: 14px; }
.td__sim-name { font-size: 14px; color: var(--ink); margin: 0 0 8px; line-height: 1.35; }
.td__sim-price { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--ink); margin: 0; }

/* ============================================================
   ts fixes — заголовок, иконка корзины, share, доп-чекбоксы, похожие
   ============================================================ */

/* 1. заголовок — убрать глобальный левый отступ h1 */
.td .td__title { margin-left: 0 !important; }

/* 2/6. битая иконка внутри зелёной кнопки «в корзину» — прячем (дизайн без иконки) */
.td .shopping-cart-btn .cart-icon,
.td .shopping-cart-btn .st-button__icon_cart { display: none !important; }

/* 6. кнопка share справа от «в корзину» (вставляется js в .shopping-cart-product) */
.td__share {
  flex: 0 0 auto; width: 56px; min-height: 56px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 999px;
  border: 1px solid var(--line2); background: #fff; color: var(--ink3);
  cursor: pointer; transition: border-color .2s, color .2s;
}
.td__share:hover, .td__share.is-copied { border-color: var(--green); color: var(--green); }
.td__share svg { width: 20px; height: 20px; }

/* нижний бар: [в корзину][share], под ними код (после блоков преимуществ) */
.td__buybar { margin-top: 24px; }
.td__buybar-row { display: flex; align-items: stretch; gap: 12px; }
.td__buybar-row .shopping-cart-btn, .td__buybar-row .not-for-sale, .td__buybar-row .btn-border { flex: 1 1 auto; width: auto !important; min-width: 0; margin: 0 !important; }
.td__buybar-row .td__share { flex: 0 0 56px; align-self: stretch; height: auto; }
.td__buybar .td__code { margin-top: 12px; }
/* блок цены теперь держит только количество; пустой (нет в наличии) — скрыть */
.td .shopping-cart-product:empty { display: none; margin: 0; }

/* 5. доп-товары чекбоксами (после количества) */
.td__addons { margin-top: 20px; background: var(--panel2); border-radius: 18px; padding: 16px 18px; }
.td__addons-title { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.td__addons-list { display: flex; flex-direction: column; gap: 12px; }
.td__addon { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 14px; color: var(--ink); }
.td__addon-l { display: inline-flex; align-items: center; gap: 10px; }
.td__addon-cb { position: absolute; opacity: 0; width: 0; height: 0; }
.td__addon-box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line2); display: inline-grid; place-items: center; flex: 0 0 auto; transition: background .15s, border-color .15s; }
.td__addon-box::after { content: ''; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translateY(-1px); opacity: 0; }
.td__addon-cb:checked + .td__addon-box { background: var(--green); border-color: var(--green); }
.td__addon-cb:checked + .td__addon-box::after { opacity: 1; }
.td__addon-cb:focus-visible + .td__addon-box { outline: 2px solid var(--green); outline-offset: 2px; }
.td__addon-name { line-height: 1.3; }
.td__addon-price { color: var(--ink3); font-size: 14px; white-space: nowrap; }

/* 4. похожие — карточка-тизер как на главной; выстраиваем в сетку */
.td__similar-grid .product-card-v2 { width: 100%; margin: 0; }

/* всплывающая плашка «Добавлено в корзину» (на body, вне .td — цвета хардкодом) */
.td-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  z-index: 1000; display: flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 999px; background: #fff;
  border: 1px solid #f1e7e1; box-shadow: 0 16px 44px -16px rgba(60,40,30,.4);
  font-family: 'Inter','Lato',sans-serif; font-size: 14px; color: #2b2622;
  opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .3s ease;
}
.td-toast.is-shown { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.td-toast__ico { width: 20px; height: 20px; color: #4f6e5c; flex: 0 0 auto; }
.td-toast__txt { font-weight: 500; }
.td-toast__link { color: #4f6e5c !important; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.td-toast__link:hover { color: #41594b !important; }

/* ============================================================
   Нет в наличии: плашка + цена остаётся обычной
   (price-block-orig льёт инлайновый style="color: grey" и лейбл
   «архивная цена», когда availability.is_avail == False)
   ============================================================ */
/* плашка стоит в строке лейбла «Цена» (js переносит её внутрь блока цены).
   Глобальная тема раздаёт p/span свои display/font-size/color с !important —
   поэтому здесь всё форсим, иначе бейдж рендерится прозрачным блоком. */
.td .td__oos, .td__oos {
  display: inline-flex !important; align-items: center; vertical-align: middle;
  margin: 0 0 0 8px !important; padding: 4px 12px !important; border-radius: 999px;
  background: #f4ebe6 !important; border: 0 !important;
  font-family: 'Inter','Lato',sans-serif; font-size: 12px !important; font-weight: 500 !important;
  line-height: 1.35 !important; white-space: nowrap; color: #9c6b4f !important;
}
/* пока js не перенёс — плашка своей строкой, без левого отступа */
.td__buy > .td__oos { margin: 0 0 10px !important; }
/* цена не бледнеет при отсутствии остатков */
.td .product-card__personal-cost > strong[style],
.td .product-card__main-cost strong[style] { color: var(--ink) !important; }



/* ============================================================
   Reviews (matches the Replit prototype /product-reviews)
   ============================================================ */
/* rating badge in the product head: mt-5 flex flex-wrap items-center gap-x-3 gap-y-2 rounded-2xl border bg-[#fffdfc] px-4 py-3 */.td__rating-badge { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 24px; padding: 12px 16px; border: 1px solid #f1e7e1; border-radius: 16px; background: #fffdfc; font-family: 'Inter', 'Lato', sans-serif; line-height: 24px; }.td__rating-badge-l { display: flex; align-items: center; gap: 8px; }.td__rating-badge .td__star { width: 20px; height: 20px; }.td__rating-badge-value { font-size: 16px !important; line-height: 24px !important; font-weight: 600; color: #2b2622 !important; }.td__rating-badge-count { font-size: 14px !important; line-height: 20px !important; color: #8a8178 !important; }.td__rating-badge-link { margin-left: auto; font-size: 14px !important; line-height: 20px !important; font-weight: 500; color: #4f6e5c !important; text-decoration: underline !important; text-decoration-color: #b8c9be; text-underline-offset: 4px; transition: color .15s; }.td__rating-badge-link:hover { color: #365143 !important; text-decoration-color: #b8c9be; }
.td__rating-badge { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 24px; padding: 12px 16px; border: 1px solid #f1e7e1; border-radius: 16px; background: #fffdfc; font-family: 'Inter', 'Lato', sans-serif; line-height: 24px; }
.td__rating-badge-l { display: flex; align-items: center; gap: 8px; }
.td__rating-badge .td__star { width: 20px; height: 20px; }
.td__rating-badge-value { font-size: 16px !important; line-height: 24px !important; font-weight: 600; color: #2b2622 !important; }
.td__rating-badge-count { font-size: 14px !important; line-height: 20px !important; color: #8a8178 !important; }
.td__rating-badge-link { margin-left: auto; font-size: 14px !important; line-height: 20px !important; font-weight: 500; color: #4f6e5c !important; text-decoration: underline !important; text-decoration-color: #b8c9be; text-underline-offset: 4px; transition: color .15s; }
.td__rating-badge-link:hover { color: #365143 !important; text-decoration-color: #b8c9be; }

.td__tab-count { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 6px; border-radius: 999px; background: var(--panel); color: var(--ink3) !important; font-size: 12px; font-weight: 500; line-height: 18px; text-align: center; vertical-align: 1px; }
.td__tab.is-active .td__tab-count { background: var(--green); color: #fff !important; }

.td__sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* star icon (lucide): empty = stroke #d9d1cb, on = fill+stroke #d6a94d */
.td__stars { display: inline-flex; align-items: center; gap: 2px; line-height: 1; }
.td__star { width: 14px; height: 14px; flex: none; color: #d9d1cb; fill: none; }
.td__star.is-on { color: #d6a94d; fill: #d6a94d; }

/* layout: lg:grid-cols-[380px_1fr] lg:gap-12 */
.td__reviews { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 48px; align-items: start; font-family: 'Inter', 'Lato', sans-serif; color: var(--ink); }
.td__reviews *, .td__reviews *::before, .td__reviews *::after { box-sizing: border-box; }
.td__reviews h2, .td__reviews h3, .td__reviews p { margin: 0; }

/* ---------- form card: rounded-2xl border bg-white p-5 sm:p-6 ---------- */
.td__rev-card { background: #fff; border: 1px solid #f1e7e1; border-radius: 16px; padding: 20px; line-height: 24px; box-shadow: none; height: fit-content; }
.td__rev-card-title { font-family: var(--serif) !important; font-weight: 400 !important; font-size: 24px !important; line-height: 32px !important; color: var(--ink) !important; letter-spacing: 0; }
.td__rev-card-sub { margin-top: 4px !important; font-size: 14px !important; line-height: 20px !important; color: #8a8178 !important; }
.td__rev-formbody { display: block; }
.td__rev-field { display: block; margin-top: 20px; }
.td__rev-label { display: block; font-size: 14px !important; line-height: 20px !important; font-weight: 500; color: var(--ink) !important; }
.td__rev-field input[type=text], .td__rev-field textarea { display: block; width: 100%; margin-top: 8px; padding: 12px 16px; border: 1px solid #e4d9d2; border-radius: 12px; background: #fff; font-family: inherit !important; font-size: 14px !important; line-height: 20px !important; color: var(--ink) !important; outline: none; box-shadow: none; transition: border-color .15s; }
.td__rev-field textarea { resize: none; height: 126px !important; min-height: 0 !important; }
.td__rev-field input[type=text]:focus, .td__rev-field textarea:focus { border-color: #4f6e5c; }
.td__rev-field ::placeholder { color: #a79c92; opacity: 1; }

.td__rate { margin-top: 8px; }
.td__rate-stars { display: flex; gap: 4px; margin: 0; padding: 0; }
.td__rate-stars .star { display: block; width: 36px; height: 36px; padding: 4px; margin: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; line-height: 0; }
.td__rate-stars .star:focus-visible { outline: 2px solid #4f6e5c; outline-offset: 0; }
.td__rate-stars .star .td__star { width: 28px; height: 28px; color: #d9d1cb; fill: none; }
.td__rate-stars .star.selected .td__star { color: #d6a94d; fill: #d6a94d; }

/* photo pill: mt-4 flex items-center gap-3 > label inline-flex gap-2 rounded-full border px-4 py-2.5 text-sm */
.td__rev-upload-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.td__rev-upload { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid #e4d9d2; border-radius: 999px; background: transparent; font-size: 14px !important; line-height: 20px !important; font-weight: 400 !important; color: var(--ink) !important; cursor: pointer; transition: border-color .15s, color .15s; }
.td__rev-upload:hover { border-color: #4f6e5c; color: #4f6e5c !important; }
.td__rev-upload svg { width: 16px; height: 16px; flex: none; }
.td__rev-upload.is-full { opacity: .5; pointer-events: none; }
.td__rev-previews { display: flex; flex-wrap: wrap; gap: 8px; }
.td__rev-previews:empty { display: none; }
.td__rev-preview { position: relative; width: 42px; height: 42px; border-radius: 10px; overflow: hidden; border: 1px solid #e4d9d2; }
.td__rev-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.td__rev-preview-rm { position: absolute; top: 1px; right: 1px; width: 16px; height: 16px; border: 0; border-radius: 50%; background: rgba(43,38,34,.7); color: #fff; font-size: 12px; line-height: 16px; cursor: pointer; padding: 0; }

.td__rev-error { margin-top: 16px !important; padding: 10px 12px; border-radius: 10px; background: #fbeae7; color: var(--sale) !important; font-size: 13px; line-height: 18px; }
.td__rev-submit { display: block; width: 100%; margin-top: 20px; padding: 14px 0; border: 0; border-radius: 999px; background: #4f6e5c !important; color: #fff !important; font-family: inherit !important; font-size: 14px !important; line-height: 20px !important; font-weight: 500 !important; cursor: pointer; box-shadow: none !important; text-transform: none !important; transition: background .15s, opacity .15s; }
.td__rev-submit:hover { background: #41594b; }
.td__rev-submit:disabled, .td__rev-submit.is-loading { opacity: .6; cursor: default; }
.td__rev-consent { margin-top: 12px !important; text-align: center; font-size: 12px !important; line-height: 16px !important; color: #a79c92 !important; }
.td__rev-note { margin-top: 20px !important; color: var(--ink2) !important; font-size: 14px !important; line-height: 20px !important; }
.td__rev-note a { color: #4f6e5c; text-decoration: underline; }
.td__rev-success { display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; padding: 16px; border-radius: 16px; border: 1px solid #dfe9e2; background: #f3f7f4; }
.td__rev-success-icon { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #4f6e5c; color: #fff !important; font-size: 15px; line-height: 28px; text-align: center; }
.td__rev-success-text { color: #365143 !important; font-size: 14px; line-height: 20px; font-weight: 500; }

/* ---------- summary: flex flex-wrap items-end justify-between gap-3 border-b pb-5 ---------- */
.td__rev-summary { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid #eee1da; }
.td__rev-title { font-family: var(--serif) !important; font-weight: 400 !important; font-size: 24px !important; line-height: 32px !important; color: var(--ink) !important; }
.td__rev-count { margin-top: 4px !important; white-space: nowrap; font-size: 14px !important; line-height: 20px !important; color: #8a8178 !important; }
.td__rev-avgbox { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.td__rev-avgbox > div { line-height: 24px; }
.td__rev-avgbox .td__stars { vertical-align: middle; }
.td__rev-avg { font-family: var(--serif); font-size: 30px; line-height: 36px; font-weight: 400; color: var(--ink) !important; }
.td__rev-avg-of { font-size: 12px !important; line-height: 16px !important; color: #a79c92 !important; }

/* ---------- list: divide-y, article py-6 ---------- */
.td__rev-list { display: block; }
.td__rev { padding: 24px 0; border-top: 1px solid #eee1da; }
.td__rev:first-child { border-top: 0; }
.td__rev-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.td__rev-author { font-family: inherit !important; font-size: 16px !important; line-height: 24px !important; font-weight: 500 !important; color: var(--ink) !important; }
.td__rev-rating { margin-top: 4px; }
.td__rev-date { font-size: 12px !important; line-height: 16px !important; color: #a79c92 !important; white-space: nowrap; }
.td__rev-text { margin-top: 12px; max-width: 672px; font-size: 14px !important; line-height: 1.625 !important; color: #5b544c !important; }
.td__rev-text p { margin: 0 0 8px; font-size: inherit !important; line-height: inherit !important; color: inherit !important; }
.td__rev-text p:last-child { margin-bottom: 0; }

.td__rev-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.td__rev-photo { display: block; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; border: 0; }
.td__rev-photo:focus-visible { outline: 2px solid #4f6e5c; }
.td__rev-photo img { width: 96px; height: 96px; object-fit: cover; display: block; transition: transform .15s; }
.td__rev-photo:hover img { transform: scale(1.05); }

/* reply: mt-5 rounded-2xl border #dfe9e2 bg #f3f7f4 px-4 py-4 sm:px-5 */
.td__rev-reply { margin-top: 20px; padding: 16px; border: 1px solid #dfe9e2; border-radius: 16px; background: #f3f7f4; }
.td__rev-reply-head { display: flex; align-items: center; gap: 12px; }
.td__rev-reply-avatar { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: #4f6e5c; color: #fff !important; font-family: var(--serif); font-size: 16px; line-height: 24px; font-weight: 400; }
.td__rev-reply-author { font-size: 14px !important; line-height: 20px !important; font-weight: 600; color: #365143 !important; }
.td__rev-reply-label { font-size: 12px !important; line-height: 16px !important; color: #8a8178 !important; }
.td__rev-reply-text { margin-top: 12px; font-size: 14px !important; line-height: 1.625 !important; color: #5b544c !important; }
.td__rev-reply-text p { margin: 0 0 6px; font-size: inherit !important; line-height: inherit !important; color: inherit !important; }
.td__rev-reply-text p:last-child { margin: 0; }

.td__rev-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 12px !important; line-height: 16px !important; color: #a79c92 !important; }
.td__rev-foot > span:first-child { color: #a79c92 !important; }
.td__rev-vote { color: #5b544c !important; text-decoration: underline; text-underline-offset: 3px; }
.td__rev-vote:hover { color: #4f6e5c !important; }
.td__rev-adv { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #f3f7f4; color: #8a8178 !important; text-align: center; font-weight: 500; }
.td__rev-adv.is-pos { color: #4f6e5c !important; }
.td__rev-adv.is-neg { background: #f8e5e2; color: var(--sale) !important; }
.td__rev-foot.is-voted .td__rev-vote { text-decoration: none; color: #a79c92 !important; cursor: default; }
.td__rev-foot.is-voted .td__rev-vote.is-active { color: #4f6e5c !important; font-weight: 500; }
.td__rev-vote-note { font-size: 12px; color: #a79c92 !important; }

/* lightbox */
.td__lightbox { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; background: rgba(20,16,14,.88); padding: 40px; }
.td__lightbox[hidden], .td__rev-success[hidden], .td__rev-error[hidden] { display: none !important; }
.td__lightbox-img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.td__lightbox-close, .td__lightbox-prev, .td__lightbox-next { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; border-radius: 50%; width: 44px; height: 44px; font-size: 28px; line-height: 44px; text-align: center; padding: 0; transition: background .2s; }
.td__lightbox-close:hover, .td__lightbox-prev:hover, .td__lightbox-next:hover { background: rgba(255,255,255,.25); }
.td__lightbox-close { top: 16px; right: 16px; }
.td__lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.td__lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
body.td-lightbox-open { overflow: hidden; }

@media (min-width: 640px) {
  .td__rev-card { padding: 24px; }
  .td__rev-reply { padding: 16px 20px; }
}
@media (max-width: 1023px) {
  .td__reviews { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .td__lightbox { padding: 12px; }
  .td__lightbox-prev, .td__lightbox-next { width: 36px; height: 36px; line-height: 36px; font-size: 22px; }
}

/* optional email field in the review form */
.td__rev-optional { font-weight: 400 !important; color: var(--ink4) !important; font-size: 12px !important; }
.td__rev-hint { display: block; margin-top: 6px; font-size: 12px !important; line-height: 1.4; color: var(--ink4) !important; }
.td__rev-field input[type=email] { display: block; width: 100%; margin-top: 8px; padding: 12px 16px; border: 1px solid #e4d9d2; border-radius: 12px; background: #fff; font-family: inherit !important; font-size: 14px !important; line-height: 20px !important; color: var(--ink) !important; outline: none; transition: border-color .15s; }
.td__rev-field input[type=email]:focus { border-color: #4f6e5c; }
