@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --bg: #f5f1ea;
  --bg-elevated: #ffffff;
  --card: #fff;
  --primary: #b0845a;
  --primary-hover: #9a7048;
  --accent: #b0845a;
  --accent-soft: #f0e8df;
  --text: #2c2419;
  --muted: #6b6358;
  --border: #e8dfd4;
  --border-soft: #efe8de;
  --shadow-sm: 0 1px 3px rgba(44, 36, 25, .06);
  --shadow-md: 0 10px 28px rgba(44, 36, 25, .08);
  --shadow-lg: 0 18px 44px rgba(44, 36, 25, .11);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Montserrat', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.app-shell {
  padding-top: 100px;
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(176, 132, 90, .12), transparent),
    var(--bg);
}
h1, h2, h3, .hero-medidas-title, .site-header-copy h1, .card h2, .resumen-header h2, #step-densidades h2, #step-extras h2, #em-step-densidades h2, #em-step-extras h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -.01em;
}
.container { max-width: 1240px; margin: 0 auto; padding: 2rem 1.25rem; }
.container.container-catalog {
  max-width: 1550px;
  padding: 2rem clamp(1rem, 3vw, 2.5rem) 3rem;
}
.container.container-product {
  max-width: none;
  width: 100%;
  padding: 0 clamp(1rem, 3vw, 2.5rem) 1.5rem;
}
.calc-header {
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid var(--border-soft);
  margin: 0 0 1.5rem;
  box-shadow: var(--shadow-sm);
  isolation: isolate;
}
.calc-header-inner {
  width: 100%;
  max-width: 1550px;
  margin: 0 auto;
  padding: .75rem clamp(1rem, 3vw, 2.5rem) 1rem;
  box-sizing: border-box;
  background: #fff;
}
.calc-logo-img {
  display: block;
  max-height: 52px;
  max-width: min(280px, 50vw);
  width: auto;
  object-fit: contain;
}
.calc-header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: .85rem;
}
.calc-header-main {
  display: block;
  width: 100%;
}
.calc-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}
.calc-back {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .4rem .45rem .4rem .9rem;
  margin-bottom: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
  transition: border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
  flex-shrink: 0;
}
.calc-back--end { justify-self: end; margin-left: 0; align-self: center; flex-shrink: 0; }
.calc-back:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(176, 132, 90, .15);
  transform: translateY(-1px);
}
.calc-back-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--primary);
  flex-shrink: 0;
}
.calc-header .stepper {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.product-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(0, 2fr) minmax(240px, 0.9fr);
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  align-items: start;
  width: 100%;
}
.product-drawing {
  position: sticky;
  top: var(--calc-header-offset, 7.5rem);
}
.product-drawing .product-hero-img {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-drawing .product-hero-img img {
  object-fit: contain;
  object-position: center;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
  padding: 1rem;
  display: block;
}
.product-content { min-width: 0; }
.price-panel {
  position: sticky;
  top: var(--calc-header-offset, 7.5rem);
}
.price-panel-inner {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-md);
}
.price-panel-title {
  margin: 0 0 1rem;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}
.price-lines { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.price-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  font-size: .88rem;
  line-height: 1.35;
}
.price-line span:first-child { flex: 1; min-width: 0; }
.price-line span:last-child { font-weight: 600; white-space: nowrap; color: inherit; flex-shrink: 0; padding-top: .05rem; }
.price-line-text { display: flex; flex-direction: column; gap: .15rem; color: var(--muted); min-width: 0; }
.price-line-title { color: var(--muted); line-height: 1.3; }
.price-line-sub { font-size: .82em; color: var(--text, #333); font-weight: 500; line-height: 1.3; }
.price-line-debug { font-size: .74em; color: var(--muted); font-weight: 500; line-height: 1.35; white-space: normal; word-break: break-word; }
.price-line.muted { font-size: .8rem; color: var(--muted); }
.price-panel-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 1rem;
  border-top: 2px solid var(--border);
  font-size: 1rem;
}
.price-panel-total strong {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--primary);
}
.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 0;
  border-bottom: none;
}
.product-hero-img {
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-hero-placeholder {
  width: 40%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-soft), #e8dfd4);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
}
.product-hero-info h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.hero-medidas-panel {
  align-self: start;
  min-width: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}
