/*========  LINKS DE FUENTES DE GOOGLE FONTS  ==========*/
/*Roboto Mono, Cabin Condensed y Karma*/
/*@import url("https://fonts.googleapis.com/css2?family=Cabin+Condensed:wght@400;500;600;700&family=Karma:wght@300;400;500;600;700&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap");*/
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Montserrat:wght@400;700;800;900&family=Poppins:wght@300;400;600;700&display=swap');

:root {
    /* Colores base */
    --bucub-primary: #4E748B;    /* Azul arquitecto */
    --bucub-dark: #2F3A47;       /* Azul gris oscuro */
    --bucub-light: #CBC4C4;      /* Gris cálido */
    --bucub-muted: #9AA3AD;      /* Gris texto */
    --bucub-accent: #F2B452;     /* Dorado / CTA */
    --bucub-bg: #F7F7F7;         /* Fondo general */

    /* Estados */
    --bucub-success: #4CAF50;
    --bucub-danger: #D64545;

    /*--fuente-titulo : 'Roboto Mono', serif;
    --fuente-texto : 'Karma', serif;
    --fuente-subtitulo : 'Cabin Condensed', sans-serif;*/

    --fuente-titulo: 'Montserrat', sans-serif;   /* Extra Bold (800) */
    --fuente-subtitulo: 'Poppins', sans-serif;   /* Subtítulos */
    --fuente-texto: 'Lato', sans-serif;          /* Texto general */


    --fondo-mat-claro: rgb(236, 237, 255);
    --font-mat-azul:  #002d56;
}


body, p, strong, small, muted, th, td{
    font-family: var(--fuente-texto);
}

/* ===== LAYOUT PRINCIPAL ===== */
body {
    display: flex;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

h2, h3, h4, h5, h6{
    align-self: center;
    font-family: var(--fuente-subtitulo);
    font-weight: 400;
}

h1{
    align-self: center;
    font-family: var(--fuente-titulo);
    font-weight: 600;
}

.precio-texto, .precio, .total, .tota{
    font-family: var(--fuente-texto);
    color: var(--rojo);
    font-weight: 600;
}

.titular{
    font-family: var(--fuente-titulo);
    font-weight: 600;
    color: var(--blanco);
    text-decoration: none;
}

.titular:hover {
    color: var(--bucub-muted);
    text-decoration: none;
}

.titular h1 {
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: #fff;
    text-decoration: none;
}

.titular h1 span {
    color: var(--bucub-accent);
}


.btn-cotizar{
    font-family: var(--fuente-titulo);
    font-weight: 500;
    color: var(--blanco);
    background-color: var(--gris);
}

.content {
    padding: 20px;
    }


.container h1 {
    margin-bottom: 50px;
}

.center-text {
    text-align: center;
}

/* Estilo para titulo y texto de seccion de inicio*/
.intro-home {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("https://images.unsplash.com/photo-1600585154340-be6161a56a0c");
    background-size: cover;
    background-position: center;
}

.intro-home::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom, rgba(0,0,0,0), var(--bucub-bg));
}

.intro-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(47,58,71,0.92),
        rgba(78,116,139,0.85)
    );
}

.intro-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 40px 20px;
    color: #fff;
}

.intro-badge {
    display: inline-block;
    background: var(--bucub-accent);
    color: var(--bucub-dark);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 25px;
}

.intro-content h1 {
    font-size: 3.4rem;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.2;
}

.intro-content h1 span {
    color: var(--bucub-accent);
}

.intro-text {
  font-size: 1.25rem;
  color: var(--bucub-bg);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* Se inserta un CTA sutil para la parte de bajar a cotizar */
.intro-scroll {
    display: inline-block;
    background: var(--bucub-accent);
    color: var(--bucub-dark);
    padding: 16px 36px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
}

.intro-scroll:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgb(0, 0, 0, .35);
    background: #e0a63f;
    color:chocolate;
    text-decoration: none;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}


/*  Estilo texto cotizaciones*/
.cotizaciones-home {
    text-align: center;
    margin: 60px auto 40px;
}

