:root {
 --bg: #efefee;
 --paper: #f6f5f3;
 --ink: #111111;
 --muted: #6f6f6f;
 --line: rgba(0, 0, 0, 0.12);
 --shadow: 0 16px 50px rgba(0, 0, 0, 0.1);
 --radius: 20px;
 --radius-sm: 14px;
 --panel-w: 470px;
}

/* =========================================================
   RESET / BASE
========================================================= */

* {
 box-sizing: border-box;
}

html,
body {
 height: 100%;
}

body {
 margin: 0;
 font-family: "Comfortaa", "HelveticaNeue", "Helvetica Neue", "Helvetica-Neue", Helvetica, Arial, sans-serif;
 color: var(--ink);
 background: linear-gradient(180deg, #f7f6f4 0%, #ececeb 100%);
 overflow: hidden;
 display: flex;
 flex-direction: column;
}

input,
button,
textarea,
select {
 font: inherit;
}

/* =========================================================
   APP / LAYOUT
========================================================= */

.app {
 flex: 1 1 auto;
 min-height: 0;
 display: flex;
 flex-direction: column;
 background: linear-gradient(180deg, #f7f6f4 0%, #ececeb 100%);
 overflow: hidden;
}

.simulator-title {
 flex: 0 0 auto;
 text-align: center;
 border-bottom: 1px solid #000;
 color: #818181;
}

.simulator-title h1 {
 font-size: 23px;
 margin: 16px 0;
}

.layout {
 flex: 1 1 auto;
 display: grid;
 grid-template-columns: 1fr;
 min-height: 0;
 height: 100%;
}

@media (min-width: 980px) {
 .layout {
  grid-template-columns: var(--panel-w) 1fr;
  min-height: 0;
  height: 100%;
 }
}

/* =========================================================
   PANEL
========================================================= */

.panel {
 background: rgba(255, 255, 255, 0.72);
 border-right: 1px solid var(--line);
 backdrop-filter: blur(12px);
 display: flex;
 flex-direction: column;
 min-height: 0;
}

@media (min-width: 980px) {
 .panel {
  position: sticky;
  top: 0;
  height: 100%;
  min-height: 0;
 }
}

.panel__body {
 padding: 22px 22px 0;
 overflow: visible;
}

@media (min-width: 980px) {
 .panel__body {
  overflow: auto;
 }
}

.panel__footer {
 margin-top: auto;
 padding: 18px 22px;
 border-top: 1px solid var(--line);
 background: rgba(255, 255, 255, 0.55);
}

.panel__meta {
 margin: 10px 0 0;
 font-size: 12px;
 color: rgba(0, 0, 0, 0.45);
 text-align: center;
}

/* =========================================================
   STAGE
========================================================= */

.stage {
 position: relative;
 background:
  radial-gradient(
   1200px 600px at 50% 40%,
   rgba(255, 255, 255, 0.65) 0%,
   rgba(255, 255, 255, 0.2) 45%,
   rgba(0, 0, 0, 0) 70%
  ),
  var(--bg);
 overflow: hidden;
 min-height: 0;
}

@media (min-width: 980px) {
 .stage {
  min-height: 0;
  height: 100%;
 }
}

.stage__inner {
 position: relative;
 width: 100%;
 height: 100%;
 min-height: 0;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 18px 24px;
}

/* =========================================================
   EMPTY / RUG
========================================================= */

.rugWrap.is-hidden {
 display: none;
}

.empty {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 12px;
 text-align: center;
 user-select: none;
 padding: 24px;
 color: rgba(0, 0, 0, 0.55);
}

.empty__text {
 margin: 0;
 font-size: 15px;
 line-height: 1.45;
 color: rgba(0, 0, 0, 0.45);
 animation: fadePulse 1.8s ease-in-out infinite;
}

@keyframes idleFloat {
 0% {
  transform: translateY(0) scale(1);
  opacity: 0.7;
 }
 50% {
  transform: translateY(-8px) scale(1.04);
  opacity: 1;
 }
 100% {
  transform: translateY(0) scale(1);
  opacity: 0.7;
 }
}

.empty__icon svg {
 filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.08));
}

@keyframes fadePulse {
 0%,
 100% {
  opacity: 0.55;
 }
 50% {
  opacity: 0.95;
 }
}

.rugWrap {
 width: 100%;
 height: 100%;
 display: grid;
 place-items: center;
 animation: popIn 0.22s ease-out both;
 background: transparent;
}

@keyframes popIn {
 from {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
 }
 to {
  opacity: 1;
  transform: translateY(0) scale(1);
 }
}

.rugCanvas {
 width: 100%;
 height: 100%;
 display: block;
 touch-action: auto;
 background: transparent;
}

.rugCanvas.is-lens-active {
 touch-action: none;
}

/* =========================================================
   ACCORDION
========================================================= */

.acc {
 border-top: 0;
 border-bottom: 1px solid var(--line);
}

.acc__btn {
 position: relative;
 width: 100%;
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 16px;
 padding: 20px 0;
 background: transparent;
 border: 0;
 cursor: pointer;
 font-size: 15px;
 font-weight: 500;
 color: rgba(0, 0, 0, 0.92);
 text-align: left;
}

.acc__btn::before {
 content: "";
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 height: 1px;
}

.acc__icon {
 width: 26px;
 height: 26px;
 border-radius: 999px;
 border: 1px solid rgba(0, 0, 0, 0.35);
 position: relative;
 flex: 0 0 auto;
}

.acc__icon::before,
.acc__icon::after {
 content: "";
 position: absolute;
 left: 50%;
 top: 50%;
 width: 10px;
 height: 1.5px;
 background: rgba(0, 0, 0, 0.75);
 transform: translate(-50%, -50%);
 border-radius: 2px;
}

.acc__icon::after {
 transform: translate(-50%, -50%) rotate(90deg);
 transition:
  transform 0.18s ease,
  opacity 0.18s ease;
}

.acc__content,
.acc__content-ambiente {
 height: 0;
 overflow: hidden;
 transition: height 0.22s ease;
}

.acc__btn[aria-expanded="true"] .acc__icon::after {
 opacity: 0;
 transform: translate(-50%, -50%) rotate(90deg) scale(0.8);
}

/* =========================================================
   DIMENSIONES
========================================================= */

.dims {
 padding: 4px 0 10px;
}

.dims__row {
 padding: 16px 0 18px;
 border-bottom: 1px solid var(--line);
}

.dims__row:last-child {
 border-bottom: 0;
}

.dims__row.is-hidden {
 display: none;
}

.dims__row.is-single {
 border-bottom: none !important;
 padding-bottom: 0 !important;
 margin-bottom: 0 !important;
}

.dims__top {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 14px;
 margin-bottom: 12px;
}

.dims__label {
 font-size: 15px;
 font-weight: 500;
 color: rgba(0, 0, 0, 0.96);
 line-height: 1.1;
}

.dims__control {
 width: 100%;
 display: flex;
 align-items: center;
}

.dims__num {
 width: 32px;
 height: 100%;
 border: 0;
 border-radius: 0;
 padding: 0;
 font-size: 15px;
 text-align: right;
 background: transparent;
 color: rgba(0, 0, 0, 0.92);
 outline: none;
 flex: 0 0 auto;
 box-shadow: none;
}

.dims__num:focus {
 border-color: rgba(0, 0, 0, 0.35);
}

.dims__num::-webkit-outer-spin-button,
.dims__num::-webkit-inner-spin-button {
 -webkit-appearance: none;
 margin: 0;
}

.dims__num[type="number"] {
 -moz-appearance: textfield;
}

.dims__range {
 width: 100%;
 height: 20px;
 -webkit-appearance: none;
 appearance: none;
 background: transparent;
 outline: none;
 padding: 0;
 margin: 0;
}

.dims__range::-webkit-slider-runnable-track {
 height: 2px;
 background: rgba(0, 0, 0, 0.75);
 border-radius: 999px;
}

.dims__range::-webkit-slider-thumb {
 -webkit-appearance: none;
 appearance: none;
 width: 20px;
 height: 20px;
 border-radius: 999px;
 background: #fff;
 border: 2px solid rgba(0, 0, 0, 0.75);
 cursor: pointer;
 margin-top: -9px;
}

.dims__range::-moz-range-track {
 height: 2px;
 background: rgba(0, 0, 0, 0.75);
 border-radius: 999px;
 border: 0;
}

.dims__range::-moz-range-thumb {
 width: 20px;
 height: 20px;
 border-radius: 999px;
 background: #fff;
 border: 2px solid rgba(0, 0, 0, 0.75);
 cursor: pointer;
}

.dims__input-wrap {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 4px;
 height: 38px;
 min-width: 86px;
 padding: 0 10px;
 border: 1px solid rgba(0, 0, 0, 0.12);
 border-radius: 2px;
 background: rgba(255, 255, 255, 0.95);
 flex: 0 0 auto;
}

.dims__unit {
 font-size: 13px;
 color: rgba(0, 0, 0, 0.62);
 line-height: 1;
 white-space: nowrap;
 transform: translateY(1px);
}

/* =========================================================
   COLORS / COLECCIONES
========================================================= */

.colors {
 padding: 0 0 18px;
 border-top: 1px solid var(--line);
}

.colors__title {
 margin: 0;
 padding: 0;
 font-size: 15px;
 font-weight: 600;
 color: rgba(0, 0, 0, 0.9);
 border-bottom: 0;
}

.colors__group {
 padding: 25px 0;
 border-top: 1px solid var(--line);
}

.colors__group:first-child {
 border-top: 0;
}

.colors__label {
 margin: 0 0 14px;
 font-size: 15px;
 color: rgba(0, 0, 0, 0.62);
}

.swatches {
 display: grid;
 grid-template-columns: repeat(5, minmax(0, 1fr));
 gap: 14px;
 padding-left: 10px;
 padding-right: 10px;
}

.swatch {
 width: 100%;
 aspect-ratio: 1 / 1;
 border-radius: 6px;
 border: 1px solid rgba(0, 0, 0, 0.08);
 background-size: 256px 256px;
 background-position: center;
 cursor: pointer;
 position: relative;
 overflow: visible;
}

