/* --- Navegación Personalizada Navigation.php --- */

.woocommerce-account .woocommerce-MyAccount-navigation.lte-custom-nav {
  padding: 15px;
  border: 1px solid #ebebeb;
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.lte-custom-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lte-custom-nav ul li {
  margin-bottom: 5px;
}

.lte-custom-nav ul li a {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-radius: 10px;
  color: #4a4a4a;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.3s ease;
}

.lte-custom-nav ul li a i {
  margin-right: 12px;
  color: #007bff; /* Tu color principal */
  font-size: 18px;
  transition: all 0.3s ease;
}

/* Hover y Activo */
.lte-custom-nav ul li a:hover,
.lte-custom-nav ul li.is-active a {
  background-color: #f0f7ff;
  color: #007bff;
}

.lte-custom-nav ul li.is-active a {
  background-color: #007bff;
  color: #ffffff;
}

.lte-custom-nav ul li.is-active a i {
  color: #ffffff;
}

/* Estilo para Cerrar Sesión */
.lte-custom-nav ul li.customer-logout {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.lte-custom-nav ul li.customer-logout a i {
  color: #e74c3c;
}

.lte-custom-nav ul li.customer-logout a:hover {
  background-color: #fff5f5;
  color: #e74c3c;
}

/* Adaptación móvil */
@media (max-width: 768px) {
  .woocommerce-account .woocommerce-MyAccount-navigation {
    width: 100%;
    margin-bottom: 30px;
    float: none;
  }
}

/* --- Navegación Editorial y Compacta para Mi Cuenta --- */

.lte-nav-minimal {
  width: 200px;
  margin-right: 40px;
  float: left;
}

.lte-nav-title {
  margin-bottom: 15px;
  color: #b0b0b0;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.lte-nav-minimal ul {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.lte-nav-minimal ul li a {
  display: flex !important;
  position: relative;
  align-items: center;
  padding: 8px 0 !important;
  color: #444; /* Color del texto por defecto */
  font-size: 14px;
  text-decoration: none !important;
  transition: all 0.3s ease;
}

/* Iconos con FontAwesome Unicode */
.lte-nav-minimal ul li a::before {
  display: inline-block;
  width: 20px;
  margin-right: 12px;
  color: #999; /* Icono gris suave por defecto */
  font-weight: 900 !important;
  font-family: "Font Awesome 7 Free" !important;
  text-align: center;
  transition: color 0.3s ease;
}

/* Iconos específicos */
.lte-item-dashboard a::before {
  content: "\f015";
}
.lte-item-orders a::before {
  content: "\f290";
}
.lte-item-downloads a::before {
  content: "\f019";
}
.lte-item-edit-address a::before {
  content: "\f3c5";
}
.lte-item-edit-account a::before {
  content: "\f4fe";
}
.lte-item-customer-logout a::before {
  content: "\f011";
}

/* Subrayado sutil con el nuevo color #313c46 */
.lte-nav-minimal ul li a::after {
  position: absolute;
  bottom: 4px;
  left: 32px;
  width: 0;
  height: 1px;
  background: #313c46;
  content: "";
  transition: width 0.3s ease;
}

/* Estados Hover y Activo con el nuevo color */
.lte-nav-minimal ul li a:hover,
.lte-nav-minimal ul li.is-active a {
  color: #313c46 !important;
}

.lte-nav-minimal ul li a:hover::before,
.lte-nav-minimal ul li.is-active a::before {
  color: #313c46 !important;
}

.lte-nav-minimal ul li a:hover::after,
.lte-nav-minimal ul li.is-active a::after {
  width: calc(100% - 32px);
}

/* Separador para salir */
.lte-item-customer-logout {
  margin-top: 15px;
  padding-top: 10px !important;
  border-top: 1px solid #f0f0f0 !important;
}

/* --- Ajuste Móvil Definitivo: Flujo Vertical Puro --- */
@media (max-width: 768px) {
  /* Forzamos que el contenedor no use flexbox ni floats */
  .woocommerce-account .lte-nav-minimal {
    display: block !important;
    width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 25px !important;
    float: none !important;
    clear: both !important;
  }

  .lte-nav-minimal ul {
    display: block !important; /* Anula cualquier display: flex */
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .lte-nav-minimal ul li {
    display: block !important; /* Cada ítem ocupará su propia línea */
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    border: none !important;
  }

  .lte-nav-minimal ul li a {
    display: flex !important; /* Flex aquí solo para alinear icono y texto en la misma fila */
    align-items: center !important;
    padding: 14px 0 !important; /* Espacio vertical para que no se peguen */
    border: none !important;
    background: none !important;
    text-align: left !important;
  }

  /* Forzar visibilidad de iconos con tu color #313c46 */
  .lte-nav-minimal ul li a::before {
    display: inline-block !important;
    width: 28px !important;
    margin-right: 12px !important;
    color: #313c46 !important;
    font-weight: 900 !important;
    font-size: 18px !important;
    font-family: "Font Awesome 7 Free" !important;
    text-align: center !important;
  }

  /* Subrayado sutil */
  .lte-nav-minimal ul li a::after {
    bottom: 8px !important;
    left: 40px !important;
    height: 1px !important;
  }
}

/* --- Vista de Pedidos: Full Width, Slim y Estados en Color --- */

/* 1. Eliminamos la cabecera de raíz en cualquier resolución */
.woocommerce-account .woocommerce-orders-table thead {
  display: none !important;
}

/* 2. Forzamos Ancho Completo */
.woocommerce-account .woocommerce-orders-table {
  display: block !important;
  width: 100% !important;
  border: none !important;
}

.woocommerce-account .woocommerce-orders-table tbody {
  display: block !important;
  width: 100% !important;
}

/* 3. Tarjeta Slim Full Width */
.woocommerce-account .woocommerce-orders-table__row {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  margin-bottom: 12px !important;
  padding: 12px 20px !important;
  border: 1px solid #f0f0f0 !important;
  border-radius: 8px;
  background: #ffffff;
}

/* 4. Filas de datos internas */
.woocommerce-account .woocommerce-orders-table__cell {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100% !important;
  padding: 5px 0 !important;
  border: none !important;
  font-size: 14px;
}

.woocommerce-account .woocommerce-orders-table__cell::before {
  content: attr(data-title) ": ";
  color: #aaa;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
}

/* 5. Estilo de los Estados (Badges de color) */
.woocommerce-account .woocommerce-orders-table__cell-order-status mark {
  display: inline-block;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  text-transform: uppercase;
}

/* --- Estilo de los nuevos Badges de Estado --- */
.lte-status-badge {
  display: inline-block;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  text-transform: uppercase;
}

/* Completado - Verde */
.status-completed {
  background-color: #e6fffa !important;
  color: #285e61 !important;
}

/* Procesando - Azul */
.status-processing {
  background-color: #eef2ff !important;
  color: #3730a3 !important;
}

/* Cancelado - Rojo */
.status-cancelled,
.status-failed {
  border: 1px solid #feb2b2 !important;
  background-color: #fff5f5 !important;
  color: #c53030 !important;
}

/* En espera - Naranja */
.status-on-hold {
  background-color: #fffaf0 !important;
  color: #9c4221 !important;
}

/* 6. Botón Ver y Total */
.woocommerce-account .woocommerce-orders-table__cell-order-total {
  color: #313c46;
  font-weight: 700;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions {
  margin-top: 8px !important;
  padding-top: 10px !important;
  border-top: 1px solid #f9f9f9 !important;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions .button {
  padding: 6px 18px !important;
  border-radius: 4px !important;
  background-color: #313c46 !important;
  color: #fff !important;
  font-size: 11px !important;
  text-transform: uppercase;
}

/* ==========================================================================
   DISEÑO SLIM: DETALLES DE CUENTA Y DIRECCIONES
   ========================================================================== */

/* 1. Contenedores Principales (Tarjetas) */
.woocommerce-edit-address form,
.woocommerce-edit-account form,
.woocommerce-Address {
  max-width: 800px;
  padding: 30px !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

/* 2. Títulos de Sección */
.woocommerce-Address-title h3,
.woocommerce-edit-account legend {
  width: 100%;
  margin-bottom: 20px !important;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
  color: var(--title-color) !important;
  font-weight: 600 !important;
  font-size: 1.2rem !important;
}

/* 3. Estilo de los Campos (Inputs) */
.woocommerce-form-row input.input-text,
.woocommerce-form-row textarea,
.woocommerce-form-row select {
  padding: 12px 15px !important;
  border: 1px solid #e2e2e2 !important;
  border-radius: 6px !important;
  background-color: #f9f9f9 !important;
  font-size: 0.95rem !important;
  transition: all 0.3s ease;
}

.woocommerce-form-row input.input-text:focus {
  border-color: var(--menu-color) !important;
  outline: none;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(0, 103, 122, 0.1);
}

/* 4. Etiquetas (Labels) */
.woocommerce-form-row label {
  display: block;
  margin-bottom: 8px !important;
  color: #777 !important;
  font-weight: 500 !important;
  font-size: 0.85rem !important;
}

/* 5. Botón de Guardar (Alineado a tu marca) */
.woocommerce-edit-address .button,
.woocommerce-edit-account .button {
  margin-top: 10px;
  padding: 12px 30px !important;
  border-radius: 6px !important;
  background-color: var(
    --title-color
  ) !important; /* El azul oscuro de tu marca */
  color: #ffffff !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
}

/* 5. Separación de grupos (Cambiar contraseña) */
fieldset {
  margin-top: 30px !important;
  padding-top: 20px !important;
  border-top: 2px dashed #f0f0f0 !important;
}

/* ==========================================================================
   UNIFICACIÓN DE BOTONES MI CUENTA: CAMBIO DE COLOR ESTÁTICO
   ========================================================================== */

/* 1. Estado Base: Sin movimientos ni sombras */
.woocommerce-account .woocommerce-orders-table__cell-order-actions .button,
.woocommerce-Address-title .edit,
.woocommerce-edit-address .button,
.woocommerce-edit-account .button,
.fc-address-book-item__actions a.button,
.woocommerce-Button.button {
  padding: 10px 20px !important;
  transform: none !important; /* Bloquea cualquier movimiento */
  border: none !important;
  border-radius: 6px !important;
  background-color: var(--title-color) !important;
  box-shadow: none !important; /* Elimina sombras */
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  letter-spacing: 0.5px;
  text-transform: uppercase !important;
  transition: background-color 0.2s ease !important; /* Solo transiciona el color */
}

/* 2. Estado Hover: Cambio al Verde (--menu-color) más un tono oscuro */
.woocommerce-account
  .woocommerce-orders-table__cell-order-actions
  .button:hover,
.woocommerce-Address-title .edit:hover,
.woocommerce-edit-address .button:hover,
.woocommerce-edit-account .button:hover,
.fc-address-book-item__actions a.button:hover,
.woocommerce-Button.button:hover {
  transform: none !important;
  background-image: linear-gradient(
    rgba(0, 0, 0, 0.1),
    rgba(0, 0, 0, 0.1)
  ) !important; /* Esto oscurece el verde sutilmente */
  background-color: var(--menu-color) !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

/* ==========================================================================
   DIREÑO SLIM: FORMULARIO LOGIN Y REGISTRO
   ========================================================================== */

/* 1. Contenedor principal: Separación y centrado */
#customer_login {
  margin-top: 40px !important;
  margin-bottom: 40px !important;
  gap: 40px; /* Espacio entre columnas */
}

/* 2. Estilo de cada columna (Login y Registro) como Tarjetas */
.u-column1.login,
.u-column2.register,
#customer_login .u-column {
  padding: 40px !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

/* 3. Títulos (Login / Register) */
#customer_login h1,
#customer_login h2 {
  margin-bottom: 20px !important;
  color: var(--title-color) !important;
  font-weight: 700 !important;
  font-size: 1.5rem !important;
  text-align: center;
  text-transform: none !important;
}

/* Selector ultra-específico para la columna de registro */
#customer_login .u-column2,
#customer_login .u-column2.register,
div.u-column2.col-lg-6 {
  display: block !important;
  border-top: 4px solid var(--menu-color) !important;
  background-color: #fafafa !important;
}

/* Ajuste de espaciado para los nuevos subtítulos del PHP */
.login-subtitle,
.register-subtitle {
  display: block;
  margin-bottom: 20px;
  color: #666;
  font-style: italic;
  font-size: 0.9rem;
  text-align: center;
}

/* Opcional: un borde muy sutil a los lados para la caja de registro
   para que no parezca que "flota" demasiado respecto a la otra */
#customer_login .u-column2 {
  border-right: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-left: 1px solid rgba(0, 0, 0, 0.05) !important;
}
/* 4. Inputs y Labels */
#customer_login .form-row label {
  margin-bottom: 8px !important;
  color: #555 !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}

#customer_login .input-text {
  padding: 12px 15px !important;
  border: 1px solid #e2e2e2 !important;
  border-radius: 8px !important;
  background-color: #fcfcfc !important;
}

#customer_login .input-text:focus {
  border-color: var(--menu-color) !important;
  background-color: #fff !important;
}

/* 5. Fila de "Recuérdame" y Botón de Login */
.form-checkbox {
  display: flex !important;
  flex-direction: column;
  margin-top: 15px;
  gap: 15px;
}

.woocommerce-form-login__rememberme {
  align-items: center;
  font-weight: 400 !important;
}

/* 6. Botones (Heredan el estilo consistente que hicimos antes) */
#customer_login .button {
  justify-content: center;
  width: 100% !important; /* Botón a ancho completo para que se vea moderno */
  padding: 14px !important;
  font-size: 14px !important;
}

