/*
  "Timeless Radiance" design system (doc/DESIGN.md), scoped to the setting-first
  engagement-ring configurator funnel via the .tr-theme wrapper class. Does not
  affect Home, Knowledge, or the older Setting_* wizard.
*/

.tr-theme {
  --tr-surface: #fcf9f8;
  --tr-surface-dim: #dcd9d9;
  --tr-surface-bright: #fcf9f8;
  --tr-surface-container-lowest: #ffffff;
  --tr-surface-container-low: #f6f3f2;
  --tr-surface-container: #f0eded;
  --tr-surface-container-high: #eae7e7;
  --tr-surface-container-highest: #e5e2e1;
  --tr-on-surface: #1c1b1b;
  --tr-on-surface-variant: #524345;
  --tr-inverse-surface: #313030;
  --tr-inverse-on-surface: #f3f0ef;
  --tr-outline: #857374;
  --tr-outline-variant: #d7c1c3;

  --tr-primary: #340411;
  --tr-on-primary: #ffffff;
  --tr-primary-container: #f6e9ea;
  --tr-secondary: #c8a278;
  --tr-on-secondary: #1a1a1a;
  --tr-charcoal: #1a1a1a;
  --tr-pearl-white: #ffffff;

  --tr-error: #ba1a1a;
  --tr-on-error: #ffffff;

  --tr-font-display: 'Playfair Display', serif;
  --tr-font-body: 'Inter', sans-serif;

  --tr-radius-sm: 0.125rem;
  --tr-radius: 0.25rem;
  --tr-radius-md: 0.375rem;
  --tr-radius-lg: 0.5rem;
  --tr-radius-xl: 0.75rem;
  --tr-radius-full: 9999px;

  --tr-unit: 8px;
  --tr-container-max: 1280px;
  --tr-gutter: 24px;
  --tr-margin-mobile: 16px;
  --tr-section-gap: 80px;

  --tr-shadow-card: 0 12px 32px rgba(28, 27, 27, 0.06);
  --tr-shadow-card-hover: 0 16px 40px rgba(28, 27, 27, 0.1);

  /* Page canvas matches the site's global background (main.css --background-color)
     rather than the --tr-surface cream token, so flow/diamond pages read
     consistently with the rest of the site. */
  background: var(--background-color);
  color: var(--tr-on-surface);
  font-family: var(--tr-font-body);
}

.tr-theme h1,
.tr-theme h2,
.tr-theme h3,
.tr-theme .tr-heading {
  font-family: var(--tr-font-display);
  font-weight: 400;
  color: var(--tr-on-surface);
  letter-spacing: -0.01em;
}

.tr-theme h1 {
  font-size: 40px;
  line-height: 1.15;
}

.tr-theme h2 {
  font-size: 32px;
  line-height: 1.2;
}

.tr-theme h3 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 500;
}

.tr-theme .tr-eyebrow {
  font-family: var(--tr-font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tr-on-surface-variant);
}

.tr-theme .tr-lede {
  font-family: var(--tr-font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--tr-on-surface-variant);
}

/* Container */
.tr-theme .tr-container {
  max-width: var(--tr-container-max);
  margin: 0 auto;
  padding: 0 var(--tr-margin-mobile);
}

@media (min-width: 992px) {
  .tr-theme .tr-container {
    padding: 0 var(--tr-gutter);
  }
}

/* Buttons */
.tr-theme .tr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--tr-radius);
  font-family: var(--tr-font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tr-theme .tr-btn-primary {
  background: var(--tr-primary);
  color: var(--tr-on-primary);
}

.tr-theme .tr-btn-primary:hover {
  background: #4a0a1c;
  color: var(--tr-on-primary);
}

.tr-theme .tr-btn-primary:disabled {
  background: var(--tr-outline-variant);
  color: var(--tr-on-surface-variant);
  cursor: not-allowed;
}

.tr-theme .tr-btn-outline {
  background: transparent;
  color: var(--tr-charcoal);
  border-color: var(--tr-secondary);
}

.tr-theme .tr-btn-outline:hover {
  background: var(--tr-surface-container-low);
  color: var(--tr-charcoal);
}

/* Step progress bar */
.tr-theme .tr-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: var(--tr-surface-container-lowest);
  border: 1px solid var(--tr-surface-container-high);
  border-radius: var(--tr-radius-lg);
  overflow: hidden;
}