.cotizaciones-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.cotizaciones-header h2 {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--bucub-dark);
    margin-bottom: 15px;
}

.cotizaciones-desc {
    color: var(--bucub-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.badge-cotizar {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--bucub-accent);
  color: var(--bucub-dark);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

#cotizaciones {
  scroll-margin-top: 120px; /* ajusta según tu navbar */
}


.nav-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    max-width: 900px;
    max-height: fit-content;
    background-color: var(--blanco);
    margin: 0 auto;
}

.nav-item {
    text-align: center;
    margin: 0 0;
    padding: 0 0;
}

.nav-bucub{
    background: linear-gradient(
        90deg,
        var(--bucub-dark),
        var(--bucub-primary)
    );
    padding: 10px 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.nav-item a {
    text-decoration: none;
    color: #000;
}
.nav-item.disabled {
    opacity: 0.0; /* Reducir opacidad para indicar deshabilitado */
    pointer-events: none; /* Evitar interacción con el elemento */
}

.nav-link1 {
    text-decoration: none;
}

.nav-item.disabled img:hover {
    cursor: not-allowed;
}

.navigation-buttons-custom {
  text-align: center;
  margin-top: 20px;
}

.nav-item img {
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.nav-item.current img {
    border: 2px solid var(--bucub-accent);
    border-radius: 100%;
    transform: scale(1.2);
}
.nav-item.disabled img {
    opacity: 0.25;
    cursor: not-allowed;
}
.nav-link.picked img{
    border: 2px solid var(--bucub-accent);
    border-radius: 100%;
}

.nav-item-hidden img {
    opacity: 0;
    cursor: not-allowed;
}

.nav-item.locked img {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(100%);
    cursor: not-allowed;
    pointer-events: none;
}

/* Estado cuando el usuario lo selecciona en el menú inicial */
.nav-item.selected {
    border: 2px solid var(--bucub-primary);
}

/* ===== ESTILOS MEJORADOS PARA PALOMITAS VERDES ===== */
.nav-item.completed {
    position: relative;
    display: inline-block;
    border: 2px solid var(--bucub-accent);
    box-shadow: 0 0 10px rgba(242,180,82,0.4);
}

.nav-item.completed img {
    position: relative;
}

.nav-item.completed::after {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--verde);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    pointer-events: none;
}

/* Efecto sutil al hover */
.nav-item.completed:hover::after {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Para asegurar que la imagen tenga posición relativa */
.nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-item img {
    position: relative;
    z-index: 1;
}

/* En modo selección: nada es clickeable por defecto */
.selection-mode .nav-item a {
  pointer-events: none !important;
}

/* Estilos para el indicador de progreso en el carrito */
.progreso-seccion {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    border-left: 4px solid var(--verde);
}

.progreso-seccion .form-check-input:checked {
    background-color: var(--verde);
    border-color: var(--verde);
}

.progreso-seccion .form-check-label {
    font-size: 12px;
    color: #666;
}

/* Estilos para el botón de guardar cuando está completado */
.btn-guardar-completado {
    background: var(--verde) !important;
    opacity: 0.9 !important;
}

.btn-guardar-completado:hover {
    background: #1a8a3e !important;
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* Alertas personalizadas */
.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #c3e6cb;
    color: #155724;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}


.search-bar {
  background-color: #f8f9fa;
  padding: 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.search-bar input {
  border: none;
  outline: none;
  flex: 1;
  padding: 5px 10px;
}

.search-bar input::placeholder {
  color: #6c757d;
}

.card-img-overlay {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 10px;
}

.card {
  width: 250px;
  height: 250px;
  margin-bottom: 20px;
  border-radius: 10px;
  overflow: hidden;
}

.card.active {
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease;
}

.card.active:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,.25);
}

.card.active .card-img-overlay::after {
  content: "Iniciar cotización →";
  position: absolute;
  bottom: 15px;
  right: 15px;
  font-size: 14px;
  font-weight: bold;
  color: var(--bucub-accent);
}

.card.disabled {
  filter: grayscale(100%);
  opacity: 0.6;
  cursor: not-allowed;
}

.card.disabled::after {
  content: "Próximamente";
  position: absolute;
  inset: 0;
  background: rgba(47,58,71,.6);
  color: #fff;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}


/*.card.active ::before {
  display: none;
}

.card ::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(128, 128, 128, 0.7); /* Color gris con opacidad del 70% 
  pointer-events: none; /* Permite hacer clic en los elementos debajo 
}*/

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Apartado del seccion de titulo y texto descriptivo para la parte de partes de baño que se quieren cotizar*/
.paso-header {
  background: linear-gradient(135deg, #2F3A47, #4E748B);
  color: #fff;
  padding: 20px 20px 20px;
}

.paso-badge {
  display: inline-block;
  background: rgba(242, 181, 82, 0.6);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
}

.paso-titulo {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 15px;
}

.paso-descripcion {
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0 auto;
  color: #e0e0e0;
}

/* Parte para la mejora de tarjetas seleccionables*/
.remodel-option {
    cursor: pointer;
    transition: all 0.3s ease;
}

.remodel-option img {
    background: #F5F5F5;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
}

.remodel-option:hover img {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.checkbox:checked + label, 
.checkbox:checked {
    accent-color: var(--bucub-accent);
}

/*====== BREADCRUMBs ======*/
.breadcrumb-container {
    position: fixed;
    z-index: 1001;
    background-color: #fff; 
    width: 80%;
    padding-top: 0px;
    margin-top: 0px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);

}

/* Estilo para Baño.php */

.img-container {
  width: 160%;
  height: 300px; /* Ajusta la altura según sea necesario */
  overflow: hidden;
  position: center;
}

.img-container img {
  width: 200%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.radio-large {
  transform: scale(2); /* Ajusta el valor de escala según tus necesidades */
  margin-top: 10px;
}

#m2_suelo {
    background-color: lightgrey;
}


.btn-custom {
  width: 100%;
  max-width: 100%;
  margin-top: 10px;
}


/* Estilo para la descripción */
.description {
  font-size: 14px; /* Tamaño de fuente más pequeño */
  color: black; /* Color de texto más suave */
  margin-top: 0.25rem; /* Espacio superior */
}

.option-container {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
}

.option {
  text-align: center;
}

.option input {
  display: none;
}

.option label {
  display: block;
  cursor: pointer;
}

.option input:checked + label img {
  border-color: blue;
  background-color: lightblue;
}


/* Estilo para tipo baño */

.rowbano {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5cm; /* Espacio entre las opciones */
    margin-bottom: 20px; /* Espacio entre las filas */
}

button {
    padding: 10px 2px;
    background-color: var(--bucub-accent);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.boton {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--bucub-accent); /* Color de fondo del botón */
    color: #fff; /* Color del texto */
    text-decoration: none; /* Quitar subrayado del enlace */
    border: none; /* Quitar borde */
    border-radius: 5px; /* Borde redondeado */
    font-size: 16px; /* Tamaño de fuente */
    cursor: pointer; /* Cambiar cursor a mano */
    transition: background-color 0.3s ease; /* Transición suave del color de fondo */
}


.boton:hover,
.boton:focus {
  background-color: var(--bucub-accent);
  border-color: var(--bucub-accent);
  text-decoration: none; /* por si algún navegador intenta subrayar en :hover */
  outline: none;
  color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(253, 137, 13, 0.25);
}

.boton:active {
  background-color: var(--bucub-accent);
  border-color: var(--bucub-accent);
}

.boton:disabled,
.boton[aria-disabled="true"] {
  opacity: .65;
  pointer-events: none;
}



.custom-button-prev, .custom-button-next {
  padding: 10px 10px;
  background-color: var(--bucub-accent);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin: 5px;
}

.custom-button-prev:hover, .custom-button-next:hover {
  background-color: var(--bucub-accent);
}


/*css para estructura principal*/

.container {
  max-width: 900px;
  margin: 40px, left;
  background: var(--blanco);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  position:center;
}

.container h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

form, #resumen {
  width: 100%;
  padding: 20px;
  margin-bottom: 20px;
}
label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.cost-boxes-container {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}
.cost-box {
  text-align: center;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.cost-box strong {
  display: block;
  margin-bottom: 5px;
}

/* Estilos para el carrito */
#carrito {
  background-color: #fff;  /* Color de fondo blanco */
  border: 2px solid #000;  /* Borde sólido de 2px de grosor y color azul */
  border-radius: 8px;  /* Bordes redondeados de 8px */
  padding: 15px; /* Espacio interno de 15px alrededor del contenido */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);  /* Sombra suave con desplazamiento 0 en X, 4px en Y, 8px de difuminado, y color semi-transparente */
  z-index: 1000;  /* Capa z-index para asegurarse de que esté por encima de otros elementos, pero menor que la cabecera */
  transition: all 0.3s ease;  /* Transición suave de 0.3 segundos para cambios */

}

 #carrito:hover {
  box-shadow: 0 6px 12px rgba(0,0,0,0.15); /* Sombra más pronunciada cuando el mouse está sobre el elemento */
}


  #carrito h3 {
  margin: 0 0 10px 0;         /* Márgenes del título: arriba, derecha, abajo, izquierda */
  color: var(--azul-secundario);             /* Color del texto del título */
  font-size: 18px;            /* Tamaño de fuente del título */
  text-align: center;         /* Alineación centrada del texto del título */
}

 #carrito p {
  margin: 0;          /* Elimina el margen exterior del párrafo */
  font-size: 16px;            /* Tamaño de fuente del párrafo */
  color:var(--negro);                /* Color del texto del párrafo */
}

  #carrito-total {
  font-weight: bold;          /* Texto en negrita para el total */
  color:var(--rojo);             /* Color verde para el total */
}