.hero-medidas-kicker {
  margin: 0 0 .35rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--primary);
}
.hero-medidas-title { margin: 0 0 .35rem; font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; }
.hero-medidas-sub { margin: 0 0 1.25rem; color: var(--muted); font-size: .95rem; }
.form-medidas .field { margin-bottom: 1rem; }
.form-medidas .field:last-of-type { margin-bottom: 0; }
.measure-field label { display: block; font-size: .95rem; font-weight: 600; margin-bottom: .4rem; color: var(--text); text-transform: none; }
.measure-field label .unit { font-weight: 500; color: var(--muted); font-size: .85rem; }
.measure-input {
  width: 100%;
  padding: .8rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 1.05rem;
  font-family: inherit;
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.measure-input:focus {
  outline: none;
  border-color: rgba(176, 132, 90, .55);
  box-shadow: 0 0 0 3px rgba(176, 132, 90, .14);
}
.hero-actions { display: flex; gap: .75rem; margin-top: 1.35rem; flex-wrap: wrap; }
.calc-foto-field { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.calc-foto-field label { display: block; font-size: .95rem; font-weight: 600; margin-bottom: .5rem; }
.calc-foto-drop {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  background: #fff;
  transition: border-color .15s, background .15s;
}
.calc-foto-drop.is-dragover { border-color: var(--primary); background: var(--accent-soft); }
.calc-foto-drop input[type=file] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.calc-foto-drop-text { margin: 0 0 .25rem; color: var(--muted); font-size: .9rem; }
.calc-foto-drop-text strong { color: var(--primary); }
.calc-foto-required { color: #dc2626; font-weight: 700; }
.calc-foto-status { margin-top: .5rem; }
.calc-foto-status--err { color: #dc2626; }
.calc-foto-preview {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .75rem;
  padding: .65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}
.calc-foto-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}
.calc-foto-meta { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; min-width: 0; }
.calc-foto-meta strong { font-size: .88rem; word-break: break-word; }
.calc-result-foto { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.calc-result-foto h3 { margin: 0 0 .65rem; font-size: 1rem; }
.calc-result-foto img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}
.form-medidas--compact .calc-foto-field { margin-top: .75rem; padding-top: .75rem; }
.form-medidas--compact .calc-foto-drop { padding: .65rem .75rem; }
.form-medidas--compact .calc-foto-drop .hint { display: none; }
.form-medidas--compact .calc-foto-thumb { width: 48px; height: 48px; }
.medidas-sticky {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem 1.15rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
}
.medidas-sticky-head {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}
.medidas-sticky-head strong { font-size: .95rem; }
.medidas-sticky-head .hint { font-size: .82rem; color: var(--muted); }
.form-medidas--compact .medidas-fields {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  align-items: flex-end;
}
.form-medidas--compact .measure-field {
  margin: 0;
  min-width: 120px;
  flex: 1 1 140px;
}
.form-medidas--compact .measure-field label {
  font-size: .82rem;
  margin-bottom: .3rem;
}
.form-medidas--compact .measure-input {
  padding: .55rem .7rem;
  font-size: 1rem;
}
.form-medidas--compact .measure-field .hint { display: none; }
#step-resumen h2, #step-densidades h2, #step-extras h2,
#em-step-resumen h2, #em-step-densidades h2, #em-step-extras h2 { margin-top: 0; font-size: 1.45rem; letter-spacing: -.02em; }
#step-densidades,
#step-extras,
#step-resumen,
#em-step-densidades,
#em-step-extras,
#em-step-resumen {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  overflow: visible;
}

.resumen-header { margin-bottom: 1.25rem; }
.resumen-header h2 { margin: 0 0 .25rem; font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.resumen-product { margin: 0 0 .35rem; font-size: 1.15rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.resumen-subtitle { margin: 0; color: var(--muted); font-size: .92rem; }
.resumen-wrap { min-height: 120px; }
.resumen-loading { margin: 0; padding: 2rem 1rem; text-align: center; color: var(--muted); font-size: .95rem; }
.resumen-card {
  background: linear-gradient(180deg, #fff 0%, #faf7f2 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, .06);
  overflow: hidden;
}
.resumen-card-product {
  padding: 1rem 1.25rem .85rem;
  border-bottom: 1px solid var(--border-soft);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.resumen-items { padding: 1rem 1.25rem .25rem; }
.resumen-totals {
  padding: .75rem 1.25rem 1.25rem;
  background: #fff;
  border-top: 1px solid var(--border);
}
.resumen-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 0;
  font-size: .95rem;
  border-bottom: 1px solid #f1f5f9;
}
.resumen-items .resumen-line:last-child { border-bottom: none; }
.resumen-totals .resumen-line { border-bottom: none; padding: .5rem 0; }
.resumen-line-label {
  color: var(--text);
  font-weight: 500;
  line-height: 1.35;
  min-width: 0;
}
.resumen-line-value {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.resumen-line--subtotal .resumen-line-label,
.resumen-line--subtotal .resumen-line-value { font-weight: 700; }
.resumen-line--tax .resumen-line-label { color: var(--muted); font-weight: 500; }
.resumen-line--tax .resumen-line-value { color: var(--muted); font-weight: 600; }
.resumen-line--discount .resumen-line-value { color: #059669; }
.resumen-grand-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .85rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border);
}
.resumen-grand-total-label {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.resumen-grand-total-value {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.resumen-foto {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .04);
}
.resumen-foto-head {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .75rem;
}
.resumen-foto-head strong { display: block; font-size: .95rem; }
.resumen-foto-head .hint { margin: .15rem 0 0; }
.resumen-foto-icon { font-size: 1.25rem; line-height: 1; }
.resumen-foto-img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
}
.resumen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.25rem;
}
.resumen-line-label .price-line-sub { display: block; font-size: .78rem; font-weight: 500; color: var(--muted); margin-top: .1rem; }
.resumen-line-label .price-line-debug { display: block; font-size: .74rem; font-weight: 500; color: var(--muted); margin-top: .15rem; }
@media (max-width: 1024px) {
  .product-layout {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }
  .product-drawing { position: static; max-width: min(480px, 100%); margin: 0 auto 1rem; }
  .price-panel { position: static; order: 3; }
  .calc-header-top {
    flex-wrap: wrap;
    gap: .65rem;
  }
  .calc-logo-img {
    max-height: 42px;
    max-width: min(180px, 42vw);
  }
  .calc-back { padding: .35rem .4rem; }
  .calc-back-text { display: none; }
  .calc-header .stepper {
    overflow-x: visible;
    justify-content: space-between;
    gap: 0;
    padding-bottom: 0;
    width: 100%;
  }
  .calc-header .stepper-item {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
  }
  .calc-header .stepper-label {
    font-size: .58rem;
    letter-spacing: .02em;
    padding: 0 .12rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .stepper { overflow-x: auto; justify-content: flex-start; gap: .25rem; padding-bottom: 1rem; -webkit-overflow-scrolling: touch; }
  .stepper-item { flex: 0 0 72px; }
  .stepper-progress { top: 15px; }
  .stepper-circle { width: 32px; height: 32px; font-size: .85rem; }
  .stepper-label { font-size: .62rem; }
  #extras-adicionales-list .extra-card-layout, #em-extras-list .extra-card-layout {
    flex-direction: column;
    gap: .65rem;
    padding: .85rem 1.15rem;
  }
  #extras-adicionales-list .extra-card-thumb, #em-extras-list .extra-card-thumb {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    height: 168px;
    padding: 0;
    margin-inline: 0;
  }
  #extras-adicionales-list .extra-card-main, #em-extras-list .extra-card-main {
    flex: 1 1 100%;
    width: 100%;
  }
  #extras-adicionales-list .toggle-row--extra, #em-extras-list .toggle-row--extra,
  #extras-adicionales-list .toggle-row-wrap--active .toggle-row--extra, #em-extras-list .toggle-row-wrap--active .toggle-row--extra {
    padding: 0;
  }
  #extras-adicionales-list .toggle-row-wrap--active .extra-expand--card .extra-expand-inner, #em-extras-list .toggle-row-wrap--active .extra-expand--card .extra-expand-inner {
    padding: .65rem 0 0;
  }
  #extras-adicionales-list .extra-detail-title, #em-extras-list .extra-detail-title {
    font-size: 1rem;
  }
  #extras-adicionales-list .extra-detail-desc, #em-extras-list .extra-detail-desc {
    font-size: .85rem;
  }
  #extras-adicionales-list .extra-var-dropdown.is-open .extra-var-dropdown-trigger, #em-extras-list .extra-var-dropdown.is-open .extra-var-dropdown-trigger {
    border-top-left-radius: var(--radius-sm);
    border-top-right-radius: var(--radius-sm);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  #extras-adicionales-list .extra-var-dropdown-panel, #em-extras-list .extra-var-dropdown-panel {
    bottom: auto;
    top: 100%;
    border-top: none;
    border-bottom: 1px solid var(--primary);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--shadow-md);
  }
}
@media (max-width: 640px) {
  .product-hero { grid-template-columns: 1fr; gap: 1.25rem; }
  .product-hero-info h1 { font-size: 1.5rem; text-align: center; }
  .calc-header .stepper-label { font-size: .52rem; }
}
.catalog-lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}
h1 { font-size: clamp(1.75rem, 3vw, 2.35rem); margin: 0 0 .5rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.subtitle { color: var(--muted); margin-bottom: 2rem; font-size: 1.05rem; }

/* —— Site header (catálogo) —— */
.site-header-logo-slot {
  justify-self: start;
  min-width: 0;
}
.site-header-spacer {
  justify-self: end;
  min-width: 0;
}
.site-header-tagline {
  margin: 0;
  justify-self: center;
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(.95rem, 1.8vw, 1.2rem);
  font-weight: 500;
  font-style: italic;
  color: #5c5348;
  line-height: 1.4;
  letter-spacing: .025em;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  isolation: isolate;
}
.site-header-inner {
  max-width: 1550px;
  margin: 0 auto;
  padding: .75rem clamp(1rem, 3vw, 2.5rem);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  background: #fff;
}
.site-brand {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: .65rem;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.02em;
  line-height: 0;
}
.site-header-copy {
  display: none;
}
.site-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--primary), #c99a6e);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(176, 132, 90, .28);
  line-height: 1;
}
.site-brand-logo {
  display: block;
  max-height: 52px;
  max-width: min(280px, 50vw);
  width: auto;
  height: auto;
  object-fit: contain;
}
@media (max-width: 720px) {
  .site-header-inner,
  .calc-header-top {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: .5rem;
  }
  .site-brand,
  .site-header-logo-slot {
    justify-self: center;
  }
  .site-header-spacer {
    display: none;
  }
  .site-header-tagline {
    font-size: .88rem;
    max-width: 20rem;
  }
  .calc-back--end {
    justify-self: center;
    margin-left: 0;
  }
  .site-brand-logo {
    max-height: 46px;
    max-width: min(220px, 70vw);
  }
}