.swatch__tag {
 position: absolute;
 left: 50%;
 bottom: calc(100% + 12px);
 transform: translateX(-50%) translateY(4px);
 z-index: 20;

 display: inline-flex;
 align-items: center;
 justify-content: center;

 max-width: 120px;
 width: max-content;
 text-align: center;

 white-space: normal;
 word-break: break-word;
 line-height: 1.2;

 padding: 7px 12px;
 border-radius: 6px;

 background: #111;
 color: #fff;
 font-size: 12px;
 font-weight: 600;
 letter-spacing: 0.01em;

 opacity: 0;
 visibility: hidden;
 pointer-events: none;
 transition:
  opacity 0.18s ease,
  transform 0.18s ease,
  visibility 0.18s ease;
}

.swatch__tag::after {
 content: "";
 position: absolute;
 left: 50%;
 top: 100%;
 transform: translateX(-50%);
 width: 0;
 height: 0;
 border-left: 8px solid transparent;
 border-right: 8px solid transparent;
 border-top: 10px solid #111;
}

/* Estado visible normal */
.swatch:hover .swatch__tag,
.swatch:focus-visible .swatch__tag,
.swatch[aria-pressed="true"] .swatch__tag {
 opacity: 1;
 visibility: visible;
 transform: translateX(-50%) translateY(0);
}

/* Primera columna de cada fila */
.swatch:nth-child(5n + 1) .swatch__tag {
 left: 0;
 right: auto;
 transform: translateX(0) translateY(4px);
}

.swatch:nth-child(5n + 1) .swatch__tag::after {
 left: 22px;
 transform: translateX(0);
}

.swatch:nth-child(5n + 1):hover .swatch__tag,
.swatch:nth-child(5n + 1):focus-visible .swatch__tag,
.swatch:nth-child(5n + 1)[aria-pressed="true"] .swatch__tag {
 transform: translateX(0) translateY(0);
}

/* Última columna de cada fila */
.swatch:nth-child(5n) .swatch__tag {
 left: auto;
 right: 0;
 transform: translateX(0) translateY(4px);
}

.swatch:nth-child(5n) .swatch__tag::after {
 left: auto;
 right: 22px;
 transform: translateX(0);
}

.swatch:nth-child(5n):hover .swatch__tag,
.swatch:nth-child(5n):focus-visible .swatch__tag,
.swatch:nth-child(5n)[aria-pressed="true"] .swatch__tag {
 transform: translateX(0) translateY(0);
}

.swatch[aria-pressed="true"] {
 outline: 2px solid rgba(0, 0, 0, 0.45);
 outline-offset: 2px;
}

/* Importante: el contenedor no debe cortar el tag */
.collection-dropdown__content,
.colors__group,
.swatches {
 overflow: visible;
}

[data-colors] {
 padding-top: 0 !important;
 border-top: 0 !important;
}

.collection-dropdown {
 border-top: 0 !important;
}

.collection-dropdown__btn {
 width: 100%;
 min-height: 56px;
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 padding: 16px 0;
 border: 0;
 border-top: 0 !important;
 border-bottom: 0 !important;
 background: transparent;
 cursor: pointer;
 text-align: left;
 overflow: visible;
 box-shadow: none !important;
}

.collection-dropdown__title {
 font-size: 15px;
 font-weight: 500;
 color: rgba(0, 0, 0, 0.92);
}

.collection-dropdown__chevron {
 width: 30px;
 height: 30px;
 position: relative;
 flex: 0 0 auto;
 overflow: visible;
}

.collection-dropdown__chevron::before,
.collection-dropdown__chevron::after {
 content: "";
 position: absolute;
 top: 50%;
 width: 12px;
 height: 2px;
 background: rgba(0, 0, 0, 0.72);
 border-radius: 999px;
 transition: transform 0.2s ease;
 transform-origin: center;
}

.collection-dropdown__chevron::before {
 left: 5px;
}

.collection-dropdown__chevron::after {
 right: 5px;
}

.collection-dropdown__btn[aria-expanded="true"] .collection-dropdown__chevron::before {
 transform: translateY(-50%) rotate(-45deg);
}

.collection-dropdown__btn[aria-expanded="true"] .collection-dropdown__chevron::after {
 transform: translateY(-50%) rotate(45deg);
}

.collection-dropdown__btn[aria-expanded="false"] .collection-dropdown__chevron::before {
 transform: translateY(-50%) rotate(45deg);
}

.collection-dropdown__btn[aria-expanded="false"] .collection-dropdown__chevron::after {
 transform: translateY(-50%) rotate(-45deg);
}

.collection-dropdown__content {
 height: auto;
 overflow: hidden;
 transition: height 0.22s ease;
}

/* =========================================================
   CENEFA
========================================================= */

[data-cenefa="1"] {
 padding: 0 0 22px 0 !important;
 border-top: 1px solid var(--line) !important;
}

[data-cenefa="1"] > div {
 gap: 14px !important;
 align-items: center;
 padding-top: 18px;
}

[data-cenefa-btn] {
 min-width: 0 !important;
 width: 100% !important;
 height: 48px !important;
 border-radius: 2px !important;
 font-size: 15px !important;
 font-weight: 500 !important;
}

/* =========================================================
   FORMA ALFOMBRA
========================================================= */

.shape-picker {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 14px;
 padding: 18px 6px 18px;
 border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.shape-card {
 appearance: none;
 -webkit-appearance: none;
 border: 1px solid rgba(0, 0, 0, 0.1);
 background: rgba(255, 255, 255, 0.72);
 border-radius: 24px;
 min-height: 148px;
 padding: 16px 14px 14px;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 12px;
 cursor: pointer;
 position: relative;
 overflow: hidden;
 backdrop-filter: blur(10px);
 transition:
  transform 0.18s ease,
  border-color 0.18s ease,
  background 0.18s ease;
}

.shape-card::before {
 content: "";
 position: absolute;
 inset: 0;
 background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
 pointer-events: none;
}

.shape-card:hover {
 transform: translateY(-1px);
 border-color: rgba(0, 0, 0, 0.18);
 box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.shape-card.is-active {
 background: linear-gradient(180deg, rgba(17, 17, 17, 0.96), rgba(28, 28, 28, 0.96));
 border-color: rgba(17, 17, 17, 0.96);
}

.shape-card__media {
 width: 100%;
 display: flex;
 align-items: center;
 justify-content: center;
 min-height: 72px;
}

.shape-card__preview {
 display: block;
 position: relative;
 flex: 0 0 auto;
 background:
  linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.02)),
  linear-gradient(135deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.04));
 border: 1px solid rgba(0, 0, 0, 0.08);
 box-shadow:
  inset 0 1px 0 rgba(255, 255, 255, 0.22),
  0 8px 20px rgba(0, 0, 0, 0.08);
}

.shape-card__preview--rect {
 width: 68px;
 height: 68px;
}

.shape-card__preview--circle {
 width: 74px;
 height: 74px;
 border-radius: 999px;
}

.shape-card.is-active .shape-card__preview {
 background:
  linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.04)),
  linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
 border-color: rgba(255, 255, 255, 0.14);
}

.shape-card__label {
 position: relative;
 z-index: 1;
 font-size: 14px;
 font-weight: 600;
 letter-spacing: 0.01em;
 color: rgba(0, 0, 0, 0.88);
}

.shape-card.is-active .shape-card__label {
 color: #fff;
}

/* =========================================================
   POPULAR COMBOS
========================================================= */

.popular-combos {
 padding: 10px 0 18px;
}

.popular-combos__groups {
 display: flex;
 flex-direction: column;
 gap: 0;
}

.popular-dropdown {
 border-top: 1px solid var(--line);
}

.popular-dropdown__btn {
 width: 100%;
 min-height: 52px;
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 padding: 14px 0;
 border: 0;
 background: transparent;
 cursor: pointer;
 text-align: left;
}

.popular-dropdown__title {
 font-size: 15px;
 font-weight: 500;
 color: rgba(0, 0, 0, 0.92);
}

.popular-dropdown__chevron {
 width: 30px;
 height: 30px;
 position: relative;
 flex: 0 0 auto;
}

.popular-dropdown__chevron::before,
.popular-dropdown__chevron::after {
 content: "";
 position: absolute;
 top: 50%;
 width: 12px;
 height: 2px;
 background: rgba(0, 0, 0, 0.72);
 border-radius: 999px;
 transition: transform 0.2s ease;
 transform-origin: center;
}

.popular-dropdown__chevron::before {
 left: 5px;
}

.popular-dropdown__chevron::after {
 right: 5px;
}

.popular-dropdown__btn[aria-expanded="true"] .popular-dropdown__chevron::before {
 transform: translateY(-50%) rotate(-45deg);
}

.popular-dropdown__btn[aria-expanded="true"] .popular-dropdown__chevron::after {
 transform: translateY(-50%) rotate(45deg);
}

.popular-dropdown__btn[aria-expanded="false"] .popular-dropdown__chevron::before {
 transform: translateY(-50%) rotate(45deg);
}

.popular-dropdown__btn[aria-expanded="false"] .popular-dropdown__chevron::after {
 transform: translateY(-50%) rotate(-45deg);
}

.popular-dropdown__content {
 height: 0;
 overflow: hidden;
 transition: height 0.22s ease;
}

.popular-combos__grid {
 display: grid;
 grid-template-columns: repeat(3, minmax(0, 1fr));
 gap: 8px;
 padding: 5px 0 12px;
}

.popular-combo-card {
 appearance: none;
 -webkit-appearance: none;
 border: 1px solid rgba(0, 0, 0, 0.1);
 background: rgba(255, 255, 255, 0.72);
 border-radius: 10px;
 padding: 6px;
 display: flex;
 flex-direction: column;
 gap: 4px;
 cursor: pointer;
 text-align: left;
 transition:
  transform 0.18s ease,
  border-color 0.18s ease,
  box-shadow 0.18s ease,
  background 0.18s ease;
 position: relative;
}

.popular-combo-card:hover {
 transform: translateY(-1px);
 border-color: rgba(0, 0, 0, 0.16);
 box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.popular-combo-card[aria-pressed="true"] {
 box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.88) inset;
}

.popular-combo-card__media {
 display: block;
}