/* Estilos para Lavabo */

img.image {
    display: block;
    margin: 0 auto;
    width: 100px; /* Ajusta el tamaño deseado para todas las imágenes */
}


/* Estilos para wc.php */
#resumen-seleccion {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

#lista-resumen {
  list-style-type: none;
  padding-left: 0;
}

#lista-resumen li {
  margin-bottom: 10px;
}


img.imagen
  {
    width: 110px;
  }


  img.image1
  {
    display: block;
    margin: 0 auto;
    width: 160px;
  }

/*select.selectregadera {
  
  width: 100%;
  padding: 5px;    
  border: 1px solid #ccc;
  border-radius: 3px;

}*/

td.etiqueta{
    background-color: #2980b9;
    color: #333;
}

.hidden{
display: none;
}

/* ========= ESTRUCTURA 80/20 CON CARRITO FLOTANTE ========== */

/* Contenedor principal que incluye main y carrito */
.main-wrapper {
    display: flex;
    flex: 1;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    align-items: flex-start;
    position: relative;
}

/* Sección principal ocupa 80% */
.seccion-main {
    flex: 0 0 80%;
    width: 80%;
    padding: 20px;
    box-sizing: border-box;
    background: var(--blanco);
}

/* Carrito ocupa 20% - SE MUEVE CON EL SCROLL COMO CABECERA */
.compras {
    flex: 0 0 20%;
    width: 20%;
    background-color: #f8f9fa;
    padding: 15px;
    box-sizing: border-box;
    border-left: 1px solid #ddd;
    position: sticky;
    top: 80px; /* Ajustado para dejar espacio para el encabezado */
    height: calc(100vh - 100px); /* Altura ajustada */
    overflow-y: auto;
    z-index: 99; /* Un z-index menor que el encabezado */
    margin-top: 20px; /* Espacio adicional en la parte superior */
}