/* —— Site footer (Espumafy) —— */
.site-footer-espumafy {
  --color-footer-bg: #2c2419;
  --color-footer-text: #d4cfc8;
  --color-footer-heading: #ffffff;
  --color-footer-border: #4a4035;
  --color-footer-icon: #b0845a;
  margin-top: 2.5rem;
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
}
.site-footer-grid {
  display: grid;
  gap: 2.5rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 3.5rem 1rem;
  box-sizing: border-box;
}
@media (min-width: 1024px) {
  .site-footer-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2rem;
    padding: 3.5rem 2rem;
  }
}
.site-footer-brand {
  min-width: 0;
}
.site-footer-logo {
  display: block;
  height: 4rem;
  width: auto;
  max-width: 100%;
}
.site-footer-tagline {
  margin: .75rem 0 0;
  max-width: 18rem;
  font-size: .875rem;
  line-height: 1.6;
  color: var(--color-footer-text);
}
.site-footer-heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-footer-heading);
}
.site-footer-links,
.site-footer-contact {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}
.site-footer-links li + li,
.site-footer-contact li + li {
  margin-top: .75rem;
}
.site-footer-links a,
.site-footer-bottom a {
  font-size: .875rem;
  color: var(--color-footer-text);
  text-decoration: none;
  transition: color .15s ease;
}
.site-footer-links a:hover,
.site-footer-bottom a:hover {
  color: var(--color-footer-heading);
}
.site-footer-link-strong {
  font-weight: 600;
  color: var(--color-footer-heading) !important;
}
.site-footer-contact-link {
  display: inline-flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .875rem;
  color: var(--color-footer-text);
  text-decoration: none;
  transition: color .15s ease;
}
.site-footer-contact-link:hover {
  color: var(--color-footer-heading);
}
.site-footer-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: .1rem;
  flex-shrink: 0;
  color: var(--color-footer-icon);
}
.site-footer-bottom {
  border-top: 1px solid var(--color-footer-border);
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: .75rem;
  color: color-mix(in srgb, var(--color-footer-text) 70%, transparent);
}
.site-footer-bottom p {
  margin: 0;
}
.site-footer-bottom p + p {
  margin-top: .25rem;
}


