h2.mis-direcciones-title {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    margin: 0 0 1rem 1rem !important;
    letter-spacing: 1px !important;
    color: #00162d !important;
    text-align: start !important;
}

/* contenedor principal */
.direcciones-container {
    display: grid;
    gap: 2rem;
    flex-wrap: wrap;
    grid-template-columns: 50%;
}


/* cada tarjeta */
.direccion-card {
    background: #f5f7fa;
    border-radius: 15px;
    padding: 0;
    flex: 1 1 300px;
    position: relative;
}

/* título dentro de la tarjeta */
.direccion-titulo {
    margin-bottom: 0;
    padding: 20px 25px;
    height: 45px;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    font-size: 18px;
    font-weight: 900;
    color: #002041;
    border-bottom: 2px solid #fff;
}

.direccion-datos{
    display: flex;
    justify-content: center;
    padding: 18px 0;
}

.content-p-address{
    width: 70% !important;
    line-height: 18px;
}

/* datos de la dirección */
.direccion-datos p {
    margin-bottom: 0em;
    font-weight: 500;
    color: #002041;
}

/* datos de la dirección - name */
.direccion-datos .name{
    font-weight: 900;
    font-size: 17px;
    margin-bottom: 3px;
}


/* botón editar alineado a la derecha */
.direccion-editar {
    text-align: right;
    margin-top: 0;
    margin-bottom: 20px;
    margin-right: 25px;
    line-height: 13px;
}

.direccion-editar button{
    text-decoration: underline !important;
    background: transparent !important;
    color: #002041 !important;
    box-shadow: none !important;
    font-weight: 800 !important;
    padding: 0 !important;
    margin: 0 15% !important;
    font-size: 1.2rem;
}

/* modal overlay + contenido */
.direccion-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  visibility: hidden;
  opacity: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 9999;
}

.direccion-modal.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.direccion-modal-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,.5);
}
.direccion-modal-content {
  position: relative;
  overflow: visible !important;
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 500px;
  width: 90%;
  max-height: 90%;
  
  /* PERMITIMOS que los selects 'se salgan' */
  overflow: visible;
  
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
  z-index: 10001; /* un paso por encima de overlay */
}

/* 2) Eleva el z-index de los selects para que floten por encima */
.direccion-modal-content select {
  position: relative;
  z-index: 10002;
}

/* 3) (Opcional) Si usas select2 o librerías parecidas: */
.direccion-modal-content .select2-container {
  z-index: 10002 !important;
}

.direccion-modal-close {
  position: absolute;
  top: .5rem;
  right: .5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

/* Formularios comprimidos */
.direccion-form .form-row-first,
.direccion-form .form-row-last {
  width: 48%;
  float: left;
  margin-right: 4%;
}
.direccion-form .form-row-last { margin-right: 0; }
.direccion-form .form-row-wide {
  width: 100%;
  clear: both;
}
/* Limpieza de floats */
.direccion-form .clear { clear: both; }

/* Botón guardar más compacto */
.direccion-form .button {
  font-size: .9rem !important;
  padding: 20px 25% !important;
    margin-top: 20px !important;
    border-radius: 10px !important;
    background: #f4f5f5 !important;
    color: #fff !important;
}


.woocommerce-address-fields p .button{
  font-size: 1.2rem !important;
    padding: 20px 20% !important;
    margin-top: 20px !important;
    border-radius: 10px !important;
    background: #002142e3 !important;
    color: #fff !important;
    display: flex;
    margin: auto;
    text-transform: uppercase;
    font-weight: 900 !important;
}


/* 1) Contenedor del modal permite overflow visible */
.direccion-modal-content {
  overflow: visible !important;
  background: #f4f5f5 !important;
}

/* 2) Asegúrate de que los <select> y sus dropdowns floten por encima */
.direccion-modal-content select,
.direccion-modal-content .select2-container--default .select2-selection--single {
  position: relative;
  z-index: 10002;
}
/* Si usas Select2: */
.select2-container .select2-dropdown {
  z-index: 10003 !important;
}


/* Estilos del modal/Pop-Up */
.woocommerce-js form .form-row{
    padding: 3px;
    margin: 0 !important;
}

.woocommerce-js form .form-row input.input-text {
    width: 100% !important;
}

.woocommerce-js form .form-row label {
    width: 95% !important;
    color: #002041;
}

.direccion-modal-title{
    display: none;
}

@media (max-width: 544px) {
    .direcciones-container {
    display: grid;
    gap: 2rem;
    flex-wrap: wrap;
    grid-template-columns: 100%;
}

.woocommerce-MyAccount-content{
    margin-bottom: 50vh !important;
}

.woocommerce-address-fields p .button{
    margin-top: 15px !important;
}

}