/* Nivoda Ring Builder widget styles */
#nivoda-ring-builder { --nrb-teal:#26545C; --nrb-border:#E4E4E4; --nrb-bg:#F7F7F7; --nrb-text:#333;
  font-size: 15px; color: var(--nrb-text); line-height: 1.5; }
#nivoda-ring-builder * { box-sizing: border-box; }
#nivoda-ring-builder img { max-width: 100%; display: block; }
#nivoda-ring-builder button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
#nivoda-ring-builder h2 { font-weight: 500; font-size: 1.5rem; margin: 0 0 8px; }

/* ---- Buttons ---- */
.nrb-btn { display: inline-block; padding: 12px 26px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; text-align: center; transition: all .2s; }
.nrb-btn--primary { background: var(--nrb-teal); color: #fff; border: 1px solid var(--nrb-teal); }
.nrb-btn--primary:hover { background: #1c4249; }
.nrb-btn--primary[disabled] { opacity: .6; cursor: default; }
.nrb-btn--outline { border: 1px solid var(--nrb-text); color: var(--nrb-text); }
.nrb-btn--outline:hover { background: var(--nrb-text); color: #fff; }
.nrb-btn--full { width: 100%; margin-top: 14px; }

/* ---- Stepper ---- */
.nrb-stepper { display: flex; align-items: stretch; border: 1px solid var(--nrb-border); margin-bottom: 26px; background: #fff; overflow-x: auto; }
.nrb-stepper__title { display: flex; align-items: center; padding: 14px 20px; font-size: .95rem; white-space: nowrap; border-right: 1px solid var(--nrb-border); }
.nrb-step { flex: 1; display: flex; align-items: center; gap: 12px; padding: 12px 18px; text-align: left; position: relative; min-width: 220px; border-right: 1px solid var(--nrb-border); }
.nrb-step:last-child { border-right: none; }
.nrb-step__num { font-size: 1.5rem; font-weight: 300; }
.nrb-step__text { flex: 1; display: flex; flex-direction: column; }
.nrb-step__label { font-size: .82rem; font-weight: 600; letter-spacing: .04em; }
.nrb-step__sub { font-size: .72rem; color: #777; }
.nrb-step__sub u { cursor: pointer; }
.nrb-step__icon { color: #999; }
.nrb-step.is-active { box-shadow: inset 0 -2px 0 var(--nrb-teal); }
.nrb-step.is-active .nrb-step__icon, .nrb-step.is-done .nrb-step__icon { color: var(--nrb-teal); }

/* ---- Shared bits ---- */
.nrb-muted { color: #888; }
.nrb-small { font-size: .8rem; }
.nrb-label { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: #555; margin: 14px 0 8px; }
.nrb-link { cursor: pointer; color: var(--nrb-teal); }
.nrb-ph { background: var(--nrb-bg); width: 100%; height: 100%; min-height: 160px; }
.nrb-loading, .nrb-error { padding: 40px 10px; text-align: center; }
.nrb-error { color: #B00020; }
.nrb-badge { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: .62rem; letter-spacing: .1em; padding: 4px 9px; background: #fff; border: 1px solid var(--nrb-border); }
.nrb-badge--dark { background: #1F2A2C; color: #fff; border: none; }
.nrb-badge--teal { background: var(--nrb-teal); color: #fff; border: none; }
.nrb-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--nrb-border); margin-bottom: 18px; flex-wrap: wrap; }
.nrb-toolbar__count { font-size: .85rem; }
.nrb-sort { border: 1px solid var(--nrb-border); padding: 9px 12px; background: #fff; font-size: .82rem; }
.nrb-chip { border: 1px solid var(--nrb-border); border-radius: 999px; padding: 7px 14px; font-size: .78rem; background: #fff; }
.nrb-chip:hover { border-color: var(--nrb-teal); color: var(--nrb-teal); }

/* ---- Step 1: style carousel + settings grid ---- */
.nrb-style-carousel { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 8px; }
.nrb-style-item { flex: 0 0 auto; width: 108px; text-align: center; border: 1px solid transparent; padding: 6px; }
.nrb-style-item__img { display: block; aspect-ratio: 1; background: var(--nrb-bg); margin-bottom: 6px; overflow: hidden; }
.nrb-style-item__img img { width: 100%; height: 100%; object-fit: cover; }
.nrb-style-item__label { font-size: .74rem; }
.nrb-style-item.is-active { border-color: var(--nrb-teal); }
.nrb-style-item.is-active .nrb-style-item__label { color: var(--nrb-teal); }

.nrb-settings-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px 16px; }
.nrb-setting-card { position: relative; text-align: center; }
.nrb-setting-card__img { aspect-ratio: 1; background: var(--nrb-bg); overflow: hidden; cursor: pointer; }
.nrb-setting-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.nrb-setting-card__img:hover img { transform: scale(1.04); }
.nrb-setting-card__title { font-size: .86rem; margin: 10px 0 2px; }
.nrb-setting-card__price { font-size: .84rem; margin: 0 0 10px; }
.nrb-swatches { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.nrb-swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); display: inline-block; }
.nrb-swatches--lg .nrb-swatch { width: 22px; height: 22px; }
.nrb-swatch--btn { cursor: pointer; }
.nrb-swatch--btn.is-active { outline: 2px solid var(--nrb-teal); outline-offset: 2px; }

/* ---- Setting detail / complete ring ---- */
.nrb-detail { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.nrb-detail__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nrb-detail__img { aspect-ratio: 1; background: var(--nrb-bg); overflow: hidden; position: relative; }
.nrb-detail__img img, .nrb-video { width: 100%; height: 100%; object-fit: cover; border: none; }
.nrb-detail__price { font-size: 1.25rem; margin: 4px 0 12px; }
.nrb-detail__desc { border-top: 1px solid var(--nrb-border); margin-top: 20px; padding-top: 16px; font-size: .88rem; }
.nrb-back { font-size: .8rem; color: #777; margin-bottom: 12px; }
.nrb-back:hover { color: var(--nrb-teal); }
.nrb-lab-tabs { display: flex; gap: 8px; margin-bottom: 18px; align-items: center; flex-wrap: wrap; }
.nrb-lab-tabs--inline { margin: 12px 0 18px; }
.nrb-pill { border: 1px solid var(--nrb-border); border-radius: 999px; padding: 9px 18px; font-size: .78rem; background: #fff; }
.nrb-pill.is-active { background: var(--nrb-teal); color: #fff; border-color: var(--nrb-teal); }

.nrb-summary { border: 1px solid var(--nrb-border); margin: 16px 0; }
.nrb-summary__row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--nrb-border); font-size: .84rem; }
.nrb-summary__row:last-child { border-bottom: none; }
.nrb-summary__row strong { font-size: .7rem; letter-spacing: .1em; }
.nrb-summary__total { font-weight: 600; background: var(--nrb-bg); }
.nrb-size { width: 100%; border: 1px solid var(--nrb-border); padding: 12px; background: #fff; }
.nrb-props { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; font-size: .76rem; color: #666; }

/* ---- Step 2 layout ---- */
.nrb-step2__head { text-align: center; margin-bottom: 20px; }
.nrb-step2__layout { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; }
.nrb-sidebar { border-right: 1px solid var(--nrb-border); padding-right: 20px; }
.nrb-filter { margin-bottom: 22px; }
.nrb-filter__title { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; font-weight: 600; }
.nrb-shape-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.nrb-shape { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border: 1px solid transparent; color: #555; }
.nrb-shape__label { font-size: .62rem; }
.nrb-shape:hover { color: var(--nrb-teal); }
.nrb-shape.is-active { border-color: var(--nrb-teal); color: var(--nrb-teal); background: #F0F5F6; }
.nrb-range-track { position: relative; height: 26px; }
.nrb-range { width: 100%; accent-color: var(--nrb-teal); }
.nrb-range-track .nrb-range { position: absolute; left: 0; top: 0; pointer-events: auto; background: transparent; }
.nrb-range-inputs { display: flex; align-items: center; gap: 8px; }
.nrb-range-inputs input { width: 100%; border: 1px solid var(--nrb-border); padding: 7px 8px; font-size: .8rem; }
.nrb-range-labels { display: flex; justify-content: space-between; font-size: .6rem; color: #888; margin-top: 4px; }
.nrb-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.nrb-toggle { display: flex; gap: 8px; align-items: center; font-size: .8rem; }
.nrb-toggle input { accent-color: var(--nrb-teal); }
.nrb-reset { font-size: .76rem; color: #888; text-decoration: underline; }

/* ---- Diamond grid ---- */
.nrb-diamond-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px 16px; }
.nrb-diamond-card { text-align: center; }
.nrb-diamond-card__img { position: relative; aspect-ratio: 1; background: var(--nrb-bg); overflow: hidden; }
.nrb-diamond-card__img img { width: 100%; height: 100%; object-fit: cover; }
.nrb-360 { position: absolute; bottom: 8px; right: 8px; background: rgba(255,255,255,.9); font-size: .62rem; padding: 3px 7px; border-radius: 999px; }
.nrb-diamond-card__title { font-size: .86rem; margin: 10px 0 2px; }
.nrb-diamond-card__specs { font-size: .76rem; color: #777; margin: 0 0 4px; }
.nrb-diamond-card__price { font-size: .88rem; margin: 0 0 10px; }
.nrb-loadmore { text-align: center; margin: 26px 0 8px; }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .nrb-settings-grid { grid-template-columns: repeat(2, 1fr); }
  .nrb-step2__layout { grid-template-columns: 1fr; }
  .nrb-sidebar { border-right: none; border-bottom: 1px solid var(--nrb-border); padding: 0 0 16px; }
  .nrb-detail { grid-template-columns: 1fr; }
  .nrb-diamond-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .nrb-stepper__title { display: none; }
  .nrb-step { min-width: 160px; }
  .nrb-diamond-grid { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
}

/* ---- Diamond detail view ---- */
.nrb-ph--diamond { display: flex; align-items: center; justify-content: center; }
.nrb-dv { padding-top: 6px; }
.nrb-dv__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; margin-top: 10px; }
.nrb-dv__stage { aspect-ratio: 1; background: var(--nrb-bg); overflow: hidden; position: relative; }
.nrb-dv__stage img, .nrb-dv-video, .nrb-dv__stage .nrb-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: none; }
.nrb-dv__thumbs { display: flex; gap: 10px; margin-top: 12px; }
.nrb-dv__thumb { border: 1px solid var(--nrb-border); padding: 9px 16px; font-size: .76rem; letter-spacing: .06em; background: #fff; }
.nrb-dv__thumb.is-active { border-color: var(--nrb-teal); color: var(--nrb-teal); }
.nrb-dv__info h2 { font-size: 1.5rem; margin: 0 0 6px; }
.nrb-dv__subtitle { color: #777; font-size: .9rem; margin: 0 0 12px; }
.nrb-dv__price { font-size: 1.35rem; margin: 0 0 10px; }
.nrb-dv__avail { display: inline-block; margin-bottom: 16px; }
.nrb-dv .nrb-btn--full { margin-bottom: 20px; }
.nrb-specs { border-top: 1px solid var(--nrb-border); }
.nrb-spec { display: flex; justify-content: space-between; padding: 11px 2px; border-bottom: 1px solid var(--nrb-border); font-size: .86rem; }
.nrb-spec__label { color: #777; }
.nrb-spec__value { font-weight: 500; }
@media (max-width: 900px) { .nrb-dv__grid { grid-template-columns: 1fr; } }

/* ---- Dual-handle single-track slider ---- */
.nrb-range-multi { position: relative; height: 22px; margin: 8px 0 2px; }
.nrb-range-rail { position: absolute; top: 50%; left: 0; right: 0; height: 3px; transform: translateY(-50%); background: var(--nrb-border); border-radius: 3px; }
.nrb-range-fill { position: absolute; top: 50%; height: 3px; transform: translateY(-50%); background: var(--nrb-teal); border-radius: 3px; }
.nrb-range-multi input[type=range] {
  -webkit-appearance: none; appearance: none;
  position: absolute; top: 0; left: 0; width: 100%; height: 22px; margin: 0;
  background: transparent; pointer-events: none;   /* track ignores clicks */
}
.nrb-range-multi input[type=range]::-webkit-slider-runnable-track { background: transparent; border: none; }
.nrb-range-multi input[type=range]::-moz-range-track { background: transparent; border: none; }
.nrb-range-multi input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--nrb-teal); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25);
  cursor: pointer; pointer-events: auto;           /* thumb is grabbable */
  margin-top: 2px;
}
.nrb-range-multi input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--nrb-teal); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25);
  cursor: pointer; pointer-events: auto;
}
.nrb-range-readout { display: flex; justify-content: space-between; font-size: .78rem; color: #555; font-variant-numeric: tabular-nums; }
/* single-value step sliders (cut/color/clarity) */
.nrb-range--steps { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; cursor: pointer; }
.nrb-range--steps::-webkit-slider-runnable-track { height: 3px; background: var(--nrb-border); border-radius: 3px; }
.nrb-range--steps::-moz-range-track { height: 3px; background: var(--nrb-border); border-radius: 3px; }
.nrb-range--steps::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--nrb-teal); cursor: pointer; }
.nrb-range--steps::-moz-range-thumb { width: 16px; height: 16px; border: none; border-radius: 50%; background: var(--nrb-teal); cursor: pointer; }