/* —— Catálogo productos —— */
.grid { display: grid; gap: 1.35rem; grid-template-columns: repeat(4, 1fr); }
.grid--catalog {
  gap: 1.5rem;
}
.grid--catalog .card-img {
  padding: 1.25rem;
  background: #faf7f2;
}
.grid--catalog .card-body {
  padding: 1.15rem 1.25rem 1.35rem;
  border-top: 1px solid var(--border-soft);
}
.grid--catalog .card h2 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 .85rem;
}
.grid--catalog .card-calc-btn {
  width: 100%;
  max-width: none;
  padding: .7rem 1.25rem;
  font-size: .8rem;
}
.grid--catalog .card-placeholder { font-size: 2.5rem; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 0;
  color: inherit;
  transition: transform .22s cubic-bezier(.4, 0, .2, 1), box-shadow .22s ease, border-color .22s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card:hover {
  border-color: rgba(176, 132, 90, .28);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.card-img {
  aspect-ratio: 1 / 1;
  width: 100%;
  background: linear-gradient(180deg, #faf7f2 0%, #efe8de 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  position: relative;
}
.card-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, .08));
  transition: transform .25s ease, opacity .25s ease;
}
.card-img img.card-img__hover {
  position: absolute;
  inset: 1.25rem;
  width: calc(100% - 2.5rem);
  height: calc(100% - 2.5rem);
  max-width: none;
  max-height: none;
  margin: 0;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  pointer-events: none;
}
.card:hover .card-img img { transform: scale(1.03); }
.card:hover .card-img:has(.card-img__hover) .card-img__main { opacity: 0; }
.card:hover .card-img__hover { opacity: 1; }
.card-body { padding: 1.1rem 1.25rem 1.35rem; }
.card-body--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: -.02em;
  line-height: 1.35;
}
.card-calc-btn {
  text-decoration: none;
  font-weight: 600;
  width: 100%;
  max-width: 11rem;
  margin-top: auto;
}
.card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.card-placeholder {
  width: 44%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-soft), #e8dfd4);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
}
.stepper {
  --stepper-brown: var(--accent);
  --stepper-muted: #94a3b8;
  --stepper-line: #e8edf2;
  --stepper-progress-duration: .55s;
  --stepper-progress-ease: cubic-bezier(.4, 0, .2, 1);
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  width: 100%;
  margin: 0 0 2rem;
  padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--border);
  list-style: none;
}
.stepper-progress {
  position: absolute;
  top: 17px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--stepper-line);
  border-radius: 2px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.stepper-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--stepper-brown);
  border-radius: inherit;
  transition: width var(--stepper-progress-duration) var(--stepper-progress-ease);
}
.stepper-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  position: relative;
  z-index: 1;
  min-width: 0;
}
.stepper-circle {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  font-weight: 700;
  background: #fff;
  border: 2px solid var(--stepper-line);
  color: var(--stepper-muted);
  flex-shrink: 0;
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.stepper-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--stepper-muted);
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  padding: 0 .15rem;
  transition: color .25s ease;
}
.stepper--forward .stepper-item.active:not(:first-child) .stepper-circle,
.stepper--forward .stepper-item.active:not(:first-child) .stepper-label {
  transition-delay: var(--stepper-progress-duration);
}
.stepper--back .stepper-item .stepper-circle,
.stepper--back .stepper-item .stepper-label {
  transition-delay: 0s;
}
.stepper-item.active .stepper-circle,
.stepper-item.done .stepper-circle {
  background: var(--stepper-brown);
  border-color: var(--stepper-brown);
  color: #fff;
}
.stepper-item.active .stepper-label,
.stepper-item.done .stepper-label {
  color: var(--stepper-brown);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .75rem 1.6rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-size: .92rem;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(176, 132, 90, .3);
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(176, 132, 90, .35);
}
.btn-muted {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  text-decoration: none;
}
.btn-muted:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 255, 255, .6);
}
.option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem 1.15rem;
  margin-bottom: .75rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: var(--shadow-sm);
}
.option:hover, .option.selected {
  border-color: rgba(176, 132, 90, .4);
  background: var(--accent-soft);
  box-shadow: 0 4px 16px rgba(176, 132, 90, .1);
}
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .9rem; margin-bottom: .4rem; font-weight: 600; text-transform: none; color: var(--text); }
.field input, .measure-input {
  width: 100%;
  padding: .75rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg-elevated);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .measure-input:focus {
  outline: none;
  border-color: rgba(176, 132, 90, .55);
  box-shadow: 0 0 0 3px rgba(176, 132, 90, .14);
}
.hint { font-size: .78rem; color: var(--muted); }
.result { background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  margin-bottom: 1rem;
}
.row { display: flex; justify-content: space-between; padding: .35rem 0; font-size: .95rem; }
.row span:first-child { color: var(--muted); }
.total { font-size: 2rem; font-weight: 700; color: var(--primary); margin-top: 1rem; }
.back { color: var(--primary); text-decoration: none; font-size: .9rem; display: inline-block; margin-bottom: 1rem; }
.hidden { display: none; }
.checkbox-row { display: flex; align-items: flex-start; gap: .75rem; padding: 1rem; border: 1px solid var(--border); border-radius: 8px; margin-bottom: .5rem; background: #fff; cursor: pointer; }
.checkbox-row input { width: auto; margin-top: .2rem; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: 8px; margin-bottom: .5rem; background: #fff; cursor: pointer; }
.toggle-row--extra {
  margin-bottom: 0;
  border-radius: 8px;
  align-items: center;
  display: flex;
  gap: 1rem;
}
#extras-adicionales-list .toggle-row-wrap, #em-extras-list .toggle-row-wrap {
  margin: .5rem 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  overflow: visible;
  background: var(--bg-elevated);
}
#extras-adicionales-list .toggle-row-wrap:last-child, #em-extras-list .toggle-row-wrap:last-child { margin-bottom: .5rem; }
#densidades-list,
#em-densidades-list,
#extras-adicionales-list, #em-extras-list {
  margin-bottom: 1rem;
  padding: 0;
}
#extras-adicionales-list .extra-card-layout, #em-extras-list .extra-card-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .75rem 1rem;
  padding: .85rem 1.15rem;
  box-sizing: border-box;
}
#extras-adicionales-list .extra-card-thumb:empty, #em-extras-list .extra-card-thumb:empty {
  display: none;
}
#extras-adicionales-list .extra-card-main, #em-extras-list .extra-card-main {
  flex: 1 1 12rem;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