.tr-theme .tr-step {
  flex: 1 1 0;
  min-width: 140px;
  padding: 14px 18px;
  border-right: 1px solid var(--tr-surface-container-high);
  font-family: var(--tr-font-body);
}

.tr-theme .tr-step:last-child {
  border-right: none;
}

.tr-theme .tr-step-index {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tr-outline);
}

.tr-theme .tr-step.active .tr-step-index {
  color: var(--tr-primary);
}

.tr-theme .tr-step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--tr-on-surface);
  margin-top: 2px;
}

.tr-theme .tr-step-meta {
  font-size: 12px;
  color: var(--tr-on-surface-variant);
  margin-top: 2px;
}

/* Cards */
.tr-theme .tr-card {
  background: var(--tr-surface-container-lowest);
  border-radius: var(--tr-radius-lg);
  box-shadow: var(--tr-shadow-card);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tr-theme .tr-card:hover {
  box-shadow: var(--tr-shadow-card-hover);
  transform: translateY(-2px);
}

.tr-theme .tr-card-image {
  aspect-ratio: 1 / 1;
  background: var(--tr-surface-container-low);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tr-theme .tr-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Cursor-following hover zoom (Setting Detail hero image). The container's
   overflow: hidden (above) clips the scaled-up image. Cursor is a bare "+"
   mark (white outline under a thinner burgundy line, no circle/background)
   so it stays legible over the product photo without adding visual weight. */
.tr-theme .tr-zoom {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cg fill='none' stroke='white' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M10 3v14M3 10h14'/%3E%3C/g%3E%3Cg stroke='%23340411' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M10 3v14M3 10h14'/%3E%3C/g%3E%3C/svg%3E") 10 10, zoom-in;
}

.tr-theme .tr-zoom-img {
  transition: transform 0.15s ease;
}

.tr-theme .tr-zoom-img--active {
  transform: scale(2);
}

/* Smaller product photo (Diamond Detail) — less aggressive zoom so the
   magnified crop doesn't blow past the source image's own resolution/detail. */
.tr-theme .tr-zoom-img--active.tr-zoom-img--subtle {
  transform: scale(1.5);
}

/* Prev/next arrows overlaid on a product image (e.g. Setting Detail hero) —
   bare chevrons only, nothing that competes visually with the ring itself. */
.tr-theme .tr-image-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px;
  border: none;
  background: none;
  color: var(--tr-on-surface-variant);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  filter: drop-shadow(0 1px 2px rgba(28, 27, 27, 0.25));
  transition: color 0.15s ease;
}

.tr-theme .tr-image-nav-btn:hover {
  color: var(--tr-primary);
}

.tr-theme .tr-image-nav-btn--prev {
  left: 12px;
}

.tr-theme .tr-image-nav-btn--next {
  right: 12px;
}

.tr-theme .tr-card-image-hover-swap {
  position: relative;
}

.tr-theme .tr-card-image-hover-swap img {
  position: absolute;
  inset: 0;
  transition: opacity 0.25s ease;
}

.tr-theme .tr-card-image-hover-swap .tr-card-image-hover {
  opacity: 0;
}

.tr-theme .tr-card:hover .tr-card-image-hover-swap .tr-card-image-hover {
  opacity: 1;
}

.tr-theme .tr-card-body {
  padding: 16px 18px 20px;
}

.tr-theme .tr-card-title {
  font-family: var(--tr-font-display);
  font-size: 18px;
  color: var(--tr-on-surface);
  margin-bottom: 4px;
}

.tr-theme .tr-card-meta {
  font-size: 13px;
  color: var(--tr-on-surface-variant);
}

.tr-theme .tr-card-price {
  font-family: var(--tr-font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--tr-primary);
  margin-top: 8px;
}

/* Chips / filter options */
.tr-theme .tr-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--tr-radius-md);
  border: 1px solid var(--tr-outline-variant);
  background: var(--tr-surface-container-lowest);
  color: var(--tr-on-surface);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.tr-theme .tr-chip.active {
  border-color: var(--tr-primary);
  background: var(--tr-primary-container);
  color: var(--tr-primary);
}

.tr-theme .tr-chip img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* Shared ring-configurator flow header (app-ring-flow-header): bordered
   box stepper matching abovediamond.com/engagement-rings, used identically
   on every page in the flow (setting-selection, setting-detail,
   engagement-ring, diamond-detail, engagement-summary). */

/* Standalone breadcrumb trail for pages rooted directly in .tr-theme (cart,
   favorites) that already render their own <h1> — the site's .breadcrumbs
   CSS in main.css is scoped under .page-title, which these pages don't have,
   so the layout/colors are redefined here instead. */