.popular-combo-card__rug {
 position: relative;
 display: block;
 width: 100%;
 aspect-ratio: 1 / 1;
 overflow: hidden;
 box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.popular-combo-card__rug::before {
 content: "";
 position: absolute;
 inset: 0;
 background-image: var(--combo-border);
 background-size: cover;
 background-position: center;
 pointer-events: none;
}

.popular-combo-card__rug::after {
 content: "";
 position: absolute;
 inset: 11%;
 background-image: var(--combo-base);
 background-size: cover;
 background-position: center;
 pointer-events: none;
}

.popular-combo-card__hit {
 position: absolute;
 display: block;
 z-index: 2;
}

.popular-combo-card__hit--border {
 inset: 0;
 z-index: 2;
}

.popular-combo-card__hit--base {
 inset: 11%;
 border-radius: 6px;
 z-index: 3;
}

.popular-combo-card__tag {
 position: absolute;
 left: 6px;
 right: 6px;
 bottom: 6px;
 background: rgba(17, 17, 17, 0.92);
 color: #fff;
 font-size: 10px;
 line-height: 1.05;
 padding: 6px 7px;
 border-radius: 7px;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 opacity: 0;
 transform: translateY(4px);
 pointer-events: none;
 transition:
  opacity 0.16s ease,
  transform 0.16s ease;
 box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
 z-index: 3;
}

.popular-combo-card__tag--base,
.popular-combo-card__tag--border {
 display: block;
}

.popular-combo-card__hit--border:hover ~ .popular-combo-card__tag--border {
 opacity: 1;
 transform: translateY(0);
}

.popular-combo-card__hit--base:hover ~ .popular-combo-card__tag--base {
 opacity: 1;
 transform: translateY(0);
}

.popular-combo-card__line {
 font-size: 11px;
 line-height: 1.15;
}

/* =========================================================
   FOOTER ACTIONS
========================================================= */

.footer-actions {
 display: flex;
 align-items: center;
 gap: 12px;
}

.cta {
 width: 100%;
 height: 56px;
 flex: 1;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 10px;
 border-radius: 999px;
 border: 1px solid rgba(0, 0, 0, 0.1);
 background: rgba(0, 0, 0, 0.09);
 color: rgba(0, 0, 0, 0.7);
 font-size: 15px;
 font-weight: 500;
 cursor: pointer;
 transition:
  background 0.18s ease,
  border-color 0.18s ease,
  color 0.18s ease,
  transform 0.18s ease,
  box-shadow 0.18s ease;
}

.cta:hover {
 background: rgba(0, 0, 0, 0.14);
 border-color: rgba(0, 0, 0, 0.16);
 color: rgba(0, 0, 0, 0.88);
 transform: translateY(-1px);
}

.cta:active {
 transform: translateY(0);
}

.cta:focus-visible {
 outline: none;
 box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.cta:disabled {
 cursor: not-allowed;
 opacity: 0.72;
 transform: none;
}

.cta__icon,
.cta__spinner {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 18px;
 height: 18px;
 flex: 0 0 18px;
}

.cta__icon {
 opacity: 1;
 transition:
  opacity 0.18s ease,
  transform 0.18s ease;
}

.cta__label {
 display: inline-block;
}

.cta__spinner {
 display: none;
 border-radius: 999px;
 border: 2px solid rgba(0, 0, 0, 0.16);
 border-top-color: rgba(0, 0, 0, 0.72);
 animation: cta-spin 0.7s linear infinite;
}

.icon-btn__spinner {
 display: none;
 width: 16px;
 height: 16px;
 border-radius: 999px;
 border: 2px solid rgba(0, 0, 0, 0.25);
 border-top-color: #111;
 animation: emailModalSpin 0.7s linear infinite;
}

/* estado loading */
.icon-btn.is-loading .icon-btn__icon {
 display: none;
}

.icon-btn.is-loading .icon-btn__spinner {
 display: inline-flex;
}

/* Base loading */
.cta.is-loading {
 pointer-events: none;
 position: relative;
}

/* Oculta icono normal */
.cta.is-loading .cta__icon {
 display: none;
}

/* Muestra spinner */
.cta.is-loading .cta__spinner {
 display: inline-flex;
}

/* 🔥 SOLO para botones tipo "texto" (PDF) */
.cta--with-text.is-loading .cta__label {
 opacity: 0;
}

/* 🔥 SOLO para botones tipo icono (WhatsApp) */
.cta--icon-only.is-loading .cta__label {
 opacity: 1; /* no se toca */
}

@keyframes cta-spin {
 from {
  transform: rotate(0deg);
 }
 to {
  transform: rotate(360deg);
 }
}

.cta:disabled {
 cursor: not-allowed;
}

.cta__icon {
 display: inline-flex;
 align-items: center;
}

.icon-btn {
 width: 56px;
 height: 56px;
 border-radius: 999px;
 border: 1px solid rgba(0, 0, 0, 0.15);
 background: rgba(255, 255, 255, 0.7);
 display: flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 transition: all 0.18s ease;
}

#shareWhatsappBtn svg {
 transform: translate(-0.5px, 0.5px);
}

.icon-btn:hover {
 background: rgba(0, 0, 0, 0.06);
}

.icon-btn svg {
 color: #111;
}

/* =========================================================
   ZOOM FAB
========================================================= */

.zoomFab {
 position: absolute;
 left: 14px;
 bottom: 14px;
 width: 42px;
 height: 42px;
 border: 1px solid rgba(0, 0, 0, 0.14);
 border-radius: 999px;
 background: rgba(255, 255, 255, 0.94);
 color: rgba(0, 0, 0, 0.78);
 display: inline-flex;
 align-items: center;
 justify-content: center;
 box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
 backdrop-filter: blur(10px);
 z-index: 8;
 transition:
  background 0.18s ease,
  color 0.18s ease,
  border-color 0.18s ease,
  transform 0.18s ease,
  box-shadow 0.18s ease;
}

.zoomFab:active {
 transform: scale(0.96);
}

.zoomFab.is-hidden {
 display: none;
}

.zoomFab.is-active {
 background: rgba(17, 17, 17, 0.94);
 color: #fff;
 border-color: rgba(17, 17, 17, 0.94);
 box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

/* =========================================================
   SCENES / AMBIENTES
========================================================= */

.scenes {
 border-top: 1px solid var(--line);
 background: transparent;
 backdrop-filter: none;
}

.scenes__inner {
 padding: 18px 22px 22px;
}

.scenes__head {
 margin-bottom: 14px;
}

.scenes__title {
 margin: 0;
 font-size: 14px;
 font-weight: 600;
 color: rgba(0, 0, 0, 0.72);
}

.scene-tabs {
 display: flex;
 align-items: center;
 gap: 10px;
 flex-wrap: wrap;
 margin-bottom: 16px;
}

.scene-tab {
 min-width: 0;
 height: 42px;
 padding: 0 18px;
 border-radius: 999px;
 border: 1px solid rgba(0, 0, 0, 0.12);
 background: rgba(255, 255, 255, 0.78);
 color: rgba(0, 0, 0, 0.72);
 font-size: 14px;
 font-weight: 500;
 cursor: pointer;
 transition:
  background 0.18s ease,
  border-color 0.18s ease,
  color 0.18s ease,
  transform 0.18s ease;
}

.scene-tab:hover {
 background: rgba(255, 255, 255, 0.96);
 border-color: rgba(0, 0, 0, 0.2);
}

.scene-tab.is-active {
 background: rgba(17, 17, 17, 0.92);
 border-color: rgba(17, 17, 17, 0.92);
 color: #fff;
}

.scene-canvas {
 width: 100%;
 height: 100%;
 display: block;
}

.scene-preview__placeholder {
 min-height: 180px;
 display: flex;
 align-items: center;
 justify-content: center;
 text-align: center;
 padding: 24px;
 color: rgba(0, 0, 0, 0.42);
 font-size: 14px;
 line-height: 1.5;
}

/* =========================================================
   SCENES GLOBAL
========================================================= */

.scenes--global {
 width: 100%;
 padding: 28px 0 40px;
 background: transparent;
}

.scenes__shell {
 width: min(1400px, calc(100% - 40px));
 margin: 0 auto;
}

.scenes--global .scenes__inner {
 padding: 0;
}

.scenes--global .scenes__title {
 font-size: 18px;
 font-weight: 600;
 color: rgba(0, 0, 0, 0.78);
}

.scenes--global .scene-preview {
 width: 100%;
 aspect-ratio: 16 / 9;
 border-radius: 24px;
 background: rgba(255, 255, 255, 0.58);
 box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
 overflow: hidden;
 position: relative;
}

/* =========================================================
   SCENES PANEL
========================================================= */

.scenes--panel {
 border-top: 1px solid var(--line);
 background: transparent;
 backdrop-filter: none;
}

.scenes--panel,
.scenes--panel .scenes__inner,
#scenePreviewList {
 width: 100%;
}

.scenes--panel .scenes__inner {
 padding: 16px 0 18px;
}

.scene-preview--panel {
 width: 100%;
 aspect-ratio: 16 / 9;
 border-radius: 20px;
 border: 0;
 background: transparent;
 overflow: hidden;
 position: relative;
 padding: 0;
 cursor: pointer;
 appearance: none;
 -webkit-appearance: none;
 box-shadow: none;
}

.scene-preview-list {
 display: flex;
 flex-direction: column;
 gap: 10px;
 width: 100%;
 align-items: center;
}

.scene-preview-list.is-hidden {
 display: none;
}

.scene-preview-list__item {
 width: 100%;
 display: flex;
 justify-content: center;
 position: relative;
}

.scene-preview-list__button {
 display: block;
 width: min(100%, 425px);
 max-width: 425px;
 aspect-ratio: 1 / 1;
 border: 0;
 background: transparent;
 padding: 0;
 cursor: pointer;
 appearance: none;
 -webkit-appearance: none;
 position: relative;
 overflow: hidden;
 border-radius: 20px;
 min-height: 0;
}

@media (max-width: 979px) {
 .scene-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
 }

 .scene-preview-list__item {
  width: 100%;
  display: block;
 }

 .scene-preview-list__button {
  width: 100%;
  max-width: none;
 }
}

.scene-preview-list__canvas {
 display: block;
 width: 100%;
 height: 100%;
 border-radius: 20px;
}

/* =========================================================
   STAGE EXPANDIDA AMBIENTES
========================================================= */

.stage-scene {
 position: fixed;
 inset: 0;
 z-index: 9999;
 padding: 20px 22px 22px;
 background: rgba(239, 239, 238, 0.96);
 display: flex;
 flex-direction: column;
 gap: 14px;
}

.stage-scene--hidden {
 display: none;
}