#extras-adicionales-list .extra-expand--card, #em-extras-list .extra-expand--card {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}
#extras-adicionales-list .toggle-row-wrap--active .extra-expand--card .extra-expand-inner, #em-extras-list .toggle-row-wrap--active .extra-expand--card .extra-expand-inner {
  padding: .25rem 0 0;
}
#extras-adicionales-list .toggle-row--extra, #em-extras-list .toggle-row--extra {
  padding: 0;
  gap: .45rem .65rem;
  margin: 0;
  transition: padding .35s ease;
}
#extras-adicionales-list .toggle-row-wrap--active .toggle-row--extra, #em-extras-list .toggle-row-wrap--active .toggle-row--extra {
  padding: 0;
}
#extras-adicionales-list .extra-var-slot, #em-extras-list .extra-var-slot,
#extras-adicionales-list .extra-var-dropdown, #em-extras-list .extra-var-dropdown {
  width: 100%;
}
#extras-adicionales-list .extra-card-thumb, #em-extras-list .extra-card-thumb {
  flex: 0 0 200px;
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #faf7f2;
  border-radius: var(--radius-sm);
  padding: 0;
  box-sizing: border-box;
}
#extras-adicionales-list .extra-card-thumb .toggle-thumb, #em-extras-list .extra-card-thumb .toggle-thumb {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: var(--radius-sm);
  display: block;
  margin: 0 auto;
}
#extras-adicionales-list .extra-card-thumb .toggle-thumb--variant, #em-extras-list .extra-card-thumb .toggle-thumb--variant {
  object-fit: contain;
  object-position: center;
}
#extras-adicionales-list .extra-card-header, #em-extras-list .extra-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name actions"
    "activ activ";
  gap: .4rem .65rem;
  align-items: center;
  padding: 0;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}