.tr-theme .tr-breadcrumb-slim {
  margin-bottom: 16px;
}

.tr-theme .tr-breadcrumb-slim ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}

.tr-theme .tr-breadcrumb-slim ol li a {
  color: var(--tr-secondary);
  text-decoration: none;
}

.tr-theme .tr-breadcrumb-slim ol li a:hover {
  text-decoration: underline;
}

.tr-theme .tr-breadcrumb-slim ol li.current {
  color: var(--tr-on-surface);
}

.tr-theme .tr-breadcrumb-slim ol li + li {
  padding-left: 10px;
}

.tr-theme .tr-breadcrumb-slim ol li + li::before {
  content: "/";
  display: inline-block;
  padding-right: 10px;
  color: var(--tr-outline-variant);
}

.tr-theme .tr-flow-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--tr-surface-container-lowest);
  border: 1px solid var(--tr-outline-variant);
  border-radius: var(--tr-radius-lg);
  padding: 10px 20px;
  margin-bottom: 18px;
}

.tr-theme .tr-flow-header-label {
  font-family: var(--tr-font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--tr-on-surface-variant);
  padding-right: 20px;
  border-right: 1px solid var(--tr-outline-variant);
}

.tr-theme .tr-flow-step {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.tr-theme .tr-flow-step-title {
  font-family: var(--tr-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--tr-outline);
}

.tr-theme .tr-flow-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-right: 4px;
  font-size: 11px;
}

.tr-theme .tr-flow-step-meta {
  font-size: 12px;
  color: var(--tr-outline);
}

.tr-theme .tr-flow-step.active .tr-flow-step-title {
  color: var(--red-color);
}

.tr-theme .tr-flow-step.active .tr-flow-step-meta {
  color: color-mix(in srgb, var(--red-color), transparent 25%);
}

.tr-theme .tr-flow-step.active .tr-flow-step-number {
  background: var(--red-color);
  color: #fff;
}

.tr-theme .tr-flow-chevron {
  color: var(--tr-outline-variant);
  font-size: 14px;
}

.tr-theme .tr-flow-icon {
  margin-left: 4px;
  color: var(--tr-secondary);
  font-size: 20px;
}

/* Sidebar filters */
.tr-theme .tr-sidebar {
  margin-bottom: 24px;
}

@media (min-width: 992px) {
  .tr-theme .tr-sidebar {
    position: sticky;
    /* Offset below the sticky site header (--header-height, main.css) so
       this doesn't stick underneath it. */
    top: calc(var(--header-height) + 24px);
    align-self: flex-start;
    margin-bottom: 0;
    /* Cap height to the viewport so tall sidebars (Material + Color + Shape +
       Setting) get their own scroll instead of having their lower sections
       permanently clipped by the viewport edge while pinned. */
    max-height: calc(100vh - var(--header-height) - 48px);
    overflow-y: auto;
  }
}

/* Two-column pages where the left/product-summary column is often shorter
   than the right/interactive column (setting-detail, diamond-detail,
   engagement-summary, cart): pin the left column in view on desktop as the
   page scrolls, rather than leaving a static empty gap below it. Naturally
   a no-op when the left column ends up taller (e.g. a long cart) — sticky
   only has a visible effect when there's a gap to close. No height cap
   needed here (unlike .tr-sidebar) — the pinned content is bounded and
   rarely exceeds the viewport. */
.tr-theme .tr-sticky-col {
  margin-bottom: 24px;
}

@media (min-width: 992px) {
  .tr-theme .tr-sticky-col {
    position: sticky;
    /* Offset below the sticky site header (--header-height, main.css) so
       this doesn't stick underneath it. */
    top: calc(var(--header-height) + 24px);
    align-self: flex-start;
    margin-bottom: 0;
  }
}

/* Top filter bar (setting-selection): Material/Color/Shape/Setting sit in a
   row of columns above the results grid instead of a left sidebar. */
.tr-theme .tr-filter-bar {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--tr-outline-variant);
}

.tr-theme .tr-filter-bar > * + * {
  margin-top: 24px;
}

.tr-theme .tr-filter-section {
  margin-bottom: 18px;
}

.tr-theme .tr-filter-section:last-child {
  margin-bottom: 0;
}

.tr-theme .tr-filter-title {
  font-family: var(--default-font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: #3e1020;
  margin-bottom: 8px;
}

.tr-theme .tr-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tr-theme .tr-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--tr-on-surface);
  cursor: pointer;
}