.stage-scene__top {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 16px;
 flex-wrap: wrap;
 flex: 0 0 auto;
}

.stage-scene__tabs {
 display: flex;
 align-items: center;
 gap: 10px;
 flex-wrap: wrap;
}

.stage-scene__close {
 height: 42px;
 padding: 0 18px;
 border-radius: 999px;
 border: 1px solid rgba(0, 0, 0, 0.12);
 background: rgba(255, 255, 255, 0.86);
 color: rgba(0, 0, 0, 0.78);
 font-size: 14px;
 font-weight: 500;
 cursor: pointer;
}

.stage-scene__viewer {
 flex: 1;
 min-height: 0;
 width: 100%;
 overflow: hidden;
 background: transparent;
 box-shadow: none;
 border-radius: 0;
 display: flex;
 align-items: center;
 justify-content: center;
 position: relative;
 padding: 4px;
}

.stage-scene__media {
 position: relative;
 display: inline-block;
 flex: 0 0 auto;
 line-height: 0;
}

#stageSceneCanvas.scene-canvas {
 display: block;
 width: auto;
 height: auto;
 max-width: min(98vw, 1600px);
 max-height: calc(100vh - 90px);
 border-radius: 20px;
}

.stage-scene__label {
 position: absolute;
 z-index: 20;
 top: 16px;
 left: 16px;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 min-height: 44px;
 padding: 0 18px;
 border-radius: 999px;
 border: 2px solid rgba(255, 255, 255, 0.92);
 background: rgba(17, 17, 17, 0.92);
 color: #fff;
 font-size: 15px;
 font-weight: 600;
 box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
 backdrop-filter: blur(8px);
 pointer-events: none;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 max-width: calc(100% - 32px);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 979px) {
 html,
 body {
  height: 100%;
  overflow: hidden;
 }

 .app,
 .layout {
  height: 100%;
  min-height: 0;
 }

 .layout {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(320px, 0.56fr) minmax(0, 0.44fr);
 }

 .stage {
  min-height: 0;
  height: auto;
  position: sticky;
  top: 0;
  z-index: 2;
 }

 .stage__inner {
  height: 100%;
  min-height: 0;
  padding: 12px 16px 8px;
 }

 .panel {
  order: 2;
  min-height: 0;
  height: auto;
  overflow: hidden;
 }

 .panel__body {
  padding: 18px 16px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
 }

 .panel__footer {
  padding: 16px;
  flex: 0 0 auto;
 }

 .acc__btn {
  font-size: 15px;
  padding: 18px 0;
 }

 .dims__label,
 .colors__title,
 .colors__label,
 [data-cenefa-btn],
 .empty__text {
  font-size: 15px;
 }

 .dims__num {
  width: 32px;
  height: 100%;
  font-size: 15px;
 }

 .dims__input-wrap {
  height: 46px;
  min-width: 96px;
  padding: 0 12px;
 }

 .dims__range {
  height: 20px;
 }

 .dims__range::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -9px;
 }

 .dims__range::-moz-range-thumb {
  width: 20px;
  height: 20px;
 }

 .swatches {
  grid-template-columns: repeat(4, minmax(0, 1fr));
 }

 [data-cenefa="1"] > div {
  grid-template-columns: 1fr;
 }

 [data-cenefa-btn] {
  height: 46px !important;
 }

 .simulator-title h1 {
  font-size: 15px;
 }

 .zoomFab {
  left: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
 }

 .scenes {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
 }

 .scenes__inner {
  padding: 16px;
 }

 .scenes__title {
  font-size: 13px;
 }

 .scene-tabs {
  gap: 8px;
  margin-bottom: 14px;
 }

 .scene-tab {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
 }

 .scene-preview,
 .scene-preview__placeholder {
  min-height: 150px;
 }

 .scenes--global {
  display: none;
 }

 .popular-combos__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
 }

 .popular-combo-card {
  padding: 6px;
  border-radius: 10px;
 }

 .popular-combo-card__rug {
  aspect-ratio: 0.9 / 1;
  border-radius: 8px;
 }

 .popular-combo-card__line {
  font-size: 11px;
 }

 .popular-combo-card__tag {
  display: none;
 }

 .stage-scene {
  padding: 14px;
  gap: 12px;
 }

 .stage-scene__viewer {
  padding: 0;
 }

 .stage-scene__media {
  max-width: 100%;
  max-height: calc(100vh - 86px);
 }

 #stageSceneCanvas.scene-canvas {
  max-width: 100%;
  max-height: calc(100vh - 86px);
 }

 .stage-scene__label {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
 }

 .stage-scene__close {
  height: 40px;
  padding: 0 16px;
 }
}

@media (max-width: 640px) {
 .layout {
  grid-template-rows: minmax(340px, 0.6fr) minmax(0, 0.4fr);
 }

 .stage__inner {
  padding: 10px 14px 6px;
 }

 .shape-picker {
  gap: 10px;
  padding: 16px 4px;
 }

 .shape-card {
  min-height: 128px;
  border-radius: 20px;
  padding: 14px 10px 12px;
 }

 .shape-card__media {
  min-height: 62px;
 }

 .shape-card__preview--rect {
  width: 58px;
  height: 58px;
 }

 .shape-card__preview--circle {
  width: 64px;
  height: 64px;
 }

 .shape-card__label {
  font-size: 13px;
 }
}

@media (max-width: 520px) {
 .layout {
  grid-template-rows: minmax(360px, 0.62fr) minmax(0, 0.38fr);
 }

 .stage__inner {
  padding: 8px 12px 4px;
 }

 .zoomFab {
  left: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
 }
}

.dims-note {
 font-size: 12px;
 color: rgba(0, 0, 0, 0.5);
 margin-top: 8px;
}

/* =========================================================
   EMAIL MODAL
========================================================= */

.email-modal {
 position: fixed;
 inset: 0;
 z-index: 99999;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 24px;
}

.email-modal.is-hidden {
 display: none;
}

.email-modal__overlay {
 position: absolute;
 inset: 0;
 background: rgba(0, 0, 0, 0.34);
 backdrop-filter: blur(2px);
}

.email-modal__dialog {
 position: relative;
 z-index: 1;
 width: min(100%, 430px);
 background: #f5f5f3;
 box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
 padding: 42px 42px 34px;
}

.email-modal__close {
 position: absolute;
 top: 14px;
 right: 14px;
 width: 36px;
 height: 36px;
 border: 0;
 background: transparent;
 color: rgba(0, 0, 0, 0.72);
 font-size: 32px;
 line-height: 1;
 cursor: pointer;
}

.email-modal__title {
 margin: 0 0 14px;
 font-size: 30px;
 line-height: 0.95;
 font-weight: 700;
 letter-spacing: 0.01em;
 color: #111;
}

.email-modal__text {
 margin: 0 0 28px;
 font-size: 14px;
 line-height: 1.45;
 color: rgba(0, 0, 0, 0.82);
 max-width: 320px;
}

.email-modal__form {
 display: flex;
 flex-direction: column;
 gap: 12px;
}

.email-modal__input {
 width: 100%;
 height: 44px;
 padding: 0 14px;
 border: 1px solid rgba(0, 0, 0, 0.48);
 border-radius: 0;
 background: #fff;
 color: #111;
 font-size: 14px;
 outline: none;
}

.email-modal__input:focus {
 border-color: #111;
}

textarea.email-modal__input {
 height: auto;
 min-height: 44px;
 padding: 12px 14px;
 resize: vertical;
}

.email-modal__submit {
 position: relative;
 width: 100%;
 height: 44px;
 border: 0;
 background: #000;
 color: #fff;
 font-size: 14px;
 font-weight: 500;
 cursor: pointer;
 display: inline-flex;
 align-items: center;
 justify-content: center;
}

.email-modal__submit:disabled {
 cursor: not-allowed;
 opacity: 0.82;
}

.email-modal__submit-spinner {
 display: none;
 width: 18px;
 height: 18px;
 border-radius: 999px;
 border: 2px solid rgba(255, 255, 255, 0.28);
 border-top-color: #fff;
 animation: emailModalSpin 0.7s linear infinite;
}

.email-modal__submit.is-loading .email-modal__submit-label {
 display: none;
}

.email-modal__submit.is-loading .email-modal__submit-spinner {
 display: inline-flex;
}

@keyframes emailModalSpin {
 from {
  transform: rotate(0deg);
 }
 to {
  transform: rotate(360deg);
 }
}

@media (max-width: 640px) {
 .email-modal {
  padding: 16px;
 }

 .email-modal__dialog {
  width: 100%;
  padding: 34px 22px 24px;
 }

 .email-modal__title {
  font-size: 24px;
 }

 .email-modal__text {
  font-size: 13px;
  max-width: none;
 }
}

.email-modal__submit {
 position: relative;
 width: 100%;
 height: 44px;
 border: 0;
 background: #111;
 color: #fff;
 font-size: 14px;
 font-weight: 500;
 cursor: pointer;
}

.email-modal__submit-label {
 display: inline-block;
}

.email-modal__submit-spinner {
 display: none;
 width: 18px;
 height: 18px;
 border-radius: 999px;
 border: 2px solid rgba(255, 255, 255, 0.28);
 border-top-color: rgba(255, 255, 255, 1);
 animation: email-modal-spin 0.7s linear infinite;
}

.email-modal__submit.is-loading {
 pointer-events: none;
}

.email-modal__submit.is-loading .email-modal__submit-label {
 opacity: 0;
}

.email-modal__submit.is-loading .email-modal__submit-spinner {
 display: inline-block;
 position: absolute;
 left: 50%;
 top: 50%;
 transform: translate(-50%, -50%);
}

@keyframes email-modal-spin {
 from {
  transform: translate(-50%, -50%) rotate(0deg);
 }
 to {
  transform: translate(-50%, -50%) rotate(360deg);
 }
}
.stage-scene__media {
 position: relative;
}

.stage-scene__nav {
 position: absolute;
 top: 50%;
 transform: translateY(-50%) scale(0.85);
 z-index: 30;
 width: 58px;
 height: 58px;
 border-radius: 999px;
 border: 0;
 background: rgba(255, 255, 255, 0.92);
 color: #111;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
 transition:
  transform 0.22s ease,
  background 0.22s ease,
  box-shadow 0.22s ease,
  opacity 0.22s ease;
 font-size: 22px;
 line-height: 1;
}