/* CARRITO - MANTENEMOS ESTILOS PERO CON POSICIÓN RELATIVA */
#carrito {
    position: relative;
    width: 100%;
    background-color: #ffffff;
    border: 2px solid var(--bucub-muted);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 0;
}

#carrito h3 {
    margin: 0 0 10px 0;
    color:  var(--bucub-dark);
    font-size: 18px;
    text-align: center;
}

#carrito-total {
    font-weight: bold;
    color: var(--bucub-accent);
}

/* Estilos para los elementos internos del carrito */
/*.lista-productos {
    margin-bottom: 20px;
    min-height: 50px;
    max-height: 300px;
    overflow-y: auto; 
} */

.resumen-compras {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

.resumen-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.resumen-label {
    font-weight: bold;
    color: #333;
}

.resumen-valor {
    color: #e63462;
    font-weight: 600;
}

.total-container {
    background: linear-gradient(90deg, var(--bucub-dark), var(--bucub-primary));
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.botones-compras {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-compras {
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-guardar {
    background: #3A6EA5;
    color: white;
}

.btn-borrar {
    background: #dc3545;
    color: white;
    border:2px solid #dc3545;
    padding: 12px;
    border-radius: 20px;
    
}

.btn-borrar:hover {
    background: #800000;
    color: white;
    border:2px solid #800000;
    opacity: 0.9;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.btn-cotizar {
    background: white;
    border-radius: 20px;
    border:2px solid var(--bucub-accent);
    color: var(--bucub-accent);
   
}

.btn-compras:hover {
    background: var(--bucub-accent);
    color: white;
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-cotizar-nav{
    background: var(--bucub-accent);
    border-radius: 10px;
    border:2px solid var(--bucub-accent);
    color: white;
    display: inline-block;
    position: relative;
}

.btn-cotizar-nav span{
    position: relative;
}

.btn-cotizar-nav:hover{
    color: white;
    text-decoration: none;
}

.btn-cotizar-nav span::after{
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -3px;
    left: 0;
    background-color: white;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.btn-cotizar-nav:hover span::after{
    transform: scaleX(1);
    transform-origin: bottom left;
}


.btn-group-container{
  font-family: var(--fuente-subtitulo);
}

.btn-group-container .btn-group{
    gap: 2px;
}

.btn-group-container .btn-group button{
  border-radius: 15px;
  background-color: var(--bucub-primary);
}

.btn-group-container .btn-group button:hover{
  border-radius: 15px;
  background-color: var(--bucub-dark);
}

.btn-group-top{
  align-self: right;
  align-items: right;
  align-content: right;
}

/* Asegurar que el encabezado tenga mayor z-index */
header, .navbar, .navegacion {
    z-index: 100 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .main-wrapper {
        flex-direction: column;
        position: relative;
    }
    
    .seccion-main {
        flex: 0 0 100%;
        width: 100%;
        order: 1;
        padding-bottom: 80px; /* Espacio para el botón flotante */
    }
    
    .compras {
        flex: 0 0 100%;
        width: 100%;
        border-left: none;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: auto;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
        background: white;
        z-index: 1000;
        padding: 0;
        margin-top: 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        border-radius: 15px 15px 0 0; /* Bordes redondeados solo arriba */
    }
    
    .compras.active {
        max-height: 50vh; /* Reducido de 70vh a 50vh para hacerlo más delgado */
        padding: 15px;
        overflow-y: auto;
    }
    
    /* Botón flotante del carrito para móvil - más pequeño */
    .carrito-mobile-toggle {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 50px; /* Reducido de 60px */
        height: 50px; /* Reducido de 60px */
        background: var(--bucub-primary);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 20px; /* Reducido de 24px */
        cursor: pointer;
        z-index: 1001;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        transition: all 0.3s ease;
        border: 2px solid white;
    }
    
    .carrito-mobile-toggle:hover {
        background: var(--bucub-dark);
        transform: scale(1.1);
    }
    
    .carrito-mobile-toggle::before {
        content: '🛒';
    }
    
    .carrito-mobile-toggle.active::before {
        content: '✕';
        font-size: 18px; /* Reducido de 20px */
    }
    
    /* Contador de items en el carrito - más pequeño */
    .carrito-counter {
        position: absolute;
        top: -5px;
        right: -5px;
        background: var(--bucub-danger);
        color: white;
        border-radius: 50%;
        width: 18px; /* Reducido de 20px */
        height: 18px; /* Reducido de 20px */
        font-size: 10px; /* Reducido de 12px */
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
    }
    
    /* Ajustes específicos para el contenido del carrito en móvil - más compacto */
    #carrito {
        margin: 0;
        border: none;
        box-shadow: none;
        background: transparent;
        padding: 0;
    }
    
    #carrito h3 {
        font-size: 16px; /* Más pequeño */
        margin: 0 0 8px 0; /* Menos margen */
        padding: 0;
    }
    
    .resumen-compras {
        padding: 10px; /* Menos padding */
        margin-bottom: 10px; /* Menos margen */
    }
    
    .resumen-item {
        margin-bottom: 5px; /* Menos espacio entre items */
        padding: 3px 0; /* Menos padding */
        font-size: 14px; /* Texto más pequeño */
    }
    
    .total-container {
        padding: 10px 15px; /* Menos padding */
        margin-bottom: 15px; /* Menos margen */
        font-size: 16px; /* Texto más pequeño */
    }
    
    .botones-compras {
        gap: 8px; /* Menos espacio entre botones */
    }
    
    .btn-compras {
        padding: 10px; /* Menos padding */
        font-size: 12px; /* Texto más pequeño */
    }
    
    .lista-productos {
        max-height: 120px; /* Más compacto */
    }
    
    /* Overlay semi-transparente */
    .carrito-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.3); /* Más transparente */
        z-index: 999;
        display: none;
        backdrop-filter: blur(2px); /* Efecto blur sutil */
    }
    
    .carrito-overlay.active {
        display: block;
    }
    
    /* Asegurar que el contenido principal sea visible */
    .seccion-main {
        z-index: 1;
        position: relative;
    }
}

/* Para tablets (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .carrito-mobile-toggle,
    .carrito-overlay {
        display: none;
    }
    
    .compras {
        position: sticky;
        top: 80px;
        height: calc(100vh - 100px);
        overflow-y: auto;
        max-width: 300px; /* Ancho máximo para no deformar el layout */
    }
}

/* Ocultar elementos móviles en desktop */
@media (min-width: 769px) {
    .carrito-mobile-toggle,
    .carrito-overlay {
        display: none;
    }
    
    .compras {
        max-width: 350px; /* Ancho máximo en desktop */
    }
}

/* ESTILOS PARA DISPLAY DE MATERIALES */
.mat-header {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    align-content: flex-end;
    background-color: var(--fondo-mat-claro);
    padding-top: 1%;
    border-radius: 15px;
    color: var(--font-mat-azul);
    }

.mat-header-items:nth-child(1) {
    display: flex;
    width: 43%;
    align-self: center;
    text-align: center;
    justify-content: center; 
    align-items: center;   
}

.mat-header-items:nth-child(2) {
    display: flex;
    width: 15%;
    align-self: center;
        text-align: center;
    justify-content: center; 
    align-items: center;  
}

.mat-header-items:nth-child(3) {
    display: flex;
    width: 15%;
    align-self: center;
        text-align: center;
    justify-content: center; 
    align-items: center;  
}

.mat-header-items:nth-child(4) {
    display: flex;
    width: 15%;
    align-self: center;
        text-align: center;
    justify-content: center; 
    align-items: center;  
}

/*.mat-container {  
    display: grid;
    grid-template-columns: repeat(3, 1fr) repeat(3, 1fr) repeat([autofit], 2, 0.5fr);
    grid-template-rows: repeat([autofit], 2, 0.5fr);
    grid-auto-rows : 50%;
    grid-auto-columns: 30%;
    gap: 10px 10px;
    grid-auto-flow: row;
    grid-template-areas:
        "mat-img mat-cat mat-nombre mat-unitario mat-cantidad mat-total"
        "mat-img mat-opcion mat-nombre mat-unitario mat-cantidad mat-total";
    min-height: 40%;
    min-width: 12%;
    max-width: 70%;
    width: 50%;
}*/

.mat-img { grid-area: mat-img;
    min-height:100px;
    max-height:400px;
    width: 50%;
    overflow: hidden;
    }

.mat-img img{
    width: 90%;
    min-height: 15%;
    align-self: center;
    object-fit: contain; 
    object-position: center; 

    margin: 20% auto auto auto;
}

.mat-opcion select{
    border-radius: 5%;
    background-color: #c5c5dfff;
    color: #ffffff;
}

.mat-cat select{
    border-radius: 5%;
    background-color: #d67e7eff;
    color: #ffffff;
}

.mat-cat select, .mat-opcion select{
    overflow: hidden;          
    white-space: nowrap; 
    text-overflow: ellipsis;
    width: 70%;
}

.mat-opcion {
    grid-area: mat-opcion;
    height: 50%;
}

.mat-nombre {
    align-self: center;
    grid-area: mat-nombre;
    height: 50%;
    max-width: 90%;
}

.mat-unitario {
    align-self: center;
    grid-area: mat-unitario;
    height: 50%;
    font-size: 120%;
    max-width: 20%;

}

.mat-total {
    align-self: center;
    grid-area: mat-total;
    height: 25%;
    font-size: 150%;
    max-width: 20%;
}

.mat-cantidad {
    align-self: center;
    grid-area: mat-cantidad;
    height: 25%;
    font-size: 150%;
    max-width: 20%;
}

.mat-cat {
    align-self: end;
    grid-area: mat-cat;
    height: 50%;
}

.mat-footer{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    align-content: flex-end;
    padding-bottom: 1%;
}

    .mat-footer-items:nth-child(1) {
    display: flex;
    width: 74%;
    align-self: center;
    text-align: center;
    justify-content: center; 
    align-items: center;   
}

.mat-footer-items:nth-child(2) {
    display: flex;
    width: 20%;
    align-self: center;
    text-align: right;
    justify-content: center; 
    align-items: center;  

    height: 25%;
    font-size: 180%;
    max-width: 20%;
}

/* Estilos de paquetes */
.seleccion-paquete-container{
    border-radius: 15px;
    background: white;
    }

.seleccion-paquete-container h3{
    padding-top: 1%;
    color: #004E98; 
}

.paquetes-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    padding: 20px 0;
}