.tr-theme .tr-checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--tr-primary);
  cursor: pointer;
}

.tr-theme .tr-filter-tile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tr-theme .tr-filter-tile {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 64px;
  min-height: 76px;
  padding: 12px 10px;
  border: 1px solid var(--tr-outline-variant);
  border-radius: var(--tr-radius-md);
  background: var(--tr-surface-container-lowest);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  font-size: 12px;
  font-weight: 600;
  color: var(--tr-on-surface-variant);
  text-align: center;
}

.tr-theme .tr-filter-tile img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.tr-theme .tr-filter-tile .tr-swatch {
  width: 28px;
  height: 28px;
}

.tr-theme .tr-filter-tile.active {
  border-color: var(--tr-primary);
  background: var(--tr-primary-container);
  color: var(--tr-primary);
}

/* Shape: the full-width hero filter. On desktop the 11 tiles (All + 10
   shapes) fill one row edge-to-edge; below that they wrap into a centered,
   evenly-sized grid instead of a left-aligned, unevenly-stretched one. */
.tr-theme .tr-filter-tile-grid--shape {
  justify-content: center;
}

.tr-theme .tr-filter-tile-grid--shape .tr-filter-tile {
  flex: 0 1 calc(25% - 6px);
  min-height: 76px;
  gap: 2px;
  padding: 3px 10px;
}

.tr-theme .tr-filter-tile-grid--shape .tr-filter-tile img {
  width: 46px;
  height: 46px;
}

@media (min-width: 992px) {
  .tr-theme .tr-filter-tile-grid--shape {
    justify-content: flex-start;
  }

  .tr-theme .tr-filter-tile-grid--shape .tr-filter-tile {
    flex: 1 1 0;
    min-width: 96px;
  }
}

/* Setting Detail's Shape grid: same tile look as engagement-ring's --shape
   modifier, but fixed equal-width columns (CSS Grid auto-fill) instead of
   per-row flex-fill, so a short last row leaves empty trailing slots rather
   than stretching its tiles wider than the row(s) above it. Combined-class
   selector (higher specificity than --shape alone) so engagement-ring's
   Shape section, which uses --shape by itself, is unaffected. */
.tr-theme .tr-filter-tile-grid--shape.tr-shape-grid-fixed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  justify-content: start;
}

/* Setting / Material: fixed-width tiles left-aligned as a group, so wrapped
   rows (Setting's 6 options as 3 + 3, Material's 5 as 3 + 2) stay flush
   with the section title above instead of drifting to the center. Column
   count is fixed rather than fluid so the row composition stays
   predictable at every width. */
.tr-theme .tr-filter-tile-grid--balanced {
  justify-content: flex-start;
}

.tr-theme .tr-tiles-setting .tr-filter-tile {
  flex: 0 1 calc(33.333% - 5.334px);
  gap: 2px;
  padding: 3px 10px;
}

.tr-theme .tr-tiles-setting .tr-filter-tile img {
  width: 46px;
  height: 46px;
}

.tr-theme .tr-tiles-color .tr-filter-tile {
  gap: 4px;
}

.tr-theme .tr-tiles-material .tr-filter-tile {
  flex: 0 1 calc(33.333% - 5.334px);
}

/* Results bar (count + sort) */
.tr-theme .tr-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.tr-theme .tr-results-count {
  font-size: 13px;
  color: var(--tr-on-surface-variant);
}

.tr-theme .tr-sort-select {
  font-family: var(--tr-font-body);
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--tr-outline-variant);
  border-radius: var(--tr-radius);
  background: var(--tr-surface-container-lowest);
  color: var(--tr-on-surface);
}

/* Collapsed summary row for a single-value selector (e.g. Shape on the
   Setting Detail page) that expands inline into a tile/chip grid on tap. */
.tr-theme .tr-select-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--tr-outline-variant);
  border-radius: var(--tr-radius-md);
  background: var(--tr-surface-container-lowest);
  cursor: pointer;
  transition: border-color 0.15s ease;
  font-family: var(--tr-font-body);
  text-align: left;
}

.tr-theme .tr-select-summary:hover,
.tr-theme .tr-select-summary:focus-visible {
  border-color: var(--tr-primary);
}

.tr-theme .tr-select-summary img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.tr-theme .tr-select-summary-label {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--tr-on-surface);
}

.tr-theme .tr-select-summary-chevron {
  color: var(--tr-outline);
  font-size: 14px;
  transition: transform 0.2s ease;
}