#extras-adicionales-list .extra-left, #em-extras-list .extra-left {
  grid-area: name;
  min-width: 0;
}
#extras-adicionales-list .toggle-side-text, #em-extras-list .toggle-side-text {
  grid-area: activ;
  white-space: normal;
  line-height: 1.4;
  font-size: .88rem;
  color: var(--muted);
}
#extras-adicionales-list .toggle-row-actions, #em-extras-list .toggle-row-actions {
  grid-area: actions;
  margin-left: 0;
  justify-self: end;
  flex-wrap: nowrap;
}
.toggle-row-wrap--active .toggle-row--extra { align-items: flex-start; }
.toggle-row-wrap { margin-bottom: .5rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: visible; transition: border-color .25s ease; }
.toggle-row-wrap .toggle-row { border: none; margin-bottom: 0; }
.toggle-row-wrap--active { border-color: var(--primary); }
.toggle-row-wrap--active.toggle-row-wrap--dropdown-open { overflow: visible; }
.toggle-row-wrap--active .toggle-row { background: #faf8f5; }
.extra-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .5rem; }
.extra-nombre-interno { font-weight: 600; font-size: .95rem; color: var(--text, #1e293b); line-height: 1.35; }
.extra-expand {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .45s cubic-bezier(.4, 0, .2, 1), opacity .35s ease;
}
.toggle-row-wrap--active .extra-expand {
  max-height: 2400px;
  opacity: 1;
  overflow: visible;
}
.extra-expand-inner {
  overflow: visible;
  min-height: 0;
  transform: translateY(-6px);
  transition: transform .35s ease;
}
.toggle-row-wrap--active .extra-expand-inner {
  transform: translateY(0);
  overflow: visible;
  padding: 0 .75rem .85rem;
}
.toggle-row-wrap--active.toggle-row-wrap--dropdown-open .extra-expand,
.toggle-row-wrap--active.toggle-row-wrap--dropdown-open .extra-expand-inner {
  overflow: visible;
}
#extras-adicionales-list .extra-expand-inner, #em-extras-list .extra-expand-inner {
  padding: 0;
  box-sizing: border-box;
  transform: none;
}
#extras-adicionales-list .extra-expand--card .extra-expand-inner, #em-extras-list .extra-expand--card .extra-expand-inner {
  width: 100%;
  box-sizing: border-box;
}
#extras-adicionales-list .extra-detail-title, #em-extras-list .extra-detail-title {
  margin: 0 0 .35rem;
}
#extras-adicionales-list .extra-detail-title > :first-child, #em-extras-list .extra-detail-title > :first-child {
  margin-top: 0 !important;
}
#extras-adicionales-list .extra-detail-title h1, #em-extras-list .extra-detail-title h1,
#extras-adicionales-list .extra-detail-title h2, #em-extras-list .extra-detail-title h2,
#extras-adicionales-list .extra-detail-title h3, #em-extras-list .extra-detail-title h3,
#extras-adicionales-list .extra-detail-title h4, #em-extras-list .extra-detail-title h4 {
  margin: 0 0 .35rem;
}
#extras-adicionales-list .extra-detail-title p, #em-extras-list .extra-detail-title p,
#extras-adicionales-list .extra-detail-desc p, #em-extras-list .extra-detail-desc p {
  margin: 0 0 .45rem;
}
#extras-adicionales-list .extra-detail-title p:last-child, #em-extras-list .extra-detail-title p:last-child,
#extras-adicionales-list .extra-detail-desc p:last-child, #em-extras-list .extra-detail-desc p:last-child {
  margin-bottom: 0;
}
#extras-adicionales-list .extra-detail-desc, #em-extras-list .extra-detail-desc {
  margin-top: 0;
}
#extras-adicionales-list .extra-var-slot, #em-extras-list .extra-var-slot {
  margin: .4rem 0 .5rem;
}
.extra-var-slot { margin: .5rem 0 .65rem; min-height: 0; }
.extra-detail-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 .35rem; color: var(--text, #1e293b); line-height: 1.3; }
.extra-detail-title p { margin: 0; }
.extra-var-dropdown { position: relative; z-index: 1; }
.extra-var-dropdown.is-open { z-index: 30; }
.extra-var-dropdown + .extra-var-dropdown { margin-top: .65rem; }
.extra-var-level-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text, #1e293b);
  margin-bottom: .35rem;
}
.extra-var-dropdown-trigger,
.elegant-select-trigger {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .8rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: .92rem;
  font-family: var(--font-sans);
  line-height: 1.35;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease, border-radius .15s ease;
}
.extra-var-dropdown-trigger:hover,
.elegant-select-trigger:hover {
  border-color: rgba(176, 132, 90, .45);
}
.extra-var-dropdown.is-open .extra-var-dropdown-trigger,
.elegant-select.is-open .elegant-select-trigger {
  border-color: var(--primary);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-md);
}
.elegant-select-trigger {
  justify-content: space-between;
}
.elegant-select-value.is-placeholder {
  color: var(--muted);
  font-weight: 400;
}
.elegant-select-chevron,
.extra-var-dropdown-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-left: auto;
  transition: transform .2s ease, border-color .2s ease;
}
.elegant-select.is-open .elegant-select-chevron,
.extra-var-dropdown.is-open .extra-var-dropdown-chevron {
  transform: rotate(-135deg);
  border-color: var(--primary);
}
.extra-var-dropdown-panel,
.elegant-select-panel {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--primary);
  background: #fff;
  box-shadow: var(--shadow-lg);
  padding: .4rem;
}
.elegant-select {
  position: relative;
  z-index: 1;
  width: 100%;
}
.elegant-select.is-open { z-index: 50; }
.elegant-select-panel {
  bottom: 100%;
  top: auto;
  border-bottom: none;
  border-top: 1px solid var(--primary);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: 0 -10px 28px rgba(44, 36, 25, .1);
}
.extra-var-dropdown-panel {
  bottom: 100%;
  top: auto;
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: 0 -10px 28px rgba(44, 36, 25, .1);
}
.extra-var-dropdown-selected,
.extra-var-dropdown-option,
.elegant-select-option {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  width: 100%;
}
.extra-var-dropdown-option,
.elegant-select-option {
  padding: .72rem 1rem;
  border: none;
  border-radius: calc(var(--radius-md) - 4px);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  transition: background .12s ease, color .12s ease;
}
.extra-var-dropdown-option:hover,
.elegant-select-option:hover {
  background: var(--accent-soft);
}
.extra-var-dropdown-option.is-selected,
.elegant-select-option.is-selected {
  background: var(--primary);
  color: #fff;
}
.extra-var-dropdown-img {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: #f1f5f9;
}
.extra-var-dropdown-img--empty {
  display: block;
  min-height: 40px;
}
.extra-var-dropdown-text {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
  flex: 1;
}
.extra-var-dropdown-title {
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text, #1e293b);
}
.extra-var-dropdown-price {
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary, #9a7b5c);
}
.extra-var-dropdown-placeholder {
  color: var(--muted, #64748b);
  font-size: .9rem;
  flex: 1;
}

/* Galería de tejidos */
.toggle-row-wrap--tejido .extra-card-layout {
  display: block;
}
.toggle-row-wrap--tejido .extra-card-main {
  width: 100%;
}
.toggle-row-wrap--tejido .extra-expand,
.toggle-row-wrap--tejido .extra-expand--card {
  max-height: none !important;
  opacity: 1 !important;
  overflow: visible;
}
.toggle-row-wrap--tejido .extra-expand-inner {
  padding-top: .35rem;
}
.toggle-row-wrap--tejido .extra-var-slot--tejido {
  margin: 0;
}
.tejido-gallery-section {
  margin: 0 0 1.35rem;
}
.tejido-gallery-section:last-child {
  margin-bottom: .25rem;
}
.tejido-gallery-title {
  margin: 0 0 .75rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e3a5f;
  letter-spacing: -.01em;
}
.tejido-gallery-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .06);
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .06);
  padding: .85rem;
}
.tejido-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: .55rem;
}
.tejido-swatch {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #e8edf2;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.tejido-swatch:hover,
.tejido-swatch:focus {
  border-color: #94a3b8;
  outline: none;
  transform: translateY(-1px);
  z-index: 1;
}
.tejido-swatch.is-selected {
  border-color: #1e3a5f;
  box-shadow: 0 0 0 2px rgba(30, 58, 95, .25);
}
.tejido-swatch img,
.tejido-swatch-empty {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}
.tejido-swatch-empty {
  background: linear-gradient(135deg, #cbd5e1, #e2e8f0);
}
.tejido-swatch-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: .28rem .2rem;
  background: rgba(0, 0, 0, .82);
  color: #fff;
  font-size: .62rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.tejidos-catalog {
  margin: 1.75rem auto 0;
  padding: 0 0 1.5rem;
  width: 50vw;
  max-width: 50vw;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .tejidos-catalog {
    width: 100%;
    max-width: 100%;
  }
}
.tejidos-catalog-block + .tejidos-catalog-block {
  margin-top: 1.5rem;
}
@media (max-width: 640px) {
  .tejido-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: .4rem;
  }
  .tejido-gallery-title { font-size: 1.05rem; }
  .tejido-swatch-name { font-size: .58rem; padding: .22rem .15rem; }
}

.toggle-row-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
  margin-left: auto;
}
.toggle-side-text {
  font-weight: 600;
  font-size: .92rem;
  color: var(--text, #1e293b);
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}
.toggle-price-inline {
  font-weight: 600;
  color: var(--primary, #9a7b5c);
  font-size: .95rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.extra-detail-desc { font-size: .9rem; color: var(--muted, #64748b); line-height: 1.5; margin-top: 0; }
.extra-detail-desc p { margin: 0 0 .5rem; }
.extra-detail-desc p:last-child { margin-bottom: 0; }
.toggle-label { flex: 1; }
.toggle-row input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.toggle-switch { width: 44px; height: 24px; background: #e2e8f0; border-radius: 999px; position: relative; flex-shrink: 0; transition: background .2s; }
.toggle-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.toggle-row input:checked + .toggle-switch { background: var(--primary); }
.toggle-row input:checked + .toggle-switch::after { transform: translateX(20px); }
.toggle-price { font-weight: 600; color: var(--primary, #9a7b5c); margin-top: .25rem; }
.toggle-thumb { width: 400px; height: auto; max-width: 45%; object-fit: contain; flex-shrink: 0; display: block; }
.densidad-detail-img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 160px;
  margin: 0 auto .75rem;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
}
.densidad-rich-title p, .densidad-rich-desc p { margin: 0; }
.densidad-rich-title,
.densidad-rich-desc {
  background: transparent;
  line-height: 1.4;
}
.densidad-rich-title { font-weight: 600; line-height: 1.35; color: var(--text); }
.densidad-rich-desc {
  font-size: .9rem;
  line-height: 1.45;
  margin-top: .2rem;
  color: var(--muted);
}
.densidad-rich-title .ql-color-red,
.densidad-rich-desc .ql-color-red,
.extra-detail-title .ql-color-red,
.extra-detail-desc .ql-color-red { color: #e60000; }
.densidad-rich-title .ql-color-orange,
.densidad-rich-desc .ql-color-orange,
.extra-detail-title .ql-color-orange,
.extra-detail-desc .ql-color-orange { color: #f90; }
.densidad-rich-title .ql-color-yellow,
.densidad-rich-desc .ql-color-yellow,
.extra-detail-title .ql-color-yellow,
.extra-detail-desc .ql-color-yellow { color: #ff0; }
.densidad-rich-title .ql-color-green,
.densidad-rich-desc .ql-color-green,
.extra-detail-title .ql-color-green,
.extra-detail-desc .ql-color-green { color: #008a00; }
.densidad-rich-title .ql-color-blue,
.densidad-rich-desc .ql-color-blue,
.extra-detail-title .ql-color-blue,
.extra-detail-desc .ql-color-blue { color: #06c; }
.densidad-rich-title .ql-color-purple,
.densidad-rich-desc .ql-color-purple,
.extra-detail-title .ql-color-purple,
.extra-detail-desc .ql-color-purple { color: #93f; }
.densidad-rich-title [style*="background-color"],
.densidad-rich-desc [style*="background-color"] {
  border-radius: 4px;
  padding: 0 .1em;
}
.densidad-rich-title [style*="background-color: transparent"],
.densidad-rich-title [style*="background-color:transparent"],
.densidad-rich-desc [style*="background-color: transparent"],
.densidad-rich-desc [style*="background-color:transparent"],
.densidad-rich-title [style*="background-color: rgba(0, 0, 0, 0)"],
.densidad-rich-desc [style*="background-color: rgba(0, 0, 0, 0)"] {
  background-color: transparent !important;
}
.densidad-field { margin-bottom: 1rem; }
.densidad-detail {
  margin-top: 1rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}
.densidad-precio { margin-top: .5rem; font-weight: 700; }