.stage-scene__nav--prev {
 left: 16px;
}

.stage-scene__nav--next {
 right: 16px;
}

.stage-scene__nav:hover {
 transform: translateY(-50%) scale(0.85);
 background: #fff;
 box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.other-gallery {
 display: grid;
 grid-template-columns: repeat(2, minmax(0, 1fr));
 gap: 12px;
 margin-top: 16px;
}

.other-gallery.is-hidden {
 display: none;
}

.other-gallery__item {
 border: 0;
 background: transparent;
 padding: 0;
 cursor: pointer;
 border-radius: 18px;
 overflow: hidden;
 position: relative;
 transition:
  transform 0.28s ease,
  box-shadow 0.28s ease,
  opacity 0.28s ease;
}

.other-gallery__item:hover {
 transform: translateY(-3px);
 box-shadow: 0 18px 36px rgba(0, 0, 0, 0.14);
}

.other-gallery__img {
 display: block;
 width: 100%;
 aspect-ratio: 1 / 1;
 object-fit: cover;
}

.other-overlay {
 position: fixed;
 inset: 0;
 background: rgba(8, 8, 8, 0.2);
 backdrop-filter: blur(2px);
 -webkit-backdrop-filter: blur(2px);
 z-index: 9999;
 display: flex;
 align-items: center;
 justify-content: center;
 opacity: 0;
 pointer-events: none;
 transition:
  opacity 0.26s ease,
  background 0.26s ease;
}

.other-overlay.is-hidden {
 display: none;
}

.other-overlay.is-visible {
 opacity: 1;
 pointer-events: auto;
 background: rgba(8, 8, 8, 0.76);
}

.other-overlay__close {
 position: absolute;
 top: 18px;
 left: 18px;
 z-index: 20;
 width: 44px;
 height: 44px;
 border: 0;
 border-radius: 999px;
 background: rgba(255, 255, 255, 0.92);
 color: #111;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 font-size: 24px;
 line-height: 1;
 cursor: pointer;
 box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
 transition:
  transform 0.22s ease,
  background 0.22s ease,
  box-shadow 0.22s ease;
}

.other-overlay__close:hover {
 transform: scale(1.06);
 background: #fff;
 box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.other-overlay__nav {
 position: absolute;
 top: 50%;
 transform: translateY(-50%);
 z-index: 20;
 width: 58px;
 height: 58px;
 border-radius: 999px;
 border: 0;
 background: rgba(255, 255, 255, 0.92);
 color: #111;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 cursor: pointer;
 box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
 transition:
  transform 0.22s ease,
  background 0.22s ease,
  box-shadow 0.22s ease,
  opacity 0.22s ease;
 font-size: 22px;
 line-height: 1;
}

.other-overlay__nav:hover {
 transform: translateY(-50%) scale(1.06);
 background: #fff;
 box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

/* Desktop: más pegadas al carrusel, no al borde de pantalla */
.other-overlay__nav--prev {
 left: max(24px, calc(50vw - 620px));
}

.other-overlay__nav--next {
 right: max(24px, calc(50vw - 620px));
}

.other-carousel {
 width: min(100%, 94vw);
 overflow: hidden;
 user-select: none;
 touch-action: pan-y;
}

.other-carousel__track {
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 28px;
 min-height: min(72vh, 760px);
 transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
 will-change: transform;
}

.other-carousel__track.is-dragging {
 transition: none;
 cursor: grabbing;
}

.other-carousel__slide {
 border-radius: 28px;
 overflow: hidden;
 position: relative;
 flex: 0 0 auto;
 background: rgba(255, 255, 255, 0.06);
 transition:
  transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
  opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
  filter 0.55s cubic-bezier(0.22, 1, 0.36, 1),
  box-shadow 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.other-carousel__slide img {
 display: block;
 width: 100%;
 height: 100%;
 object-fit: cover;
 pointer-events: none;
 user-select: none;
}

/* Principal */
.other-carousel__slide--center {
 width: min(760px, 56vw);
 height: min(460px, 58vh);
 opacity: 1;
 transform: scale(1);
 filter: blur(0);
 box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
}

/* Laterales: igual que la principal, pero más pequeñas */
.other-carousel__slide--side {
 width: min(270px, 18vw);
 height: min(320px, 40vh);
 opacity: 0.5;
 transform: scale(0.88);
 filter: blur(0.15px);
 box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.other-carousel__slide--side.is-left {
 transform: scale(0.88) translateX(10px);
}

.other-carousel__slide--side.is-right {
 transform: scale(0.88) translateX(-10px);
}

@media (max-width: 980px) {
 .other-overlay__nav {
  width: 50px;
  height: 50px;
  font-size: 20px;
 }

 .other-overlay__nav--prev {
  left: 16px;
 }

 .other-overlay__nav--next {
  right: 16px;
 }

 .other-carousel__track {
  gap: 16px;
  min-height: auto;
 }

 .other-carousel__slide--center {
  width: min(84vw, 760px);
  height: min(420px, 52vh);
 }

 .other-carousel__slide--side {
  width: 18vw;
  height: min(220px, 30vh);
  opacity: 0.34;
  transform: scale(0.84);
 }

 .other-carousel__slide--side.is-left {
  transform: scale(0.84) translateX(8px);
 }

 .other-carousel__slide--side.is-right {
  transform: scale(0.84) translateX(-8px);
 }
}

@media (max-width: 640px) {
 .other-overlay__close {
  top: 14px;
  left: 14px;
  width: 42px;
  height: 42px;
 }

 .other-overlay__nav--prev {
  left: 10px;
 }

 .other-overlay__nav--next {
  right: 10px;
 }

 .other-carousel {
  width: 100vw;
  padding: 0 10px;
  box-sizing: border-box;
 }

 .other-carousel__track {
  gap: 10px;
 }

 .other-carousel__slide--center {
  width: 78vw;
  height: min(360px, 46vh);
  border-radius: 22px;
 }

 .other-carousel__slide--side {
  width: 20vw;
  height: min(150px, 20vh);
  opacity: 0.24;
  transform: scale(0.8);
 }

 .other-carousel__slide--side.is-left {
  transform: scale(0.8) translateX(6px);
 }

 .other-carousel__slide--side.is-right {
  transform: scale(0.8) translateX(-6px);
 }
}

.ui-toast {
 position: fixed;
 left: 50%;
 bottom: 110px;
 transform: translateX(-50%) translateY(12px);
 z-index: 99999;
 opacity: 0;
 pointer-events: none;
 transition:
  opacity 0.22s ease,
  transform 0.22s ease;
}

.ui-toast.is-visible {
 opacity: 1;
 transform: translateX(-50%) translateY(0);
}

.ui-toast__inner {
 min-width: 240px;
 max-width: min(420px, calc(100vw - 32px));
 padding: 12px 18px;
 border-radius: 999px;
 background: rgba(255, 255, 255, 0.92);
 border: 1px solid rgba(0, 0, 0, 0.08);
 color: #111;
 font-size: 14px;
 line-height: 1.35;
 font-weight: 500;
 text-align: center;
 box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
 backdrop-filter: blur(10px);
 -webkit-backdrop-filter: blur(10px);
}

@media (max-width: 640px) {
 .ui-toast {
  bottom: 94px;
 }

 .ui-toast__inner {
  max-width: calc(100vw - 24px);
  padding: 11px 16px;
  font-size: 13px;
 }
}

/* Icono de información en la esquina superior derecha del stage,
   con tooltip al pasar por encima o al hacer foco con teclado. */
.stage__inner {
 position: relative;
}

/* =========================================================
   STAGE INFO — Icono "i" con tooltip de aviso de color
   ========================================================= */

.stage__info {
 position: absolute;
 top: 14px;
 right: 14px;
 z-index: 9;
}

.stage__info.is-hidden {
 display: none;
}

/* Botón "i" */
.stage__info-btn {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 34px;
 height: 34px;
 padding: 0;
 border: 1px solid rgba(0, 0, 0, 0.12);
 border-radius: 999px;
 background: rgba(255, 255, 255, 0.94);
 color: rgba(0, 0, 0, 0.55);
 cursor: pointer;
 backdrop-filter: blur(10px);
 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
 transition:
  color 0.18s ease,
  border-color 0.18s ease,
  background 0.18s ease,
  transform 0.18s ease;
}

.stage__info-btn:hover,
.stage__info-btn:focus-visible {
 color: rgba(0, 0, 0, 0.82);
 border-color: rgba(0, 0, 0, 0.22);
 outline: none;
}

.stage__info-btn:active {
 transform: scale(0.96);
}

/* Estado "ya cerrado": el botón aparece silenciado */
.stage__info-btn[aria-expanded="false"] {
 color: rgba(0, 0, 0, 0.45);
}

/* Tooltip — controlado por la clase .is-open */
.stage__info-tooltip {
 position: absolute;
 top: calc(100% + 10px);
 right: 0;
 width: 260px;
 padding: 12px 36px 12px 14px; /* hueco a la derecha para la × */
 background: rgba(20, 20, 20, 0.92);
 color: #fff;
 border-radius: 8px;
 font-family: "Comfortaa", "HelveticaNeue", Helvetica, Arial, sans-serif;
 font-weight: 400;
 font-size: 11px;
 line-height: 1.45;
 box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
 opacity: 0;
 visibility: hidden;
 transform: translateY(-4px);
 transition:
  opacity 0.2s ease,
  transform 0.2s ease,
  visibility 0.2s ease;
 /* IMPORTANTE: NO ponemos pointer-events: none, o la × no será clicable */
}

.stage__info-tooltip.is-open {
 opacity: 1;
 visibility: visible;
 transform: translateY(0);
}

/* Flechita pequeña apuntando al botón */
.stage__info-tooltip::before {
 content: "";
 position: absolute;
 top: -5px;
 right: 12px;
 width: 10px;
 height: 10px;
 background: rgba(20, 20, 20, 0.92);
 transform: rotate(45deg);
 border-radius: 2px;
}

/* "Puente" invisible entre el botón y el tooltip para evitar mouseleave en el hueco */
.stage__info-tooltip::after {
 content: "";
 position: absolute;
 top: -12px;
 right: 0;
 left: 0;
 height: 12px;
}

/* Botón × dentro del tooltip */
.stage__info-tooltip-close {
 position: absolute;
 top: 6px;
 right: 6px;
 width: 28px;
 height: 28px;
 padding: 0;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 border: 0;
 border-radius: 50%;
 background: transparent;
 color: rgba(255, 255, 255, 0.85);
 cursor: pointer;
 transition:
  background 0.15s ease,
  color 0.15s ease;
}

.stage__info-tooltip-close:hover,
.stage__info-tooltip-close:focus-visible {
 background: rgba(255, 255, 255, 0.18);
 color: #fff;
 outline: none;
}

/* Tablet */
@media (max-width: 980px) {
 .stage__info {
  top: 10px;
  right: 10px;
 }
 .stage__info-btn {
  width: 32px;
  height: 32px;
 }
 .stage__info-tooltip {
  width: 220px;
  font-size: 10.5px;
 }
}

/* Móvil */
@media (max-width: 600px) {
 .stage__info-tooltip {
  width: min(240px, calc(100vw - 60px));
  font-size: 10px;
 }
}

/* =========================================================
   NUEVO: DIMENSIONES MÁS COMUNES
========================================================= */

.dims-presets {
 padding: 18px 0 6px;
 border-top: 1px solid var(--line);
}

.dims-presets.is-hidden {
 display: none;
}

.dims-presets__title {
 font-size: 15px;
 font-weight: 500;
 color: rgba(0, 0, 0, 0.96);
}

/* Cabecera desplegable */
.dims-presets__toggle {
 display: flex;
 align-items: center;
 justify-content: space-between;
 width: 100%;
 padding: 0;
 margin: 0 0 14px;
 border: 0;
 background: none;
 font: inherit;
 text-align: left;
 cursor: pointer;
}

.dims-presets__toggle[aria-expanded="false"] {
 margin-bottom: 4px;
}

.dims-presets__toggle:focus-visible {
 outline: 2px solid #111;
 outline-offset: 4px;
 border-radius: 6px;
}

.dims-presets__chev {
 width: 9px;
 height: 9px;
 margin-right: 4px;
 border-right: 2px solid #111;
 border-bottom: 2px solid #111;
 transform: rotate(45deg);
 transition: transform 0.2s ease;
}

.dims-presets__toggle[aria-expanded="true"] .dims-presets__chev {
 transform: rotate(-135deg);
}

.dims-presets__list[hidden] {
 display: none;
}

.dims-presets__list {
 display: grid;
 gap: 10px;
}

.dims-preset {
 display: flex;
 align-items: center;
 gap: 14px;
}

.dims-preset__btn {
 flex: 0 0 auto;
 min-width: 150px;
 height: 40px;
 padding: 0 18px;
 border: 0;
 border-radius: 999px;
 background: #111;
 color: #fff;
 font-size: 14px;
 font-weight: 700;
 letter-spacing: 0.01em;
 cursor: pointer;
 transition:
  background 0.18s ease,
  box-shadow 0.18s ease,
  transform 0.12s ease;
}

.dims-preset__btn:hover {
 background: #2a2a2a;
}

.dims-preset__btn:active {
 transform: scale(0.98);
}

.dims-preset__btn:focus-visible {
 outline: none;
 box-shadow:
  0 0 0 2px #fff,
  0 0 0 4px rgba(0, 0, 0, 0.55);
}

/* Medida seleccionada: anillo alrededor del botón */
.dims-preset__btn.is-active {
 box-shadow:
  0 0 0 2px #fff,
  0 0 0 4px #111;
}

.dims-preset__icons {
 display: inline-flex;
 align-items: center;
 gap: 10px;
 color: rgba(0, 0, 0, 0.78);
}

.dims-preset__icon {
 width: 40px;
 height: 24px;
}

.dims-preset__icon--wide {
 width: 48px;
}

.dims-preset__icon--narrow {
 width: 30px;
}

/* =========================================================
   NUEVO: AVISO DE COLOR FIJO (debajo de la alfombra)
   Sustituye al antiguo botón "i" + tooltip (.stage__info).
========================================================= */

.stage-notice {
 position: absolute;
 z-index: 6;
 display: flex;
 align-items: center;
 gap: 14px;
 padding: 12px 20px;
 background: #111;
 color: #fff;
 border-radius: 14px;
 box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
 transition: opacity 0.25s ease;
}

/* Oculto pero medible (RugRenderer reserva su altura). */
.stage-notice.is-hidden {
 opacity: 0;
 visibility: hidden;
}

.stage-notice__icon {
 flex: 0 0 auto;
}

.stage-notice__text {
 margin: 0;
 font-size: 12.5px;
 font-weight: 700;
 line-height: 1.4;
}

@media (max-width: 979px) {
 .stage-notice {
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
 }

 .stage-notice__icon {
  width: 18px;
  height: 18px;
 }

 .stage-notice__text {
  font-size: 10.5px;
  line-height: 1.35;
 }
}

/* =========================================================
   NUEVO: LUPA DE DETALLE (esquina inferior derecha de la alfombra)
   Sustituye al antiguo .zoomFab
========================================================= */

.detail-trigger {
 position: absolute;
 z-index: 9;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 0;
 border: 2px dotted rgba(0, 0, 0, 0.78);
 border-radius: 10px;
 background: rgba(255, 255, 255, 0.16);
 color: rgba(0, 0, 0, 0.75);
 cursor: zoom-in;
 transition:
  background 0.18s ease,
  color 0.18s ease,
  border-color 0.18s ease;
}

.detail-trigger.is-hidden {
 display: none;
}

.detail-trigger__icon {
 width: 46%;
 max-width: 42px;
 height: auto;
 filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.55));
}

.detail-trigger:hover,
.detail-trigger:focus-visible,
.detail-trigger.is-active {
 background: rgba(255, 255, 255, 0.32);
 color: rgba(0, 0, 0, 0.9);
 border-color: #000;
 outline: none;
}

/* =========================================================
   NUEVO: CARD "DETALLE" (rediseño)
   Cabecera + imagen ampliada + leyenda de materiales.
========================================================= */

.detail-card {
 position: absolute;
 z-index: 20;
 left: 0;
 top: 0;
 width: max-content;
 padding: 14px 14px 12px;
 background: #fff;
 border-radius: 20px;
 box-shadow:
  0 1px 0 rgba(0, 0, 0, 0.04),
  0 12px 28px rgba(0, 0, 0, 0.14),
  0 32px 64px rgba(0, 0, 0, 0.1);
 opacity: 0;
 visibility: hidden;
 transform: scale(0.94) translateY(6px);
 pointer-events: none;
 transition:
  opacity 0.18s ease,
  transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1),
  visibility 0.24s;
}

.detail-card.is-open {
 opacity: 1;
 visibility: visible;
 transform: none;
 pointer-events: auto;
}

.detail-card__head {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 padding: 2px 2px 12px;
}

.detail-card__title {
 font-size: 17px;
 font-weight: 700;
 color: #111;
 line-height: 1.15;
}

.detail-card__subtitle {
 margin-top: 3px;
 font-size: 11.5px;
 color: rgba(0, 0, 0, 0.5);
 line-height: 1.3;
}

.detail-card__close {
 flex: 0 0 auto;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 32px;
 height: 32px;
 padding: 0;
 border: 0;
 border-radius: 999px;
 background: #111;
 color: #fff;
 cursor: pointer;
 transition:
  background 0.15s ease,
  transform 0.12s ease;
}

.detail-card__close:hover {
 background: #333;
}

.detail-card__close:active {
 transform: scale(0.94);
}

.detail-card__close:focus-visible {
 outline: 2px solid #111;
 outline-offset: 2px;
}

.detail-card__media {
 position: relative;
 border-radius: 14px;
 overflow: hidden;
 background: #e3e0da;
 line-height: 0;
}

/* Filo interior sutil para que la imagen "asiente" en la card */
.detail-card__media::after {
 content: "";
 position: absolute;
 inset: 0;
 border-radius: inherit;
 box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
 pointer-events: none;
}

.detail-card__canvas {
 display: block;
 width: 280px;
 height: 300px;
}

/* Leyenda de materiales */
.detail-card__legend {
 list-style: none;
 margin: 0;
 padding: 10px 2px 0;
 display: grid;
 gap: 8px;
}

.detail-legend__item {
 display: grid;
 grid-template-columns: 28px 1fr auto;
 align-items: center;
 gap: 10px;
}

.detail-legend__chip {
 width: 28px;
 height: 28px;
 border-radius: 8px;
 background-color: #d9d6cf;
 background-size: cover;
 background-position: center;
 box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.detail-legend__text {
 display: flex;
 flex-direction: column;
 min-width: 0;
}

.detail-legend__role {
 font-size: 10.5px;
 color: rgba(0, 0, 0, 0.5);
 line-height: 1.2;
}

.detail-legend__name {
 font-size: 13px;
 font-weight: 700;
 color: #111;
 line-height: 1.25;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}

.detail-legend__collection {
 font-size: 10.5px;
 color: rgba(0, 0, 0, 0.45);
 white-space: nowrap;
}

/* =========================================================
   NUEVO: CARD "DETALLE" EN MÓVIL/TABLET
   Centrada SOLO en la zona de la alfombra, con velo suave.
   El tamaño del canvas lo ajusta DetailCardManager.fitModalSize().
========================================================= */

.detail-backdrop {
 position: absolute;
 inset: 0;
 z-index: 30;
 background: rgba(0, 0, 0, 0.32);
 -webkit-backdrop-filter: blur(2px);
 backdrop-filter: blur(2px);
 opacity: 0;
 visibility: hidden;
 transition:
  opacity 0.22s ease,
  visibility 0.22s;
}

.detail-backdrop.is-open {
 opacity: 1;
 visibility: visible;
}

.detail-card.is-modal {
 z-index: 31;
 left: 50%;
 top: 50%;
 padding: 12px 12px 10px;
 border-radius: 18px;
 transform: translate(-50%, -48%) scale(0.96);
 transform-origin: 50% 50%;
}

.detail-card.is-modal.is-open {
 transform: translate(-50%, -50%);
}

.detail-card.is-modal .detail-card__head {
 padding-bottom: 10px;
}

.detail-card.is-modal .detail-card__title {
 font-size: 15px;
}

.detail-card.is-modal .detail-card__subtitle {
 font-size: 10.5px;
}

.detail-card.is-modal .detail-card__close {
 width: 30px;
 height: 30px;
}

.detail-card.is-modal .detail-card__media {
 border-radius: 12px;
}

.detail-card.is-modal .detail-card__legend {
 padding-top: 8px;
 gap: 6px;
}

.detail-card.is-modal .detail-legend__item {
 grid-template-columns: 24px 1fr auto;
 gap: 8px;
}

.detail-card.is-modal .detail-legend__chip {
 width: 24px;
 height: 24px;
 border-radius: 7px;
}

@media (prefers-reduced-motion: reduce) {
 .detail-card,
 .detail-card.is-open {
  transition: opacity 0.12s linear;
  transform: none;
 }

 .detail-card.is-modal,
 .detail-card.is-modal.is-open {
  transform: translate(-50%, -50%);
 }
}

/* =========================================================
   CAMBIO: más alto para la alfombra
   - Menos padding vertical en la zona de la alfombra.
   - Aviso de color más compacto (misma información, menos alto).
========================================================= */

.stage__inner {
 padding-top: 8px;
 padding-bottom: 8px;
}

.stage-notice {
 gap: 12px;
 padding: 9px 16px;
 border-radius: 12px;
}

.stage-notice__icon {
 width: 22px;
 height: 22px;
}

.stage-notice__text {
 font-size: 12px;
 line-height: 1.35;
}

@media (max-width: 979px) {
 .stage__inner {
  padding-top: 6px;
  padding-bottom: 4px;
 }

 .stage-notice {
  gap: 8px;
  padding: 6px 10px;
  border-radius: 9px;
 }

 .stage-notice__icon {
  width: 16px;
  height: 16px;
 }

 .stage-notice__text {
  font-size: 10px;
  line-height: 1.3;
 }
}

/* CAMBIO: ancho fijo del aviso (centrado bajo la alfombra por JS).
   Así su altura no cambia al cambiar las medidas y la alfombra no "rebota". */
.stage-notice {
 width: min(620px, calc(100% - 32px));
}

@media (max-width: 979px) {
 .stage-notice {
  width: calc(100% - 24px);
 }
}

/* =========================================================
   CAMBIO: imagen del "Detalle del tejido" con bordes rectos
========================================================= */

.detail-card__media,
.detail-card.is-modal .detail-card__media {
 border-radius: 0;
}

/* =========================================================
   CAMBIO: AVISO DE COLOR COMO BOTÓN "i"
   El botón va en el cruce de las cotas (posición por JS) y al
   pulsarlo se abre el mensaje. Sustituye al aviso fijo (.stage-notice).
========================================================= */

.stage-info {
 position: absolute;
 z-index: 12;
 left: 0;
 top: 0;
 width: 28px;
 height: 28px;
}

.stage-info.is-hidden {
 display: none;
}

.stage-info__btn {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 28px;
 height: 28px;
 padding: 0;
 border: 1px solid rgba(0, 0, 0, 0.16);
 border-radius: 999px;
 background: #fff;
 color: #111;
 cursor: pointer;
 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
 transition:
  background 0.15s ease,
  color 0.15s ease,
  border-color 0.15s ease,
  transform 0.12s ease;
}

.stage-info__btn:hover,
.stage-info__btn.is-active {
 background: #111;
 color: #fff;
 border-color: #111;
}

.stage-info__btn:active {
 transform: scale(0.94);
}

.stage-info__btn:focus-visible {
 outline: 2px solid #111;
 outline-offset: 2px;
}

/* Área táctil más generosa en móvil sin agrandar el botón */
@media (max-width: 979px) {
 .stage-info__btn::before {
  content: "";
  position: absolute;
  inset: -8px;
 }
}

.stage-info__pop {
 --arrow-x: calc(100% - 14px);
 position: absolute;
 z-index: 25;
 left: 0;
 top: 0;
 width: min(280px, calc(100% - 24px));
 padding: 12px 40px 12px 14px;
 background: #111;
 color: #fff;
 border-radius: 12px;
 box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
 opacity: 0;
 visibility: hidden;
 transform: translateY(-4px);
 transition:
  opacity 0.18s ease,
  transform 0.18s ease,
  visibility 0.18s;
}

.stage-info__pop.is-open {
 opacity: 1;
 visibility: visible;
 transform: none;
}

/* Flechita hacia el botón */
.stage-info__pop::before {
 content: "";
 position: absolute;
 top: -5px;
 left: calc(var(--arrow-x) - 5px);
 width: 10px;
 height: 10px;
 background: #111;
 border-radius: 2px;
 transform: rotate(45deg);
}

.stage-info__text {
 margin: 0;
 font-size: 12px;
 font-weight: 700;
 line-height: 1.45;
}

.stage-info__close {
 position: absolute;
 top: 8px;
 right: 8px;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 24px;
 height: 24px;
 padding: 0;
 border: 0;
 border-radius: 999px;
 background: rgba(255, 255, 255, 0.14);
 color: #fff;
 cursor: pointer;
}

.stage-info__close:hover,
.stage-info__close:focus-visible {
 background: rgba(255, 255, 255, 0.26);
 outline: none;
}

@media (max-width: 979px) {
 .stage-info__text {
  font-size: 11px;
 }
}

@media (prefers-reduced-motion: reduce) {
 .stage-info__pop {
  transition: opacity 0.12s linear;
  transform: none;
 }
}

/* =========================================================
   NUEVO: PESTAÑAS EN MÓVIL COMO "LENGÜETAS" (core/MobileTabs.js)
   Solo por debajo de 980px (clase .has-mtabs en <html>).
   En escritorio no se ve nada de esto y el panel sigue igual.
========================================================= */

/* Escritorio: la envoltura de la hoja es neutra y las lengüetas no se ven */
.mtabs,
.mtabs-sheet__head {
 display: none;
}

.mtabs-sheet {
 display: contents;
}

/* ---- Móvil: sin título ni texto de inicio, alfombra a pantalla completa ---- */

.has-mtabs .simulator-title {
 display: none;
}

/* (En esta versión el texto de inicio sí se ve en móvil: ver más abajo) */
.has-mtabs--bottom .empty {
 display: none !important;
}

.has-mtabs .layout {
 display: block;
 position: relative;
 height: 100%;
}

.has-mtabs .stage {
 position: absolute;
 inset: 0;
 height: auto;
 min-height: 0;
 z-index: 1;
}

.has-mtabs .stage__inner {
 padding: 0;
}

/* El panel pasa a ser: [lengüetas (B)] + [hoja] + [pie], pegado abajo */
.has-mtabs .panel {
 position: absolute;
 left: 0;
 right: 0;
 bottom: 0;
 z-index: 5;
 height: auto;
 min-height: 0;
 display: flex;
 flex-direction: column;
 background: transparent;
 border: 0;
 -webkit-backdrop-filter: none;
 backdrop-filter: none;
 overflow: visible;
 pointer-events: none;
}

.has-mtabs .panel > * {
 pointer-events: auto;
}

/* ---- Hoja de opciones (sube desde abajo) ---- */

.has-mtabs .mtabs-sheet {
 display: flex;
 flex-direction: column;
 height: 0;
 overflow: hidden;
 background: #fff;
 border-radius: 22px 22px 0 0;
 box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.1);
 transition: height 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.has-mtabs .panel.is-sheet-open .mtabs-sheet {
 height: var(--mt-sheet-h, 280px);
}

.has-mtabs .mtabs-sheet__head {
 flex: 0 0 auto;
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 10px;
 padding: 12px 12px 6px 16px;
}

.mtabs-sheet__title {
 display: flex;
 align-items: center;
 gap: 10px;
 min-width: 0;
}

.mtabs-sheet__step {
 flex: 0 0 auto;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 24px;
 height: 24px;
 border-radius: 999px;
 background: #111;
 color: #fff;
 font-size: 12px;
 font-weight: 700;
}

.mtabs-sheet__name {
 font-size: 15px;
 font-weight: 700;
 color: #111;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}

.mtabs-sheet__close {
 flex: 0 0 auto;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 32px;
 height: 32px;
 padding: 0;
 border: 0;
 border-radius: 999px;
 background: rgba(0, 0, 0, 0.06);
 color: #111;
 cursor: pointer;
}

.mtabs-sheet__close:focus-visible {
 outline: 2px solid #111;
 outline-offset: 2px;
}

.has-mtabs .panel__body {
 flex: 1 1 auto;
 min-height: 0;
 overflow-y: auto;
 -webkit-overflow-scrolling: touch;
 padding: 4px 16px 16px;
}

/* Una sola sección visible, sin la cabecera del acordeón */
.has-mtabs .panel [data-acc] {
 display: none;
 border: 0;
}

.has-mtabs .panel [data-acc].is-tab-active {
 display: block;
}

.has-mtabs .panel [data-acc] > .acc__btn {
 display: none;
}

.has-mtabs .panel [data-acc].is-tab-active > [data-acc-content] {
 display: block !important;
 height: auto !important;
 overflow: visible !important;
}

.has-mtabs .panel [data-acc].is-tab-active > [data-acc-content] > :first-child {
 border-top: 0 !important;
}

/* ---- Pie (Descargar / email / WhatsApp) siempre visible ---- */

.has-mtabs .panel__footer {
 margin-top: 0;
 padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
 background: #fff;
 border-top: 1px solid var(--line);
}

.has-mtabs .footer-actions {
 gap: 8px;
}

.has-mtabs .cta {
 height: 42px;
 font-size: 14px;
}

.has-mtabs .icon-btn {
 width: 42px;
 height: 42px;
 flex: 0 0 auto;
}

/* ---- Lengüeta (común) ---- */

.mtabs__tab {
 position: relative;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 0;
 border: 0;
 background: #fff;
 color: #111;
 cursor: pointer;
 box-shadow:
  0 8px 20px rgba(0, 0, 0, 0.13),
  0 1px 3px rgba(0, 0, 0, 0.08);
 -webkit-tap-highlight-color: transparent;
 transition:
  background 0.15s ease,
  color 0.15s ease,
  transform 0.15s ease;
}

.mtabs__tab svg {
 width: 23px;
 height: 23px;
}

.mtabs__tab.is-active {
 background: #111;
 color: #fff;
}

.mtabs__tab:focus-visible {
 outline: 2px solid #111;
 outline-offset: 3px;
}

/* Número de paso (como en la maqueta) */
.mtabs__num {
 position: absolute;
 top: -6px;
 right: -6px;
 min-width: 20px;
 height: 20px;
 padding: 0 5px;
 display: flex;
 align-items: center;
 justify-content: center;
 border-radius: 999px;
 background: #111;
 color: #fff;
 font-size: 11px;
 font-weight: 700;
 line-height: 1;
}

.mtabs__tab.is-active .mtabs__num {
 background: #fff;
 color: #111;
 border-color: #111;
}

/* =========================================================
   VERSIÓN A: lengüetas pegadas al borde izquierdo de la pantalla
========================================================= */

.has-mtabs--left .mtabs--left {
 display: block;
 position: absolute;
 left: 0;
 top: 14px;
 z-index: 6;
}

.mtabs--left .mtabs__list {
 display: flex;
 flex-direction: column;
 gap: 12px;
}

.mtabs--left .mtabs__tab {
 width: 48px;
 height: 50px;
 padding-right: 4px;
 border-radius: 0 24px 24px 0;
}

.mtabs--left .mtabs__tab:active {
 transform: translateX(2px);
}

/* =========================================================
   VERSIÓN B: lengüetas en fila, apoyadas encima de la hoja
========================================================= */

.has-mtabs--bottom .mtabs--bottom {
 display: block;
 flex: 0 0 auto;
 padding: 8px 12px 0;
 pointer-events: none;
}

.mtabs--bottom .mtabs__list {
 display: flex;
 justify-content: center;
 gap: 10px;
}

.mtabs--bottom .mtabs__tab {
 pointer-events: auto;
 width: 48px;
 height: 40px;
 padding-top: 2px;
 border-radius: 22px 22px 0 0;
 box-shadow:
  0 -6px 16px rgba(0, 0, 0, 0.1),
  0 -1px 2px rgba(0, 0, 0, 0.06);
}

.mtabs--bottom .mtabs__tab:active {
 transform: translateY(2px);
}

/* Las lengüetas se apoyan directamente en la hoja / el pie */
.has-mtabs--bottom .panel__footer {
 border-top: 0;
 box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.06);
}

.has-mtabs--bottom .mtabs-sheet {
 border-radius: 0;
 box-shadow: none;
 border-bottom: 1px solid var(--line);
}

/* ---- Botón "i" en móvil: abajo a la izquierda, el mensaje sube ---- */

.stage-info__pop.is-up::before {
 top: auto;
 bottom: -5px;
}

@media (prefers-reduced-motion: reduce) {
 .has-mtabs .mtabs-sheet,
 .mtabs__tab {
  transition: none;
 }
}

/* Card "Detalle del tejido" abierta en móvil: la zona de la alfombra
   (con su velo) queda por encima de lengüetas, hoja y pie. */
.has-mtabs.detail-modal-open .stage {
 z-index: 8;
}

/* =========================================================
   Contenido COMPACTO dentro de la hoja de opciones (móvil)
   Menos alto para que la alfombra se siga viendo grande.
========================================================= */

.has-mtabs .mtabs-sheet__head {
 padding: 10px 12px 4px 16px;
}

.has-mtabs .panel__body {
 padding: 2px 16px 12px;
}

/* Forma: tarjetas en horizontal y bajitas */
.has-mtabs .shape-picker {
 gap: 10px;
 padding: 6px 0 4px;
}

.has-mtabs .shape-card {
 min-height: 0;
 flex-direction: row;
 justify-content: center;
 gap: 10px;
 padding: 10px 12px;
 border-radius: 14px;
}

.has-mtabs .shape-card__media {
 width: auto;
 min-height: 0;
}

.has-mtabs .shape-card__preview--rect {
 width: 30px;
 height: 30px;
}

.has-mtabs .shape-card__preview--circle {
 width: 32px;
 height: 32px;
}

.has-mtabs .shape-card__label {
 font-size: 13px;
}

/* Medidas */
.has-mtabs .dims {
 padding: 0 0 4px;
}

.has-mtabs .dims__row {
 padding: 8px 0 10px;
}

.has-mtabs .dims__top {
 margin-bottom: 4px;
}

.has-mtabs .dims__label {
 font-size: 14px;
}

.has-mtabs .dims__input-wrap {
 height: 36px;
 min-width: 84px;
}

.has-mtabs .dims-presets {
 padding: 10px 0 2px;
}

.has-mtabs .dims-presets__title {
 font-size: 14px;
 margin-bottom: 8px;
}

.has-mtabs .dims-presets__list {
 gap: 6px;
}

.has-mtabs .dims-preset__btn {
 height: 34px;
 min-width: 128px;
 font-size: 13px;
}

.has-mtabs .dims-note {
 margin: 6px 0 0;
 font-size: 11px;
}

/* Cenefa */
.has-mtabs [data-cenefa="1"] {
 padding: 4px 0 6px !important;
}

.has-mtabs [data-cenefa="1"] .cenefa-group {
 margin-bottom: 8px !important;
}

.has-mtabs [data-cenefa="1"] .cenefa-group > div {
 margin-bottom: 6px !important;
}

.has-mtabs [data-cenefa="1"] button {
 height: 36px !important;
}

/* Colecciones: muestras más pequeñas, 6 por fila */
.has-mtabs .collection-dropdown__btn {
 min-height: 44px;
 padding: 10px 0;
}

.has-mtabs .colors__group {
 padding: 10px 0;
}

.has-mtabs .colors__label {
 margin-bottom: 8px;
 font-size: 13px;
}

.has-mtabs .swatches {
 grid-template-columns: repeat(6, minmax(0, 1fr));
 gap: 8px;
 padding-left: 0;
 padding-right: 0;
}

/* Populares */
.has-mtabs .popular-combos {
 padding: 4px 0 8px;
}

.has-mtabs .popular-combos__grid {
 grid-template-columns: repeat(4, minmax(0, 1fr));
 gap: 6px;
}

/* En "Forma", una opción debajo de otra y a todo el ancho (las dos versiones) */
.has-mtabs .shape-picker {
 grid-template-columns: 1fr;
 gap: 8px;
}

.has-mtabs .shape-card {
 justify-content: flex-start;
 padding: 16px 18px;
 gap: 16px;
}

.has-mtabs .shape-card__preview--rect {
 width: 38px;
 height: 38px;
}

.has-mtabs .shape-card__preview--circle {
 width: 40px;
 height: 40px;
}

.has-mtabs .shape-card__label {
 font-size: 15px;
}

/* Lengüeta seleccionada: más larga para que se note cuál está activa */
.mtabs--left .mtabs__tab {
 transition:
  width 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
  background 0.15s ease,
  color 0.15s ease,
  transform 0.15s ease;
}

.mtabs--left .mtabs__tab.is-active {
 width: 58px;
 padding-left: 8px;
}

.mtabs--bottom .mtabs__list {
 align-items: flex-end;
}

.mtabs--bottom .mtabs__tab {
 transition:
  height 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
  background 0.15s ease,
  color 0.15s ease,
  transform 0.15s ease;
}

.mtabs--bottom .mtabs__tab.is-active {
 height: 52px;
 padding-top: 0;
}

@media (prefers-reduced-motion: reduce) {
 .mtabs--left .mtabs__tab,
 .mtabs--bottom .mtabs__tab {
  transition: none;
 }
}

/* La fila de lengüetas reserva siempre el alto de la activa (sin saltos) */
.mtabs--bottom .mtabs__list {
 min-height: 52px;
}

/* =========================================================
   Aviso de color: ESCRITORIO = mensaje completo debajo de la alfombra,
   MÓVIL = solo el botón "i".
========================================================= */

@media (min-width: 980px) {
 .stage-info,
 .stage-info__pop {
  display: none !important;
 }
}

@media (max-width: 979px) {
 .stage-notice {
  display: none !important;
 }
}

/* =========================================================
   VERSIÓN A (pestañas a la izquierda)
========================================================= */

/* Lupa del detalle: fondo más blanco para que se vea mejor */
.detail-trigger {
 background: rgba(255, 255, 255, 0.55);
}

.detail-trigger:hover,
.detail-trigger:focus-visible,
.detail-trigger.is-active {
 background: rgba(255, 255, 255, 0.72);
}

/* Móvil: texto de inicio en la zona de la alfombra, a la derecha de las
   lengüetas y por encima de la hoja de opciones */
.has-mtabs--left .empty {
 display: flex;
 position: absolute;
 left: 60px;
 right: 0;
 top: 0;
 bottom: var(--mt-reserve, 0px);
 padding: 16px 20px;
}

/* En móvil se sustituye el texto de escritorio por la entradilla con los pasos */
.has-mtabs--left .empty__text {
 display: none;
}

/* =========================================================
   ENTRADILLA MÓVIL (texto de inicio con los pasos)
   Tamaño 1: título · Tamaño 2: texto · Tamaño 3: pasos
========================================================= */

.empty-intro {
 display: none;
}

.has-mtabs--left .empty {
 align-items: center;
 justify-content: center;
 overflow-y: auto;
}

.has-mtabs--left .empty-intro {
 display: block;
 width: 100%;
 max-width: 320px;
 margin: auto 0;
 text-align: left;
 color: #111;
}

.empty-intro__title {
 margin: 0 0 8px;
 font-size: 20px;
 font-weight: 700;
 line-height: 1.2;
 color: rgba(0, 0, 0, 0.42);
}

.empty-intro__text {
 margin: 0 0 14px;
 font-size: 14px;
 line-height: 1.45;
 color: rgba(0, 0, 0, 0.42);
}

.empty-intro__steps {
 list-style: none;
 margin: 0;
 padding: 0;
 display: grid;
 gap: 9px;
}

.empty-intro__steps li {
 display: flex;
 align-items: flex-start;
 gap: 10px;
 font-size: 13px;
 line-height: 1.35;
 color: rgba(0, 0, 0, 0.42);
}

/* Número: círculo negro con número blanco */
.empty-intro__num {
 flex: 0 0 auto;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 20px;
 height: 20px;
 margin-top: -1px;
 border-radius: 999px;
 background: #111;
 color: #fff;
 font-size: 11px;
 font-weight: 700;
 line-height: 1;
}

/* Móviles bajos: un poco más compacto */
@media (max-height: 700px) {
 .empty-intro__title {
  font-size: 18px;
  margin-bottom: 6px;
 }

 .empty-intro__text {
  font-size: 13px;
  margin-bottom: 10px;
 }

 .empty-intro__steps {
  gap: 6px;
 }

 .empty-intro__steps li {
  font-size: 12px;
 }
}
