/* BVDIY Ring Studio */

.rc-page {
  --rc-ink: #1c2340;
  --rc-muted: #687083;
  --rc-line: #dfe2e8;
  --rc-soft: #f6f7f7;
  --rc-active: #202c58;
  padding: 18px 0 72px;
  background: #fff;
}

.rc-page > .container { max-width: 1480px; padding-inline: 32px; }
.rc-breadcrumb { margin: 4px 0 14px; }

.rc-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 54px;
  margin-bottom: 26px;
  border: 1px solid #9ba2b6;
  border-radius: 4px;
  overflow: hidden;
}
.rc-progress a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 20px;
  color: var(--rc-ink);
  border-right: 1px solid #9ba2b6;
  background: #fff;
}
.rc-progress a:last-child { border-right: 0; }
.rc-progress a:hover { background: #f7f8fa; }
.rc-progress span { font-family: var(--font-heading); font-size: 1.05rem; }
.rc-progress strong { font-size: 0.76rem; font-weight: 600; text-transform: uppercase; }

.rc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(430px, 0.66fr);
  gap: 34px;
  align-items: start;
}

/* Large, unframed product stage */
.rc-gallery { position: sticky; top: 86px; min-width: 0; }
.rc-3d-shell { position: relative; background: var(--rc-soft); overflow: hidden; }
.rc-3d-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.88;
  min-height: 560px;
  background: var(--rc-soft);
  overflow: hidden;
}
.rc-3d-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(25, 32, 49, 0.05);
}
.rc-3d-stage canvas { width: 100%; height: 100%; display: block; }
.rc-3d-stage.is-studio-mode canvas { opacity: 0; pointer-events: none; }
.rc-3d-stage.is-studio-mode .rc-3d-toolbar { opacity: 0; pointer-events: none; }
.rc-studio-gallery { position: absolute; z-index: 2; inset: 0; background: #f6f7f7; }
.rc-studio-gallery[hidden] { display: none; }
.rc-studio-gallery > img { width: 100%; height: 100%; object-fit: contain; }
.rc-studio-thumbs { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 6px; }
.rc-studio-thumbs button { width: 52px; height: 52px; padding: 0; border: 1px solid #cfd3da; border-radius: 2px; background: #fff; cursor: pointer; overflow: hidden; }
.rc-studio-thumbs button.active { border: 2px solid var(--rc-active); }
.rc-studio-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.rc-media-switch { position: absolute; z-index: 3; top: 14px; right: 14px; display: inline-flex; padding: 3px; border: 1px solid rgba(199, 203, 211, 0.9); border-radius: 3px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 3px 12px rgba(37, 44, 50, 0.07); }
.rc-media-switch[hidden] { display: none; }
.rc-media-switch button { min-width: 62px; height: 31px; padding: 0 10px; border: 0; border-radius: 2px; color: #525a6c; background: transparent; font-size: 0.7rem; cursor: pointer; }
.rc-media-switch button.active { color: #fff; background: var(--rc-active); }
.rc-3d-loading,
.rc-3d-fallback {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #5f676a;
  font-size: 0.82rem;
  background: var(--rc-soft);
}
.rc-3d-loading.is-hidden { opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.rc-3d-fallback[hidden] { display: none; }
.rc-3d-fallback strong { color: var(--rc-ink); font-family: var(--font-heading); font-size: 1.05rem; }
.rc-3d-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #cdd3d1;
  border-top-color: var(--rc-active);
  border-radius: 50%;
  animation: rc-spin 0.8s linear infinite;
}
@keyframes rc-spin { to { transform: rotate(360deg); } }

.rc-3d-toolbar {
  position: absolute;
  z-index: 3;
  left: 16px;
  right: 16px;
  bottom: 16px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 7px;
  border: 1px solid rgba(199, 203, 211, 0.9);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 5px 20px rgba(37, 44, 50, 0.08);
  backdrop-filter: blur(8px);
}
.rc-view-modes { display: inline-flex; min-width: 0; }
.rc-view-mode {
  min-width: 62px;
  height: 34px;
  padding: 0 11px;
  border: 0;
  border-right: 1px solid #d9dce3;
  background: transparent;
  color: #525a6c;
  font-size: 0.72rem;
  cursor: pointer;
}
.rc-view-mode:last-child { border-right: 0; }
.rc-view-mode:hover { color: var(--rc-active); }
.rc-view-mode.active { background: var(--rc-active); color: #fff; }

.rc-zoom-controls { display: inline-flex; flex: 0 0 auto; border: 1px solid #d2d6de; border-radius: 3px; overflow: hidden; }
.rc-zoom-controls button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-right: 1px solid #d2d6de;
  color: var(--rc-ink);
  background: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.rc-zoom-controls button:last-child { border-right: 0; }
.rc-zoom-controls button:hover { color: #fff; background: var(--rc-active); }
.rc-zoom-controls button:focus-visible { position: relative; z-index: 1; outline: 2px solid #7581aa; outline-offset: -2px; }

.rc-auto-rotate { display: inline-flex; align-items: center; gap: 7px; padding: 0 8px; font-size: 0.72rem; color: #525a6c; white-space: nowrap; cursor: pointer; }
.rc-auto-rotate input { position: absolute; opacity: 0; pointer-events: none; }
.rc-toggle-track {
  position: relative;
  width: 30px;
  height: 18px;
  flex: 0 0 auto;
  border: 1px solid #aeb4c0;
  border-radius: 9px;
  background: #d7dbe1;
}
.rc-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease;
}
.rc-auto-rotate input:checked + .rc-toggle-track { border-color: var(--rc-active); background: var(--rc-active); }
.rc-auto-rotate input:checked + .rc-toggle-track::after { transform: translateX(12px); }
.rc-auto-rotate input:focus-visible + .rc-toggle-track { outline: 2px solid #7581aa; outline-offset: 2px; }

.rc-3d-selection { display: flex; gap: 0; margin-top: 10px; border: 1px solid var(--rc-line); background: #fff; }
.rc-3d-selection span {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid var(--rc-line);
  color: #5c6474;
  font-size: 0.7rem;
  text-align: center;
  overflow-wrap: anywhere;
}
.rc-3d-selection span:last-child { border-right: 0; }

/* Configuration panel */
.rc-panel { min-width: 0; color: var(--rc-ink); }
.rc-title { max-width: 620px; margin-bottom: 9px; font-size: 1.55rem; line-height: 1.28; }
.rc-price-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.rc-total { color: var(--rc-ink); font-size: 1.5rem; font-weight: 650; }
.rc-price-caption { color: var(--rc-muted); font-size: 0.78rem; }

.rc-section { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--rc-line); scroll-margin-top: 92px; }
.rc-section-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 1.13rem; }
.rc-section-index { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; border: 1px solid #afb5c3; border-radius: 50%; font-family: var(--font-body); font-size: 0.66rem; font-weight: 600; }
.rc-info { position: relative; color: var(--rc-muted); font-family: var(--font-body); font-size: 0.8rem; cursor: help; }
.rc-info:hover::after,
.rc-info:focus::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: calc(100% + 8px);
  width: 230px;
  padding: 9px 11px;
  border-radius: 4px;
  color: #fff;
  background: #252936;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.45;
  transform: translateX(-50%);
}
.rc-select-label { margin: 12px 0 7px; color: var(--rc-ink); font-size: 0.83rem; }
.rc-select-label strong { font-weight: 650; }

.rc-style-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.rc-style {
  min-width: 0;
  min-height: 94px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 3px;
  border: 1px solid var(--rc-line);
  border-radius: 2px;
  color: var(--rc-ink);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rc-style:hover { border-color: #9299ad; }
.rc-style.active { padding: 6px 2px; border: 2px solid var(--rc-active); box-shadow: inset 0 0 0 1px #fff; }
.rc-style.disabled { opacity: 0.34; cursor: not-allowed; }
.rc-style-icon { width: 48px; height: 48px; flex: 0 0 auto; }
.rc-style span { max-width: 100%; color: var(--rc-ink); font-size: 0.64rem; line-height: 1.18; text-align: center; overflow-wrap: anywhere; }

.rc-metal-row { display: flex; gap: 8px; flex-wrap: wrap; }
.rc-metal {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rc-line);
  border-radius: 2px;
  color: var(--rc-ink);
  background: #fff;
  font-size: 0.66rem;
  font-weight: 600;
  cursor: pointer;
}
.rc-metal::before { content: ''; position: absolute; inset: 6px; border: 3px solid var(--swatch); border-radius: 50%; }
.rc-metal span { position: relative; z-index: 1; }
.rc-metal:hover { border-color: #9299ad; }
.rc-metal.active { border: 2px solid var(--rc-active); }

.rc-shape-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.rc-shape {
  min-width: 0;
  min-height: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 3px;
  border: 1px solid var(--rc-line);
  border-radius: 2px;
  color: var(--rc-ink);
  background: #fff;
  cursor: pointer;
}
.rc-shape .shape-icon { width: 27px; height: 27px; color: currentColor; }
.rc-shape span { max-width: 100%; font-size: 0.61rem; line-height: 1.15; overflow-wrap: anywhere; }
.rc-shape:hover { border-color: #9299ad; }
.rc-shape.active { padding: 4px 2px; border: 2px solid var(--rc-active); }

.rc-carat-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.rc-carat { min-width: 0; min-height: 38px; padding: 6px 4px; border: 1px solid var(--rc-line); border-radius: 2px; color: var(--rc-ink); background: #fff; font-size: 0.72rem; cursor: pointer; }
.rc-carat:hover { border-color: #9299ad; }
.rc-carat.active { padding: 5px 3px; border: 2px solid var(--rc-active); font-weight: 650; }

.rc-quality-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.rc-quality-grid label,
.rc-finish-grid label { display: flex; flex-direction: column; gap: 5px; color: var(--rc-ink); font-size: 0.76rem; }
.rc-quality-grid select,
.rc-finish-grid select,
.rc-finish-grid input { width: 100%; min-width: 0; min-height: 40px; padding: 8px 9px; border: 1px solid var(--rc-line); border-radius: 2px; color: var(--rc-ink); background: #fff; font-family: inherit; font-size: 0.8rem; }
.rc-quality-grid select:focus,
.rc-finish-grid select:focus,
.rc-finish-grid input:focus { border-color: var(--rc-active); outline: 1px solid var(--rc-active); }
.rc-part-price { margin-top: 9px; color: var(--rc-muted); font-size: 0.78rem; }
.rc-part-price strong { color: var(--rc-ink); }

.rc-finish-grid { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 11px; margin-bottom: 14px; }
.rc-finish-grid small { color: var(--rc-muted); font-weight: 400; }
.rc-summary { margin-bottom: 14px; padding: 11px 12px; border: 1px solid var(--rc-line); border-radius: 2px; background: #f8f9fa; font-size: 0.76rem; }
.rc-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.rc-summary span { color: #596171; }
.rc-summary strong { white-space: nowrap; }
.rc-error { margin-top: 9px; color: #b3261e; font-size: 0.8rem; }
.rc-ordering-note { margin-top: 9px; color: var(--rc-muted); font-size: 0.76rem; line-height: 1.45; }
.rc-ships { margin-top: 12px; font-size: 0.82rem; }
.rc-perks { display: flex; align-items: center; gap: 9px; margin-top: 7px; color: var(--rc-ink); font-size: 0.76rem; }
.rc-perks a { color: inherit; text-decoration: underline; }

@media (max-width: 1240px) {
  .rc-page > .container { padding-inline: 24px; }
  .rc-layout { grid-template-columns: minmax(0, 1fr) 430px; gap: 24px; }
  .rc-3d-stage { min-height: 500px; }
  .rc-style-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 940px) {
  .rc-layout { grid-template-columns: 1fr; }
  .rc-gallery { position: static; }
  .rc-3d-stage { min-height: 0; aspect-ratio: 4 / 3; }
  .rc-style-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .rc-page { padding-top: 10px; }
  .rc-page > .container { padding-inline: 14px; }
  .rc-breadcrumb { margin-bottom: 9px; }
  .rc-progress { min-height: 46px; margin-bottom: 14px; }
  .rc-progress a { justify-content: center; gap: 5px; padding: 7px 5px; }
  .rc-progress span { font-size: 0.8rem; }
  .rc-progress strong { font-size: 0.62rem; }
  .rc-3d-stage { aspect-ratio: 1; }
  .rc-3d-toolbar { left: 8px; right: 8px; bottom: 8px; gap: 6px; }
  .rc-view-mode { min-width: 0; padding-inline: 8px; }
  .rc-zoom-controls button { width: 30px; }
  .rc-auto-rotate > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rc-3d-selection { display: grid; grid-template-columns: 1fr; }
  .rc-3d-selection span { border-right: 0; border-bottom: 1px solid var(--rc-line); }
  .rc-3d-selection span:last-child { border-bottom: 0; }
  .rc-title { font-size: 1.35rem; }
  .rc-style-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rc-shape-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .rc-carat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rc-quality-grid,
  .rc-finish-grid { grid-template-columns: 1fr; }
  .rc-summary div { align-items: flex-start; flex-direction: column; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .rc-3d-spinner { animation: none; }
  .rc-toggle-track::after { transition: none; }
}