/* TARJETA*/
.paquete-option {
    background: #f2f2f2;
    border-radius: 28px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all .35s ease;
    box-shadow: inset 0 0 0 2px transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* HOVER */
.paquete-option:hover {
    transform: translateY(-6px);
    background: #ededed;
}

/* SELECCIONADO */
.paquete-option.selected {
    background: #ffffff;
    box-shadow:
        0 20px 40px rgba(0,0,0,.15),
        inset 0 0 0 3px var(--bucub-primary);
}

.paquete-option img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 18px;
}

/*.paquete-option h5 {
    color: #2F4FA4;
    margin: 8px 0 0 0;
    font-size: 14px;
    font-weight: bold;
}*/

/* CATEGORÍA */
.paquete-option h5:first-child {
    font-size: 13px;
    letter-spacing: 1px;
    font-weight: 700;
    color: #6c757d;
    margin-bottom: 12px;
}

/* TITULO */
.paquete-option h5:nth-of-type(2) {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #212529;
}

    .paquete-option h4 {
    color: #232c43ff;
    margin: 10px 0 0 0;
    font-size: 12px;
    font-weight: bold;
}

/* DESCRIPCIÓN */
.paquete-option p {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .paquete-option img {
        height: 160px;
    }
}

.pregunta-container{
    display: flex; 
    gap: 20px; 
}