.tr-theme .tr-select-summary-chevron--open {
  transform: rotate(180deg);
}

/* Small color-swatch dots on product cards */
.tr-theme .tr-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.tr-theme .tr-swatch-dots {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}

.tr-theme .tr-swatch-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Hint / info popovers */
.tr-theme .tr-hint {
  position: relative;
  display: inline-flex;
  margin-left: 6px;
  vertical-align: middle;
}

.tr-theme .tr-hint-btn {
  width: 20px;
  height: 20px;
  border-radius: var(--tr-radius-full);
  border: 1px solid var(--tr-outline);
  background: var(--tr-surface-container-lowest);
  color: var(--tr-on-surface-variant);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.tr-theme .tr-hint-btn:hover {
  border-color: var(--tr-primary);
  color: var(--tr-primary);
}

.tr-theme .tr-hint-dialog {
  width: 520px;
  max-width: 92vw;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--tr-surface-container-lowest);
  border: none;
  border-radius: var(--tr-radius-lg);
  box-shadow: var(--tr-shadow-card-hover);
  padding: 22px;
  text-transform: none;
  letter-spacing: normal;
}

.tr-theme .tr-hint-dialog::backdrop {
  background: rgba(28, 27, 27, 0.45);
}

.tr-theme .tr-hint-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--tr-on-surface-variant);
}

.tr-theme .tr-hint-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--tr-on-surface);
  text-transform: none;
  font-weight: 400;
  letter-spacing: normal;
}

.tr-theme .tr-hint-body p {
  margin: 0 0 8px;
}

.tr-theme .tr-hint-body p:last-child {
  margin-bottom: 0;
}

.tr-theme .tr-hint-body dt {
  font-weight: 600;
  margin-top: 10px;
  color: var(--tr-on-surface);
}

.tr-theme .tr-hint-body dt:first-child {
  margin-top: 0;
}

.tr-theme .tr-hint-body dd {
  margin: 2px 0 0;
  color: var(--tr-on-surface-variant);
}

.tr-theme .tr-hint-diagram {
  margin: 14px 0;
  padding: 10px 0;
  border-top: 1px solid var(--tr-surface-container-high);
  border-bottom: 1px solid var(--tr-surface-container-high);
}

.tr-theme .tr-hint-diagram svg,
.tr-theme .tr-hint-diagram img {
  width: 100%;
  height: auto;
  display: block;
}

.tr-theme .tr-size-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tr-theme .tr-size-table th,
.tr-theme .tr-size-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--tr-surface-container-high);
}

.tr-theme .tr-size-table th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tr-on-surface-variant);
}

.tr-theme .tr-size-table tr.active td {
  background: var(--tr-primary-container);
  color: var(--tr-primary);
  font-weight: 600;
}

/* Angle thumbnails */
.tr-theme .tr-thumb {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid var(--tr-outline-variant);
  border-radius: var(--tr-radius-md);
  overflow: hidden;
  background: var(--tr-surface-container-low);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.tr-theme .tr-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tr-theme .tr-thumb.active {
  border-color: var(--tr-primary);
  border-width: 2px;
}

/* Swatches for metal color options */
.tr-theme .tr-swatch {
  width: 36px;
  height: 36px;
  border-radius: var(--tr-radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease;
}

.tr-theme .tr-swatch.active {
  border-color: var(--tr-primary);
}

.tr-theme .tr-swatch-gold {
  background: #d5c19a;
}

.tr-theme .tr-swatch-pink_gold {
  background: #e7c7af;
}

.tr-theme .tr-swatch-white_gold {
  background: #e5e4e2;
  border-color: #ddd;
}

.tr-theme .tr-swatch.active.tr-swatch-white_gold {
  border-color: var(--tr-primary);
}

.tr-theme .tr-swatch-platinum {
  background: #cfd2d6;
}

/* Section title */
.tr-theme .tr-section-title {
  text-align: center;
  margin-bottom: 40px;
}

.tr-theme .tr-price-breakdown {
  background: var(--tr-surface-container-low);
  border-radius: var(--tr-radius-lg);
  padding: 24px;
}

.tr-theme .tr-price-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--tr-surface-container-high);
  font-size: 14px;
  color: var(--tr-on-surface-variant);
}

.tr-theme .tr-price-row.tr-total {
  border-bottom: none;
  padding-top: 16px;
  font-size: 18px;
  font-weight: 600;
  color: var(--tr-on-surface);
}
