/* ============================================================
   MasVidrio · Mejoras (cotización, contacto, FAQ, tipografía)
   Se carga en todas las páginas vía /assets/css/mv-mejoras.css
   ============================================================ */

:root{
  --mv-primary:#1f398d;
  --mv-primary-dark:#152a6b;
  --mv-accent:#ff8939;
  --mv-accent-dark:#e9762b;
  --mv-dark:#14213d;
  --mv-text:#364151;
  --mv-border:#e2e6ee;
  --mv-ok:#2e9e5b;
}

/* ============================================================
   TAREA 7 · Tipografía más legible (sin romper el layout em/px)
   ============================================================ */
body{
  font-size:16px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
/* Texto de contenido (home / Elementor) en rem para no arrastrar cascada em */
.elementor-widget-text-editor p,
.elementor-widget-text-editor li{
  font-size:1.05rem;
  line-height:1.75;
}
.menu-link{ font-size:16px; }

/* Páginas de catálogo / contacto / FAQ */
.breadcrumb{ font-size:.95em; }
.page-title-section p{ font-size:1.18em; line-height:1.6; }
.sidebar ul li a{ font-size:.95em; }
.product-title{ font-size:.95em !important; line-height:1.35; }
.product-search input{ font-size:.95em; }
.mv-topbar{ font-size:.82rem; }

@media (max-width:768px){
  body{ font-size:16.5px; }
}

/* ============================================================
   TAREA 2 · Botón "Agregar a cotización" en las tarjetas
   ============================================================ */
.product-card.mv-has-add{ position:relative; }
.product-card.mv-has-add .product-title{ border-radius:0; margin-top:auto; }
.mv-add-btn{
  display:flex; align-items:center; justify-content:center; gap:8px;
  width:100%; border:0; cursor:pointer;
  background:var(--mv-accent); color:#fff;
  font-family:inherit; font-weight:700; font-size:.82em;
  text-transform:uppercase; letter-spacing:.4px;
  padding:12px 10px; border-radius:0 0 12px 12px;
  transition:background .2s, transform .1s;
}
.mv-add-btn svg{ width:17px; height:17px; fill:currentColor; }
.mv-add-btn:hover{ background:var(--mv-accent-dark); }
.mv-add-btn:active{ transform:scale(.98); }
.mv-add-btn.mv-added{ background:var(--mv-ok); }

/* ============================================================
   TAREA 2 · Botón flotante (FAB) del carrito de cotización
   ============================================================ */
.mv-fab{
  position:fixed; right:22px; bottom:22px; z-index:99990;
  display:flex; align-items:center; gap:10px;
  background:var(--mv-primary); color:#fff;
  border:0; border-radius:50px; cursor:pointer;
  padding:14px 20px; box-shadow:0 10px 28px rgba(20,33,61,.35);
  font-family:inherit; font-weight:700; font-size:.95rem;
  transition:transform .15s, background .2s;
}
.mv-fab:hover{ background:var(--mv-primary-dark); transform:translateY(-2px); }
.mv-fab svg{ width:22px; height:22px; fill:#fff; }
.mv-fab-badge{
  position:absolute; top:-6px; right:-6px;
  min-width:22px; height:22px; padding:0 5px;
  background:var(--mv-accent); color:#fff;
  border-radius:50px; font-size:.72rem; font-weight:800;
  display:none; align-items:center; justify-content:center;
  border:2px solid #fff;
}
.mv-fab-badge.show{ display:flex; }
@media (max-width:600px){
  .mv-fab span.mv-fab-text{ display:none; }
  .mv-fab{ padding:16px; }
}

/* ============================================================
   TAREA 2 · Panel lateral del carrito de cotización
   ============================================================ */
.mv-cart-overlay{
  position:fixed; inset:0; z-index:99991;
  background:rgba(15,23,42,.55);
  opacity:0; visibility:hidden; transition:opacity .25s;
}
.mv-cart-overlay.open{ opacity:1; visibility:visible; }

.mv-cart{
  position:fixed; top:0; right:0; z-index:99992;
  width:420px; max-width:100vw; height:100%;
  background:#fff; display:flex; flex-direction:column;
  box-shadow:-12px 0 40px rgba(0,0,0,.18);
  transform:translateX(100%); transition:transform .3s cubic-bezier(.25,.8,.25,1);
  font-family:'Lato',system-ui,sans-serif;
}
.mv-cart.open{ transform:translateX(0); }

.mv-cart-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 22px; background:var(--mv-dark); color:#fff;
}
.mv-cart-head h3{ margin:0; font-size:1.15rem; font-weight:800; letter-spacing:.3px; color:#fff; }
.mv-cart-close{ background:0; border:0; color:#fff; cursor:pointer; padding:4px; line-height:0; opacity:.85; }
.mv-cart-close:hover{ opacity:1; }
.mv-cart-close svg{ width:26px; height:26px; fill:currentColor; }

.mv-cart-body{ flex:1; overflow-y:auto; padding:14px 16px; }

.mv-cart-empty{
  text-align:center; color:#8a93a3; padding:60px 24px;
}
.mv-cart-empty svg{ width:60px; height:60px; fill:#cdd4e0; margin-bottom:14px; }
.mv-cart-empty p{ margin:0; font-size:1rem; }
.mv-cart-empty .mv-btn{ margin-top:22px; box-sizing:border-box; text-decoration:none; }
.mv-cart-empty .mv-btn svg{ width:20px; height:20px; margin:0; fill:currentColor; }
.mv-cart-empty a.mv-btn-wa, .mv-cart-empty a.mv-btn-wa:hover, .mv-cart-empty a.mv-btn-wa:focus{ color:#fff; }

.mv-cart-item{
  display:flex; gap:12px; align-items:center;
  padding:12px; border:1px solid var(--mv-border); border-radius:12px;
  margin-bottom:10px; background:#fff;
}
.mv-cart-item img{
  width:58px; height:58px; flex:0 0 58px; object-fit:contain;
  background:#f6f8fc; border-radius:8px; padding:5px; border:1px solid #eef1f7;
}
.mv-cart-item .mv-ci-info{ flex:1; min-width:0; }
.mv-cart-item .mv-ci-name{
  font-weight:700; font-size:.85rem; color:var(--mv-dark);
  text-transform:uppercase; letter-spacing:.2px; line-height:1.25;
  margin:0 0 6px; word-break:break-word;
}
.mv-qty{ display:inline-flex; align-items:center; border:1px solid var(--mv-border); border-radius:8px; overflow:hidden; }
.mv-qty button{
  width:28px; height:28px; border:0; background:#f4f6fa; color:var(--mv-primary);
  font-size:1.1rem; font-weight:700; cursor:pointer; line-height:1;
}
.mv-qty button:hover{ background:var(--mv-primary); color:#fff; }
.mv-qty span{ min-width:34px; text-align:center; font-weight:700; font-size:.9rem; color:var(--mv-dark); }
.mv-ci-remove{
  background:0; border:0; cursor:pointer; color:#b9c0cd; padding:6px; line-height:0;
}
.mv-ci-remove:hover{ color:#e23b3b; }
.mv-ci-remove svg{ width:18px; height:18px; fill:currentColor; }

.mv-cart-foot{ border-top:1px solid var(--mv-border); padding:16px 18px 20px; background:#fff; }
.mv-cart-count{ font-size:.9rem; color:var(--mv-text); margin:0 0 12px; text-align:center; }
.mv-cart-count b{ color:var(--mv-dark); }

/* ── Formulario de datos del cliente ── */
.mv-form{ display:none; }
.mv-form.show{ display:block; }
.mv-field{ margin-bottom:12px; }
.mv-field label{ display:block; font-size:.82rem; font-weight:700; color:var(--mv-dark); margin-bottom:5px; }
.mv-field label .mv-req{ color:#e23b3b; }
.mv-field input{
  width:100%; box-sizing:border-box; padding:11px 13px;
  border:1px solid var(--mv-border); border-radius:9px;
  font-family:inherit; font-size:.95rem; color:var(--mv-dark);
  background:#fcfdff; transition:border-color .2s, box-shadow .2s;
}
.mv-field input:focus{ outline:0; border-color:var(--mv-primary); box-shadow:0 0 0 3px rgba(31,57,141,.12); }
.mv-field input.mv-invalid{ border-color:#e23b3b; background:#fff5f5; }
.mv-form-msg{ font-size:.8rem; color:#e23b3b; min-height:16px; margin:2px 0 6px; }

.mv-btn{
  width:100%; border:0; cursor:pointer; border-radius:10px;
  font-family:inherit; font-weight:800; font-size:.98rem;
  padding:14px; letter-spacing:.3px; transition:background .2s, transform .1s;
  display:flex; align-items:center; justify-content:center; gap:9px;
}
.mv-btn:active{ transform:scale(.99); }
.mv-btn svg{ width:20px; height:20px; fill:currentColor; }
.mv-btn-primary{ background:var(--mv-accent); color:#fff; }
.mv-btn-primary:hover{ background:var(--mv-accent-dark); }
.mv-btn-wa{ background:#25d366; color:#fff; }
.mv-btn-wa:hover{ background:#1da851; }
.mv-btn-ghost{ background:#eef1f7; color:var(--mv-dark); margin-top:9px; }
.mv-btn-ghost:hover{ background:#e2e7f1; }
.mv-cart-clear{
  display:block; width:100%; text-align:center; margin-top:12px;
  background:0; border:0; color:#9aa2b1; font-size:.8rem; cursor:pointer; text-decoration:underline;
}
.mv-cart-clear:hover{ color:#e23b3b; }

@media (max-width:480px){
  .mv-cart{ width:100%; }
}

/* ============================================================
   TAREAS 4 y 5 · Páginas Contacto y Preguntas Frecuentes
   ============================================================ */
.mv-page{ max-width:1180px; margin:36px auto 60px; padding:0 22px; }
.mv-page-head{ text-align:center; margin-bottom:34px; }
.mv-page-head h1{ color:var(--mv-primary); font-size:2.1em; font-weight:800; margin:0 0 8px; letter-spacing:.5px; }
.mv-page-head p{ color:var(--mv-text); font-size:1.12em; margin:0; }

/* Contacto */
.mv-contact-grid{ display:grid; grid-template-columns:1fr 1.1fr; gap:30px; align-items:start; }
.mv-info-list{ display:flex; flex-direction:column; gap:16px; }
.mv-info-card{
  display:flex; gap:15px; align-items:flex-start;
  background:#fff; border:1px solid var(--mv-border); border-radius:14px;
  padding:18px 20px; box-shadow:0 6px 20px rgba(0,0,0,.04);
}
.mv-info-ico{
  flex:0 0 46px; width:46px; height:46px; border-radius:12px;
  background:var(--mv-primary); display:flex; align-items:center; justify-content:center;
}
.mv-info-ico svg{ width:22px; height:22px; fill:#fff; }
.mv-info-card h4{ margin:0 0 3px; color:var(--mv-dark); font-size:1rem; font-weight:800; }
.mv-info-card a, .mv-info-card span{ color:var(--mv-text); font-size:.98rem; text-decoration:none; word-break:break-word; }
.mv-info-card a:hover{ color:var(--mv-primary); text-decoration:underline; }

.mv-card-form{
  background:#fff; border:1px solid var(--mv-border); border-radius:16px;
  padding:26px 26px 30px; box-shadow:0 10px 30px rgba(0,0,0,.05);
}
.mv-card-form h3{ margin:0 0 16px; color:var(--mv-dark); font-size:1.25rem; font-weight:800; }
.mv-field textarea{
  width:100%; box-sizing:border-box; padding:11px 13px; min-height:120px; resize:vertical;
  border:1px solid var(--mv-border); border-radius:9px; font-family:inherit; font-size:.95rem;
  color:var(--mv-dark); background:#fcfdff;
}
.mv-field textarea:focus{ outline:0; border-color:var(--mv-primary); box-shadow:0 0 0 3px rgba(31,57,141,.12); }
.mv-map{ margin-top:30px; border-radius:16px; overflow:hidden; border:1px solid var(--mv-border); box-shadow:0 8px 24px rgba(0,0,0,.05); }
.mv-map iframe{ display:block; width:100%; height:340px; border:0; }

@media (max-width:820px){
  .mv-contact-grid{ grid-template-columns:1fr; }
}

/* FAQ */
.mv-faq{ max-width:840px; margin:0 auto; display:flex; flex-direction:column; gap:14px; }
.mv-faq-item{ background:#fff; border:1px solid var(--mv-border); border-radius:14px; overflow:hidden; box-shadow:0 6px 18px rgba(0,0,0,.04); }
.mv-faq-q{
  width:100%; text-align:left; background:0; border:0; cursor:pointer;
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  padding:20px 22px; font-family:inherit; font-size:1.05rem; font-weight:700; color:var(--mv-dark);
}
.mv-faq-q:hover{ color:var(--mv-primary); }
.mv-faq-q .mv-faq-ico{ flex:0 0 auto; width:26px; height:26px; border-radius:50%; background:var(--mv-primary-light,#e7f0ff); color:var(--mv-primary); display:flex; align-items:center; justify-content:center; font-size:1.3rem; line-height:1; transition:transform .25s, background .2s; }
.mv-faq-item.open .mv-faq-ico{ transform:rotate(45deg); background:var(--mv-accent); color:#fff; }
.mv-faq-a{ max-height:0; overflow:hidden; transition:max-height .3s ease; }
.mv-faq-a-inner{ padding:0 22px 20px; color:var(--mv-text); font-size:1rem; line-height:1.7; }

/* Aviso de éxito reutilizable */
.mv-toast{
  position:fixed; left:50%; bottom:28px; transform:translateX(-50%) translateY(20px);
  background:var(--mv-dark); color:#fff; padding:14px 22px; border-radius:50px;
  font-family:'Lato',sans-serif; font-weight:700; font-size:.92rem; z-index:99999;
  box-shadow:0 12px 30px rgba(0,0,0,.3); opacity:0; transition:opacity .25s, transform .25s; pointer-events:none;
}
.mv-toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }

/* Carrusel de categorías (owl) antes de que cargue su JS: se dibuja con la
   misma geometría que tendrá después para que la página no salte al
   inicializarse. Owl: ancho de tarjeta = (100% + margen) / N - margen, con
   N = 1 / 2 / 4 según el ancho, y 15px de aire arriba (.owl-stage-outer). */
.owce-carousel.owl-carousel:not(.owl-loaded){ display:flex; overflow:hidden; padding-top:15px; margin-bottom:34px; } /* espacio de los puntos de navegación */
.owce-carousel.owl-carousel:not(.owl-loaded) > .item{ flex:0 0 100%; margin-right:10px; }
@media (min-width:768px){ .owce-carousel.owl-carousel:not(.owl-loaded) > .item{ flex-basis:calc((100% + 10px) / 2 - 10px); } }
@media (min-width:1024px){
  .owce-carousel.owl-carousel:not(.owl-loaded){ margin-bottom:10px; }
  .owce-carousel.owl-carousel:not(.owl-loaded) > .item{ flex-basis:calc((100% + 10px) / 4 - 10px); }
}

/* Libro de reclamaciones en el pie */
.mv-libro-reclamaciones, .site-footer a.mv-libro-reclamaciones{ display:inline-block; padding:6px 12px; border:1px solid rgba(255,255,255,.6); border-radius:6px; color:#fff !important; font-size:.8rem; font-weight:700; letter-spacing:.02em; text-decoration:none; }
.site-footer a.mv-libro-reclamaciones:hover, .site-footer a.mv-libro-reclamaciones:focus{ background:rgba(255,255,255,.12); color:#fff !important; }

/* Ruta de navegación (páginas de catálogo, contacto y FAQ): gris con contraste
   suficiente sobre el fondo celeste y enlaces subrayados. */
.breadcrumb{ color:#5b6472; }
.breadcrumb a{ text-decoration:underline; text-underline-offset:2px; }

/* COTIZAR dentro del menú móvil (en escritorio es el botón naranja del encabezado) */
#ast-mobile-popup .mv-menu-cotizar > .menu-link{ font-weight:800; border-left:4px solid #ff8939; }