.pregunta-container select{
    overflow: hidden;          
    white-space: nowrap; 
    text-overflow: ellipsis;
}  

.pregunta-radio label{
    display: flex; 
    flex-direction: column; 
    align-items: center;
}


.pregunta-container label{
    display: flex; 
    flex-direction: column; 
    align-items: center;
}

.pregunta-radio-item{
    display: flex; 
    flex-direction: column; 
    align-items: center;
}

/*  BASE DE TABLAS DE TAB4 */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    /*-webkit-overflow-scrolling: touch;*/
    margin-top: 50px;
}

.table-detalles-costo {
    /* Mismo comportamiento responsive que ya usaste para las anteriores */
    width: 100%;
    min-width: 760px;            /* ajusta según densidad */
    border-collapse: separate;   /* necesario para border-spacing tarjeta */
    border-spacing: 0 10px;      /* espacio entre filas (tarjeta) */
    margin: 0;                   /* evita márgenes globales previos */
}

.table-detalles-costo {
  border: none;
  outline: none;
  box-shadow: none;
}

/* Encabezado oscuro tipo “resumen” */
.table-detalles-costo thead th {
    background-color: #2F3A47;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #F7F7F7;
    padding: 10px;
    white-space: nowrap;
}

/* Celdas como tarjetas */
.table-detalles-costo td {
    background: #f9fafb;
    padding: 12px;
    vertical-align: middle;
    border-top: 1px solid #eef1f4;
    border-bottom: 1px solid #eef1f4;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    text-align: left;            /* evita el centrado forzado global */
}

