/* Styles trimmed for brevity; same as previous step */
.mbu-wrapper{max-width:1100px;margin:0 auto;padding:12px}
.mbu-header{display:flex;flex-wrap:wrap;align-items:baseline;gap:12px;margin-bottom:12px}
.mbu-title{flex:1 1 100%;margin:0}
.mbu-price{font-size:1.4rem;font-weight:700}
.mbu-badges{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.mbu-badge{background:#eef2f7;border-radius:999px;padding:6px 10px;font-size:.9rem}
.mbu-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:8px;margin:12px 0}
.mbu-img{width:100%;height:220px;object-fit:cover;border-radius:10px}
.mbu-tabs{display:grid;grid-template-columns:200px 1fr;gap:12px;margin-top:12px}
.mbu-tabnav{display:flex;flex-direction:column;gap:8px}
.mbu-tab{display:block;padding:.6rem .8rem;border:1px solid #e5e7eb;border-radius:.5rem;background:#f8fafc;cursor:pointer;text-align:left}
.mbu-tab.is-active{background:#fff;border-color:#d1d5db;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.mbu-tabpanes{background:#fff;border:1px solid #e5e7eb;border-radius:.5rem;padding:.9rem}
.mbu-tabpane{display:none}
.mbu-tabpane.is-active{display:block}
.mbu-specs{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.mbu-spec{display:flex;justify-content:space-between;gap:8px;border-bottom:1px dashed #e5e7eb;padding:.35rem 0}
.mbu-spec .k{color:#64748b}
.mbu-extras-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.mbu-chip{background:#f5f5f5;border:1px solid #e5e7eb;border-radius:999px;padding:6px 10px}
.mbu-cta-ico{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}
.mbu-icobtn{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:999px;border:1px solid #e5e7eb;background:#0ea5e9;color:#fff;cursor:pointer;text-decoration:none}
.mbu-icobtn.mail{background:#3b82f6}
.mbu-icobtn.wa{background:#22c55e}
.mbu-icobtn.phone{background:#0ea5e9}
.mbu-icobtn.share{background:#64748b}
.mbu-sharepanel{position:fixed;inset:0;background:rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;z-index:9999}
.mbu-sharegrid{background:#fff;border-radius:12px;padding:12px;min-width:280px;display:grid;grid-template-columns:repeat(3,1fr);gap:10px;position:relative}
.mbu-sharegrid .mbu-close{position:absolute;top:8px;right:8px;border:none;background:#f1f5f9;border-radius:999px;width:32px;height:32px;cursor:pointer}
.mbu-sharelink{display:flex;flex-direction:column;align-items:center;gap:6px;text-decoration:none;border:1px solid #e5e7eb;border-radius:10px;padding:10px;background:#f8fafc;color:#0f172a}
.mbu-sharelink.copy{background:#e5e7eb}
.mbu-vendor{margin:24px 0;border-top:1px solid #e5e7eb;padding-top:12px}
.mbu-vendor-head{display:flex;align-items:center;gap:10px;justify-content:space-between;flex-wrap:wrap}
.mbu-avatar{border-radius:999px}
.mbu-vendor-info{min-width:220px}
.mbu-vendor-name{font-weight:700}
.mbu-vendor-company{color:#64748b}
.mbu-vendor-cta{display:flex;gap:8px;flex-wrap:wrap}
.mbu-vendor-links{margin-top:8px}
.mbu-link{color:#2563eb;text-decoration:none}
.mbu-more{margin-top:20px}
.mbu-more-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.mbu-more-card{border:1px solid #e5e7eb;border-radius:.5rem;padding:.6rem;background:#fff}
.mbu-more-img{width:100%;height:160px;object-fit:cover;border-radius:.35rem}
.mbu-more-title{font-size:1rem;margin:.35rem 0}
.mbu-more-price{font-weight:700}
@media (max-width:740px){
  .mbu-tabs{grid-template-columns:1fr}
  .mbu-tabnav{flex-direction:row}
}
.mbv-wrap{max-width:1100px;margin:0 auto;padding:12px}
.mbv-header{display:flex;gap:12px;align-items:center;margin-bottom:12px}
.mbv-avatar{border-radius:999px}
.mbv-title{margin:0}
.mbv-company{color:#64748b}
.mbv-cta{display:flex;gap:8px;flex-wrap:wrap}
.mbv-btn{display:inline-block;padding:.5rem .75rem;border-radius:.5rem;border:1px solid #e5e7eb;background:#0ea5e9;color:#fff;text-decoration:none}
.mbv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin-top:12px}
.mb-search-card{border:1px solid #e5e7eb;border-radius:10px;background:#fff;overflow:hidden;display:flex;flex-direction:column}
.mb-search-thumb{width:100%;height:180px;object-fit:cover;display:block}
.mb-search-body{padding:.6rem .7rem;display:flex;flex-direction:column;gap:.3rem}
.mb-search-title{font-size:1rem;margin:0}
.mb-search-price{font-weight:700}
.mbv-pagination{margin:14px 0;display:flex;gap:6px;flex-wrap:wrap}
.mbv-page{display:inline-block;padding:.35rem .55rem;border:1px solid #e5e7eb;border-radius:.35rem;text-decoration:none}
.mbv-page.current{background:#0ea5e9;color:#fff;border-color:#0ea5e9}

/* Ensure share panel is hidden when [hidden] present, even if theme overrides */
.mbu-sharepanel[hidden]{display:none !important;}
/* Backdrop clickable to close, but grid not */
.mbu-sharepanel{cursor:pointer}
.mbu-sharegrid{cursor:auto}


/* Badges and footer for vendor cards */
.mb-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.mb-badge{background:#f1f5f9;border:1px solid #e5e7eb;border-radius:999px;padding:4px 8px;font-size:.85rem;line-height:1}
.mb-badge.type.venta{background:#ecfdf5;border-color:#a7f3d0}
.mb-badge.type.alquiler{background:#fff7ed;border-color:#fed7aa}

.mb-search-footer{display:flex;align-items:center;justify-content:space-between;margin-top:.5rem}
.mb-view-btn{display:inline-block;padding:.4rem .6rem;border:1px solid #e5e7eb;border-radius:.5rem;background:#0ea5e9;color:#fff;text-decoration:none}


/* Vendor cards: more badges */
.mb-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.mb-badge{background:#f1f5f9;border:1px solid #e5e7eb;border-radius:999px;padding:4px 8px;font-size:.85rem;line-height:1}
.mb-badge.type.venta{background:#ecfdf5;border-color:#a7f3d0}
.mb-badge.type.alquiler{background:#fff7ed;border-color:#fed7aa}

/* === 2.5.2-custom: Placeholder para tarjetas sin imagen === */
.mb-search-thumb-wrap{
  display:block;
  position:relative;
  width:100%;
  aspect-ratio:16/10;
  background:#e5e7eb; /* gris suave placeholder */
  overflow:hidden;
  border-radius:.5rem .5rem 0 0;
}
.mb-search-thumb-wrap .mb-search-thumb{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}

/* === 2.5.2-custom: Títulos en negrita, sin subrayado y tamaño igual al precio === */
.mb-search-title{font-weight:700}
.mb-search-title a{ text-decoration:none; color:inherit }
.mb-search-title a:hover{ text-decoration:none }

/* === 2.5.3-custom: Alineación consistente del precio/botón === */
.mb-search-card{
  display:flex;
  flex-direction:column;
  height:100%;
}
.mb-search-body{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
}
.mb-search-footer{
  margin-top:auto; /* empuja precio+botón al fondo del cuerpo */
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.mbu-vendor-desc{margin-top:.35rem;opacity:.9}

.mbv-desc{margin-top:.25rem;opacity:.9}



/* --- MB Gallery coches.net style (minimal) --- */
.mbu-gallery{margin:0 0 12px; background:#f7f7f8; border:1px solid rgba(0,0,0,.06); border-radius:12px; padding:8px; display:block}
.mbu-g-main{position:relative; overflow:hidden; border-radius:10px; background:#fff; margin:0 0 10px}
.mbu-g-main .mbu-g-img{display:block; width:100%; height:auto; cursor:zoom-in; user-select:none; -webkit-user-drag:none}
.mbu-g-prev,.mbu-g-next{position:absolute; top:50%; transform:translateY(-50%); background:rgba(0,0,0,.35); color:#fff; border:0; width:36px; height:44px; border-radius:10px; cursor:pointer; font-size:22px; line-height:44px; text-align:center; opacity:.95}
.mbu-g-prev{left:10px} .mbu-g-next{right:10px}
.mbu-g-thumbs{display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-start; background:#fff; border-radius:10px; padding:8px; overflow:auto}
.mbu-g-thumb{border:2px solid transparent; border-radius:8px; padding:0; background:transparent; cursor:pointer; flex:0 0 auto}
.mbu-g-thumb img{display:block; height:64px; width:88px; border-radius:6px; object-fit:cover; object-position:center}
.mbu-g-thumb.active{border-color:#0ea5e9; box-shadow:0 0 0 2px rgba(14,165,233,.12)}
.mbu-g-counter{position:absolute; left:10px; bottom:10px; background:rgba(0,0,0,.6); color:#fff; font-size:12px; padding:6px 8px; border-radius:8px}
/* Lightbox overlay */
.mbu-lightbox{position:fixed; inset:0; background:rgba(0,0,0,.9); display:none; align-items:center; justify-content:center; z-index:9999}
.mbu-lightbox.open{display:flex}
.mbu-l-stage{position:relative; max-width:95vw; max-height:85vh; overflow:hidden}
.mbu-l-img{max-width:95vw; max-height:85vh; transform:scale(1); transition:transform .06s ease; cursor:grab; user-select:none; -webkit-user-drag:none}
.mbu-l-prev,.mbu-l-next{position:absolute; top:50%; transform:translateY(-50%); background:rgba(255,255,255,.18); color:#fff; border:0; width:48px; height:64px; border-radius:10px; cursor:pointer; font-size:28px; line-height:64px; text-align:center}
.mbu-l-prev{left:16px} .mbu-l-next{right:16px}
.mbu-l-controls{position:absolute; top:12px; left:12px; right:12px; display:flex; gap:8px; align-items:center}
.mbu-l-spacer{flex:1}
.mbu-l-close,.mbu-l-zoom-in,.mbu-l-zoom-out{background:rgba(255,255,255,.18); color:#fff; border:0; width:44px; height:44px; border-radius:10px; font-size:24px; line-height:44px; cursor:pointer}
@media (max-width:640px){
  .mbu-g-thumb img{height:52px; width:74px}
  .mbu-g-prev,.mbu-g-next{width:32px; height:42px; font-size:20px}
}



/* --- Smaller gallery sizing (desktop & mobile) --- */
.mbu-gallery{max-width: 1080px; margin-left:auto; margin-right:auto}
@media (min-width: 1400px){
  .mbu-gallery{max-width: 1000px}
}
/* Limit main image height to avoid taking the whole screen */
.mbu-g-main .mbu-g-img{max-height: clamp(320px, 48vh, 560px)}
@media (max-width: 640px){
  .mbu-g-main .mbu-g-img{max-height: clamp(220px, 45vh, 380px)}
}



/* --- No-distortion rules --- */
/* Center the main image and never force both dimensions at once */
.mbu-g-main{display:flex; align-items:center; justify-content:center}
.mbu-g-main .mbu-g-img{
  width:auto !important;
  height:auto !important;
  max-width:100% !important;
  max-height: clamp(320px, 48vh, 560px) !important;
  object-fit: contain !important;
}

/* Thumbnails: keep full image visible (no crop), consistent box */
.mbu-g-thumb img{
  width: 100px;
  height: 72px;
  object-fit: contain;
  background:#fff;
}
@media (max-width: 640px){
  .mbu-g-main .mbu-g-img{ max-height: clamp(220px, 45vh, 380px) !important; }
  .mbu-g-thumb img{ width: 80px; height: 56px; }
}


/* Inline chips and accordion/popover tweaks */
.mbdde-inline{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:10px auto 12px}
.mbdde-chip{background:#f3f4f6;border:1px solid #e5e7eb;border-radius:999px;padding:8px 14px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.mbdde-chip.is-active{background:#0ea5e9;border-color:#0ea5e9;color:#fff}
.mbde-desc{margin-bottom:8px}
.mbde-accordion{overflow:hidden;max-height:0;transition:max-height .28s ease}
.mbde-accordion.open{max-height:1000px}
.mbde-accordion[hidden]{display:block}
.mbde-popover{position:relative}
.mbde-popover[hidden]{display:none}
.mbde-popover .mbde-card{position:absolute;z-index:40;left:0;right:0;margin:0 auto;max-width:520px}
.mbde-sharepanel{margin-top:10px;display:none}
.mbde-sharepanel.open{display:flex;gap:10px;flex-wrap:wrap}
.mbu-icobtn{width:40px;height:40px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;display:inline-flex;align-items:center;justify-content:center}
.mbu-icobtn svg{width:20px;height:20px}


/* Solo contacto dentro de su popover en ficha de barco */

.mbfu-boat-page .mb-boat-contact{display:none!important}

/* Suavizar transición cuando ocultamos descripción al abrir detalles/contacto */
#mbde-desc{transition:opacity .2s ease}