/* 7. Texto de "¿Perdiste tu contraseña?" */
.lost_password {
  margin-top: 20px !important;
  text-align: center;
}

.lost_password a {
  color: #888 !important;
  font-size: 0.85rem !important;
  text-decoration: none !important;
}

.lost_password a:hover {
  color: var(--menu-color) !important;
}

/* 8. Responsive: En móvil quitamos el gap excesivo */
@media (max-width: 991px) {
  #customer_login {
    display: block !important;
  }
  .u-column {
    margin-bottom: 30px !important;
  }
}

/* ==========================================================================
   FORZAR MAYÚSCULAS Y CONSISTENCIA EN LOGIN/REGISTRO
   ========================================================================== */

/* 1. Unificamos texto en mayúsculas y quitamos estilos de Bootstrap (btn-secondary/primary) */
#customer_login .button,
#customer_login .woocommerce-form-login__submit,
#customer_login .woocommerce-form-register__submit {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 15px !important;
  border: none !important;
  /* Forzamos que no hereden colores distintos del tema */
  background-color: var(--title-color) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
}

/* Espaciado natural de un espacio en blanco para el checkbox */
.woocommerce-form__label-for-checkbox input[type="checkbox"] {
  position: relative;
  top: -1px; /* Ajuste fino para que quede perfectamente alineado al centro del texto */
  margin-top: 0 !important;
  margin-right: 6px !important; /* El ancho exacto de un espacio tipográfico */
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  vertical-align: middle !important;
}

.woocommerce-form-login__rememberme {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important; /* Evitamos que el contenedor añada espacio extra */
}
