/* Muebles para Oficina: catálogo, detalle, sección del index y popup flotante */

.mb-wrap { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }

/* ---------- Filtros ---------- */
.mb-tools { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; margin-bottom: 3rem; }
.mb-cats { display: flex; flex-wrap: wrap; gap: 1rem; }
.mb-cat { border: 1px solid var(--stroke-elements, #8f93a1); background: transparent; color: var(--t-bright, #151617); padding: .9rem 1.8rem; border-radius: 5rem; font-size: 1.4rem; cursor: pointer; transition: background .2s, color .2s; }
.mb-cat:hover, .mb-cat.is-active { background: var(--t-bright, #151617); color: var(--base, #f7f7ef); }
.mb-search { border: 1px solid var(--stroke-elements, #8f93a1); background: transparent; color: var(--t-bright, #151617); padding: 1rem 1.8rem; border-radius: 5rem; font-size: 1.4rem; min-width: 26rem; max-width: 100%; }

/* ---------- Grid de productos ---------- */
.mb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(26rem, 1fr)); gap: 2.4rem; }
.mb-card { display: flex; flex-direction: column; background: var(--base-tint, #d8dde7); border-radius: 2rem; overflow: hidden; text-decoration: none; color: var(--t-bright, #151617); transition: transform .3s ease, box-shadow .3s ease; }
.mb-card:hover { transform: translateY(-.6rem); box-shadow: 0 1.5rem 3rem rgba(0,0,0,.18); color: var(--t-bright, #151617); }
.mb-card__img { aspect-ratio: 4 / 3; background: #fff; overflow: hidden; }
.mb-card__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mb-card__body { padding: 2rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.mb-card__cat { font-size: 1.2rem; text-transform: uppercase; letter-spacing: .08em; color: var(--t-muted, #797d83); }
.mb-card__name { font-family: var(--_font-default, "Montserrat", sans-serif); font-size: 1.7rem; line-height: 1.35; font-weight: 600; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.mb-card__price { margin-top: auto; padding-top: 1rem; font-size: 2rem; font-weight: 700; color: var(--rgb-color-1, #1a5fa8); }
.mb-empty { text-align: center; padding: 6rem 0; font-size: 1.8rem; color: var(--t-medium, #44474a); }

/* ---------- Detalle ---------- */
.mb-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
.mb-detail > * { min-width: 0; }
.mb-gallery__main { background: #fff; border-radius: 2rem; overflow: hidden; aspect-ratio: 4 / 3; }
.mb-gallery__main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mb-gallery__thumbs { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.2rem; }
.mb-thumb { width: 8rem; height: 6rem; border: 2px solid transparent; border-radius: 1rem; overflow: hidden; padding: 0; background: #fff; cursor: pointer; }
.mb-thumb.is-active { border-color: var(--rgb-color-1, #1a5fa8); }
.mb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mb-info h1 { font-size: clamp(2.6rem, 3.4vw, 4.2rem); line-height: 1.15; margin: 0 0 1.2rem; }
.mb-info__price { font-size: 3.2rem; font-weight: 700; color: var(--rgb-color-1, #1a5fa8); margin-bottom: 2rem; }
.mb-info__meta { list-style: none; padding: 0; margin: 0 0 2.4rem; display: grid; gap: .8rem; font-size: 1.5rem; color: var(--t-medium, #44474a); }
.mb-info__meta strong { color: var(--t-bright, #151617); }
.mb-info__desc { font-size: 1.6rem; line-height: 1.7; margin-bottom: 3rem; color: var(--t-medium, #44474a); }
.mb-info__desc p, .mb-info__desc li { font-size: 1.5rem; line-height: 1.7; margin: 0 0 1.2rem; }
.mb-info__desc h3, .mb-info__desc h4, .mb-info__desc h5 { font-family: var(--_font-default, "Montserrat", sans-serif); font-size: 1.8rem !important; line-height: 1.3 !important; font-weight: 700; margin: 0 0 1rem; color: var(--t-bright, #151617); }
.mb-info__desc ul, .mb-info__desc ol { padding-left: 2rem; margin: 0 0 1.2rem; }
.mb-info__desc a { text-decoration: underline; }
.mb-btn { display: inline-flex; align-items: center; gap: 1rem; padding: 1.4rem 3rem; border-radius: 5rem; background: #25D366; color: #fff !important; font-weight: 700; font-size: 1.6rem; text-decoration: none; transition: filter .2s; }
.mb-btn:hover { filter: brightness(1.08); }
.mb-btn--ghost { background: transparent; color: var(--t-bright, #151617) !important; border: 1px solid var(--stroke-elements, #8f93a1); margin-left: 1rem; }
.mb-back { display: inline-block; margin-bottom: 2.4rem; font-size: 1.5rem; color: var(--t-medium, #44474a); }

@media (max-width: 900px) {
  .mb-detail { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; }
  .mb-search { min-width: 0; width: 100%; }
}

/* ---------- Sección en el index ---------- */
.mb-home__more { display: flex; justify-content: center; margin-top: 4rem; }

/* ---------- Popup flotante ---------- */
.mb-popup { position: fixed; left: 2rem; bottom: 2rem; z-index: 990; width: 26rem; max-width: calc(100vw - 4rem); display: flex; gap: 1rem; align-items: center; padding: 1rem 1.2rem; border-radius: 1.2rem; background: #fff; color: #1d1f23; box-shadow: 0 .8rem 2.4rem rgba(0,0,0,.2); font-family: var(--_font-default, "Montserrat", sans-serif); opacity: 0; visibility: hidden; transform: translateY(2rem); pointer-events: none; transition: opacity .4s ease, transform .4s ease, visibility 0s linear .4s; }
.mb-popup.is-visible { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }
.mb-popup__img { flex: 0 0 4.2rem; width: 4.2rem; height: 4.2rem; border-radius: .8rem; background: #eef0f4; overflow: hidden; }
.mb-popup__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mb-popup__text { min-width: 0; flex: 1; padding-right: 1.4rem; font-size: 1.1rem; line-height: 1.35; }
.mb-popup__lead { color: #6b7280; margin: 0 0 .1rem; font-size: 1rem; }
.mb-popup__name { display: block; font-weight: 700; font-size: 1.15rem; color: #1d1f23; margin: 0 0 .3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-popup__link { font-size: 1.05rem; font-weight: 600; color: #1a5fa8; text-decoration: underline; }
.mb-popup__close { position: absolute; top: .2rem; right: .4rem; border: 0; background: transparent; color: #6b7280; font-size: 1.8rem; line-height: 1; cursor: pointer; padding: .4rem; }
/* En celular el botón de WhatsApp (10rem) ocupa la esquina derecha: el popup se encoge para no taparlo */
@media (max-width: 575px) {
  .mb-popup { left: 1rem; bottom: 1rem; width: calc(100vw - 14.5rem); min-width: 21rem; max-width: 26rem; }
  .mb-popup__lead { display: none; }
}

/* ---------- Pago con tarjeta ---------- */
.mb-actions { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.mb-btn[hidden] { display: none; }
.mb-btn--pay { background: var(--rgb-color-1, #1a5fa8); border: 0; cursor: pointer; font-family: inherit; }
.mb-btn--pay:disabled { opacity: .65; cursor: wait; }
.mb-btn--ghost { margin-left: 0; }
.mb-pay { margin-top: 3rem; padding: 2.4rem; border-radius: 1.6rem; background: var(--base-tint, #d8dde7); color: var(--t-bright, #151617); }
.mb-pay[hidden] { display: none; }
.mb-pay { min-width: 0; }
.mb-pay__title { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; font-family: var(--_font-default, "Montserrat", sans-serif); }
.mb-pay__note { font-size: 1.3rem; line-height: 1.5; color: var(--t-medium, #44474a); margin: 0 0 1.6rem; }
.mb-pay__test { font-size: 1.3rem; line-height: 1.5; margin: 0 0 1.4rem; padding: 1rem 1.2rem; border-radius: .8rem; background: #fff3cd; color: #664d03; }
.mb-fs { border: 0; padding: 0; margin: 0 0 1.8rem; min-width: 0; }
.mb-fs legend { font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; padding: 0; color: var(--t-bright, #151617); }
.mb-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; }
.mb-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mb-row--total { align-items: end; grid-template-columns: 12rem minmax(0, 1fr); margin-bottom: .6rem; }
.mb-field { margin-bottom: 1.2rem; min-width: 0; }
.mb-field label { display: block; font-size: 1.2rem; margin-bottom: .4rem; color: var(--t-medium, #44474a); }
.mb-field input { width: 100%; min-width: 0; box-sizing: border-box; padding: 1.1rem 1.3rem; font-size: 1.5rem; font-family: inherit; border: 1px solid var(--stroke-elements, #8f93a1); border-radius: .9rem; background: #fff; color: #151617; }
.mb-field input:focus { outline: 2px solid var(--rgb-color-1, #1a5fa8); outline-offset: 1px; }
.mb-field.is-bad input { border-color: #c0392b; background: #fdf2f1; }
.mb-total { font-size: 1.6rem; text-align: right; padding-bottom: 1.2rem; }
.mb-total strong { font-size: 2.2rem; color: var(--rgb-color-1, #1a5fa8); margin-left: .6rem; }
.mb-pay__msg { min-height: 2.2rem; font-size: 1.4rem; line-height: 1.4; margin-bottom: 1rem; }
.mb-pay__msg.is-error { color: #b3261e; font-weight: 600; }
.mb-pay__msg.is-info { color: var(--t-medium, #44474a); }
.mb-pay__done { text-align: center; padding: 2rem 1rem; }
.mb-pay__done strong { display: block; font-size: 2.2rem; margin-bottom: 1rem; color: #1e7e34; }
.mb-pay__done.is-pending strong { color: #9a6700; }
.mb-pay__done p { font-size: 1.5rem; line-height: 1.6; margin: 0 0 .8rem; }
.mb-pay__ref { font-size: 1.2rem !important; color: var(--t-medium, #44474a); }
.mb-result { max-width: 60rem; margin: 0 auto; text-align: center; padding: 4rem 2rem; border-radius: 2rem; background: var(--base-tint, #d8dde7); color: var(--t-bright, #151617); }
.mb-result h1 { font-size: clamp(2.6rem, 4vw, 3.6rem); margin: 0 0 1.4rem; }
.mb-result p { font-size: 1.7rem; line-height: 1.6; margin: 0 0 2.4rem; }
.mb-result.is-ok h1 { color: #1e7e34; }
.mb-result.is-bad h1 { color: #b3261e; }
@media (max-width: 575px) {
  .mb-row, .mb-row--3 { grid-template-columns: 1fr; }
  .mb-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mb-row--total { grid-template-columns: 9rem 1fr; }
  .mb-pay { padding: 1.6rem; }
  .mb-actions .mb-btn { width: 100%; justify-content: center; }
}

/* El estilo global del sitio pinta de claro los campos de texto; en el formulario de pago se fuerza texto oscuro sobre blanco */
.mb-pay .mb-field input { color: #151617 !important; -webkit-text-fill-color: #151617; background-color: #fff !important; caret-color: #151617; }
.mb-pay .mb-field input::placeholder { color: #8a8f99 !important; -webkit-text-fill-color: #8a8f99; opacity: 1; }
.mb-pay .mb-field input:-webkit-autofill { -webkit-text-fill-color: #151617; box-shadow: 0 0 0 100rem #fff inset; }
#mb-pay-submit { width: 100%; justify-content: center; margin-top: .4rem; }

.mb-field__err { display: block; margin-top: .4rem; font-size: 1.2rem; line-height: 1.3; color: #b3261e; font-weight: 600; }