/* Estilo elegante para h3 en el Tab 4 */
.titulo-tab4 {
  margin: 18px 0 10px;
  font-size: 1.125rem;         /* ~18px */
  line-height: 1.25;
  font-weight: 700;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Barra decorativa a la izquierda */
.titulo-tab4::before {
  content: "";
  width: 6px;
  height: 22px;
  background: #2F3A47;         /* combina con tu thead oscuro */
  border-radius: 4px;
  flex: 0 0 auto;
  display: inline-block;
}

/* Línea sutil bajo el título (opcional) */
.titulo-tab4::after {
  content: "";
  height: 1px;
  background: #e5e7eb;
  flex: 1 1 auto;
  border-radius: 1px;
}

/* Esquinas redondeadas por fila */
.table-detalles-costo tr td:first-child { border-radius: 10px 0 0 10px; }
.table-detalles-costo tr td:last-child  { border-radius: 0 10px 10px 0; }

/* Totales en tfoot (verde suave) */
.table-detalles-costo tfoot td {
    background: #ecfdf5;
    font-weight: 700;
    color: #065f46;
}

/* Énfasis de números (si aplican en tus celdas) */
.table-detalles-costo .price,
.table-detalles-costo .total,
#mano-obra-table1 .total1 {     /* la tercera columna de Mano de Obra */
    font-weight: 600;
    color: #111827;
}
.table-detalles-costo .total,
#resumen-productos-tab4 tfoot td:last-child,
#mano-obra-table1 tfoot td:last-child {
    font-weight: 700;
    color: #065f46;
}

/* Selects dentro de tablas resumen (si hubiera) */
.table-detalles-costo select {
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.85rem;
    background: #fff;
}

/* Tabla de Materiales*/
.table-detalles-costo--materiales td {
    border-right: none !important;
    border-left:  none !important;
    border-top:   none !important;
}
.table-detalles-costo--materiales th {
    border-right: none !important;
    border-left:  none !important;
    border-bottom:none !important;
    border-top:   none !important;

    /* background-color: var(--fondo-mat-claro); */
    padding-top: 1%;
    color: var(--font-mat-azul);
}

/* Tamaños tipográficos especiales (si los usas en Materiales) */
.table-detalles-costo--materiales .tota { font-size: 150%; }
.table-detalles-costo--materiales .precio-texto { font-size: 150%; }

/* RESPONSIVE DE LAS TABLAS*/
@media (max-width: 992px) {
    .table-detalles-costo { min-width: 680px; }
    .table-detalles-costo td,
    .table-detalles-costo thead th { padding: 8px 10px; font-size: 14px; }
}
@media (max-width: 576px) {
    .table-detalles-costo { min-width: 600px; }
    .table-detalles-costo td,
    .table-detalles-costo thead th { padding: 6px 8px; font-size: 13px; }
}
  