/* =========================================================
   JR WOO STORE DESIGN SYSTEM — MI CUENTA 1.5.2
   ========================================================= */

body.jr-woo-account-page {
  --jr-account-blue: #1664d6;
  --jr-account-blue-dark: #0e55bc;
  --jr-account-ink: #07090c;
  --jr-account-muted: #6f7278;
  --jr-account-line: rgba(7, 9, 12, .10);
  --jr-account-paper: #fff;
  --jr-account-canvas: #f7f5f1;
  background: var(--jr-account-canvas);
  color: var(--jr-account-ink);
  font-family: 'Raleway', sans-serif;
}

body.jr-woo-account-page #main-content {
  min-height: 100vh;
  background: var(--jr-account-canvas) !important;
}

body.jr-woo-account-page #main-content .container {
  width: min(calc(100% - 64px), 1200px) !important;
  max-width: none !important;
  padding-top: clamp(118px, 10vw, 148px) !important;
}

body.jr-woo-account-page #main-content .container::before,
body.jr-woo-account-page #main-content .container:before {
  display: none !important;
  content: none !important;
}

body.jr-woo-account-page #content-area {
  display: block !important;
}

body.jr-woo-account-page #left-area {
  float: none !important;
  width: 100% !important;
  padding: 0 0 110px !important;
}

body.jr-woo-account-page #sidebar {
  display: none !important;
}

body.jr-woo-account-page article.page,
body.jr-woo-account-page .entry-content {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.jr-woo-account-page .entry-title,
body.jr-woo-account-page h1.entry-title {
  position: relative;
  margin: 0 0 42px !important;
  padding: 0 0 22px !important;
  color: var(--jr-account-ink) !important;
  font-family: 'Raleway', sans-serif !important;
  font-size: clamp(44px, 5vw, 66px) !important;
  font-weight: 900 !important;
  line-height: .98 !important;
  letter-spacing: -.045em !important;
}

body.jr-woo-account-page .entry-title::after,
body.jr-woo-account-page h1.entry-title::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 64px;
  height: 5px;
  border-radius: 999px;
  background: var(--jr-account-blue);
  content: '';
}

/* Panel para usuarios con sesión iniciada. */
body.jr-woo-account-page.logged-in #main-content .entry-content .woocommerce {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 32px !important;
}

body.jr-woo-account-page .woocommerce-MyAccount-navigation {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 16px !important;
  border: 1px solid var(--jr-account-line) !important;
  border-radius: 22px !important;
  background: var(--jr-account-paper) !important;
  box-shadow: 0 16px 44px rgba(7, 9, 12, .06) !important;
}

body.jr-woo-account-page.logged-in .woocommerce-MyAccount-navigation {
  grid-column: 1 !important;
  grid-row: 1 !important;
  position: sticky !important;
  top: 108px !important;
}

body.jr-woo-account-page .woocommerce-MyAccount-navigation ul {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.jr-woo-account-page .woocommerce-MyAccount-navigation li {
  margin: 0 0 5px !important;
  padding: 0 !important;
  list-style: none !important;
}

body.jr-woo-account-page .woocommerce-MyAccount-navigation li::before,
body.jr-woo-account-page .woocommerce-MyAccount-navigation li::after {
  display: none !important;
  content: none !important;
}

body.jr-woo-account-page .woocommerce-MyAccount-navigation a {
  display: flex !important;
  align-items: center !important;
  min-height: 48px;
  padding: 0 16px !important;
  border-radius: 12px !important;
  color: #34383e !important;
  font-family: 'Raleway', sans-serif !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  text-decoration: none !important;
  transition: background .2s ease, color .2s ease, transform .2s ease !important;
}

body.jr-woo-account-page .woocommerce-MyAccount-navigation a:hover,
body.jr-woo-account-page .woocommerce-MyAccount-navigation a:focus-visible {
  background: rgba(22, 100, 214, .08) !important;
  color: var(--jr-account-blue) !important;
  transform: translateX(2px);
}

body.jr-woo-account-page .woocommerce-MyAccount-navigation li.is-active a {
  background: var(--jr-account-blue) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(22, 100, 214, .22) !important;
}

body.jr-woo-account-page .woocommerce-MyAccount-navigation-link--customer-logout {
  margin-top: 12px !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--jr-account-line) !important;
}

body.jr-woo-account-page .woocommerce-MyAccount-navigation-link--customer-logout a {
  color: #b43333 !important;
}

body.jr-woo-account-page .woocommerce-MyAccount-navigation-link--customer-logout a:hover,
body.jr-woo-account-page .woocommerce-MyAccount-navigation-link--customer-logout a:focus-visible {
  background: rgba(180, 51, 51, .08) !important;
  color: #9c2828 !important;
}

body.jr-woo-account-page .woocommerce-MyAccount-content {
  grid-column: 2 !important;
  grid-row: 1 !important;
  float: none !important;
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 390px;
  margin: 0 !important;
  padding: clamp(28px, 4vw, 46px) !important;
  border: 1px solid var(--jr-account-line) !important;
  border-radius: 24px !important;
  background: var(--jr-account-paper) !important;
  box-shadow: 0 20px 54px rgba(7, 9, 12, .065) !important;
}

body.jr-woo-account-page .woocommerce-MyAccount-content > :first-child {
  margin-top: 0 !important;
}

body.jr-woo-account-page .woocommerce-MyAccount-content h2,
body.jr-woo-account-page .woocommerce-MyAccount-content h3,
body.jr-woo-account-page .woocommerce-MyAccount-content legend {
  color: var(--jr-account-ink) !important;
  font-family: 'Raleway', sans-serif !important;
  font-weight: 850 !important;
  letter-spacing: -.025em !important;
}

body.jr-woo-account-page .woocommerce-MyAccount-content h2 {
  margin: 0 0 24px !important;
  font-size: clamp(24px, 3vw, 34px) !important;
}

body.jr-woo-account-page .woocommerce-MyAccount-content p {
  color: var(--jr-account-muted) !important;
  font-family: 'Raleway', sans-serif !important;
  font-size: 14px !important;
  line-height: 1.75 !important;
}

body.jr-woo-account-page .woocommerce-MyAccount-content a:not(.button) {
  color: var(--jr-account-blue) !important;
  font-weight: 700 !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px;
}

/* Formularios de cuenta, direcciones y acceso. */
body.jr-woo-account-page .woocommerce form .form-row {
  margin: 0 0 16px !important;
}

body.jr-woo-account-page .woocommerce form .form-row label {
  display: block !important;
  margin: 0 0 7px !important;
  color: var(--jr-account-ink) !important;
  font-family: 'Raleway', sans-serif !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

body.jr-woo-account-page .woocommerce form .input-text,
body.jr-woo-account-page .woocommerce form input[type='text'],
body.jr-woo-account-page .woocommerce form input[type='email'],
body.jr-woo-account-page .woocommerce form input[type='password'],
body.jr-woo-account-page .woocommerce form input[type='tel'],
body.jr-woo-account-page .woocommerce form select,
body.jr-woo-account-page .woocommerce form textarea,
body.jr-woo-account-page .select2-container .select2-selection--single {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 54px !important;
  padding: 0 15px !important;
  border: 1px solid rgba(7, 9, 12, .18) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--jr-account-ink) !important;
  box-shadow: none !important;
  font-family: 'Raleway', sans-serif !important;
  font-size: 14px !important;
}

body.jr-woo-account-page .woocommerce form textarea {
  min-height: 120px !important;
  padding-top: 14px !important;
}

body.jr-woo-account-page .woocommerce form .input-text:focus,
body.jr-woo-account-page .woocommerce form input:focus,
body.jr-woo-account-page .woocommerce form select:focus,
body.jr-woo-account-page .woocommerce form textarea:focus {
  border-color: var(--jr-account-blue) !important;
  box-shadow: 0 0 0 3px rgba(22, 100, 214, .12) !important;
  outline: none !important;
}

body.jr-woo-account-page .select2-container .select2-selection--single .select2-selection__rendered {
  padding: 0 !important;
  line-height: 52px !important;
}

body.jr-woo-account-page .select2-container .select2-selection--single .select2-selection__arrow {
  height: 52px !important;
  right: 10px !important;
}

body.jr-woo-account-page .woocommerce fieldset {
  margin: 28px 0 0 !important;
  padding: 24px !important;
  border: 1px solid var(--jr-account-line) !important;
  border-radius: 16px !important;
}

body.jr-woo-account-page .woocommerce fieldset legend {
  padding: 0 8px !important;
  font-size: 16px !important;
}

body.jr-woo-account-page .woocommerce button.button,
body.jr-woo-account-page .woocommerce a.button,
body.jr-woo-account-page .woocommerce input.button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-height: 48px !important;
  padding: 0 20px !important;
  border: 1px solid var(--jr-account-blue) !important;
  border-radius: 12px !important;
  background: var(--jr-account-blue) !important;
  color: #fff !important;
  box-shadow: none !important;
  font-family: 'Raleway', sans-serif !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  white-space: normal !important;
  transition: background .2s ease, border-color .2s ease, transform .2s ease !important;
}

body.jr-woo-account-page .woocommerce button.button:hover,
body.jr-woo-account-page .woocommerce button.button:focus-visible,
body.jr-woo-account-page .woocommerce a.button:hover,
body.jr-woo-account-page .woocommerce a.button:focus-visible {
  border-color: var(--jr-account-blue-dark) !important;
  background: var(--jr-account-blue-dark) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

body.jr-woo-account-page .woocommerce button.button::before,
body.jr-woo-account-page .woocommerce button.button::after,
body.jr-woo-account-page .woocommerce a.button::before,
body.jr-woo-account-page .woocommerce a.button::after {
  display: none !important;
  content: none !important;
}

/* Pedidos y descargas. */
body.jr-woo-account-page .woocommerce table.shop_table {
  width: 100% !important;
  margin: 0 !important;
  overflow: hidden;
  border: 1px solid var(--jr-account-line) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 16px !important;
  background: #fff !important;
}

body.jr-woo-account-page .woocommerce table.shop_table th,
body.jr-woo-account-page .woocommerce table.shop_table td {
  padding: 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--jr-account-line) !important;
  color: #34383e !important;
  font-family: 'Raleway', sans-serif !important;
  font-size: 13px !important;
  text-align: left !important;
}

body.jr-woo-account-page .woocommerce table.shop_table th {
  background: #f3f5f8 !important;
  color: var(--jr-account-ink) !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}

body.jr-woo-account-page .woocommerce table.shop_table tr:last-child td {
  border-bottom: 0 !important;
}

/* Direcciones guardadas. */
body.jr-woo-account-page .woocommerce-Addresses {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 18px !important;
}

/* WooCommerce agrega pseudoelementos para limpiar floats. Dentro de grid se
   convierten en celdas fantasma y desplazan las tarjetas en diagonal. */
body.jr-woo-account-page .woocommerce-Addresses::before,
body.jr-woo-account-page .woocommerce-Addresses::after {
  display: none !important;
  content: none !important;
}

body.jr-woo-account-page .woocommerce-Address {
  float: none !important;
  box-sizing: border-box !important;
  width: auto !important;
  margin: 0 !important;
  padding: 24px !important;
  border: 1px solid var(--jr-account-line) !important;
  border-radius: 16px !important;
  background: #faf9f7 !important;
}

body.jr-woo-account-page .woocommerce-Address-title {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
}

body.jr-woo-account-page .woocommerce-Address-title h2,
body.jr-woo-account-page .woocommerce-Address-title h3 {
  float: none !important;
  flex: 1 1 auto !important;
  margin: 0 !important;
  font-size: clamp(20px, 2.2vw, 25px) !important;
  line-height: 1.08 !important;
}

body.jr-woo-account-page .woocommerce-Address-title a {
  float: none !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  border-radius: 10px !important;
  background: rgba(22, 100, 214, .09) !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  font-size: 12px !important;
}

body.jr-woo-account-page .woocommerce-Address-title a:hover,
body.jr-woo-account-page .woocommerce-Address-title a:focus-visible {
  background: var(--jr-account-blue) !important;
  color: #fff !important;
}

/* Conserva la etiqueta completa para lectores de pantalla sin mostrarla en
   varias líneas junto al texto visible “Agregar” o “Editar”. */
body.jr-woo-account-page .woocommerce-Address-title a .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.jr-woo-account-page .woocommerce-Address address {
  margin-top: 18px !important;
  color: var(--jr-account-muted) !important;
  font-family: 'Raleway', sans-serif !important;
  font-size: 13px !important;
  font-style: normal !important;
  line-height: 1.7 !important;
}

/* Avisos de WooCommerce. */
body.jr-woo-account-page .woocommerce-notices-wrapper {
  grid-column: 1 / -1;
}

body.jr-woo-account-page .woocommerce-notices-wrapper:empty {
  display: none !important;
}

body.jr-woo-account-page.logged-in #main-content .entry-content .woocommerce > .woocommerce-message,
body.jr-woo-account-page.logged-in #main-content .entry-content .woocommerce > .woocommerce-error,
body.jr-woo-account-page.logged-in #main-content .entry-content .woocommerce > .woocommerce-info {
  grid-column: 1 / -1;
}

body.jr-woo-account-page .woocommerce-message,
body.jr-woo-account-page .woocommerce-error,
body.jr-woo-account-page .woocommerce-info {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  box-sizing: border-box !important;
  margin: 0 0 20px !important;
  padding: 18px 20px !important;
  border: 1px solid rgba(22, 100, 214, .18) !important;
  border-radius: 14px !important;
  background: #f4f8ff !important;
  color: #2f3946 !important;
  font-family: 'Raleway', sans-serif !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

body.jr-woo-account-page .woocommerce-info .button {
  flex: 0 0 auto !important;
  order: 2 !important;
  margin: 0 0 0 auto !important;
}

body.jr-woo-account-page .woocommerce-error {
  border-color: rgba(180, 51, 51, .22) !important;
  background: #fff5f4 !important;
}

/* Acceso y registro cuando el cliente no ha iniciado sesión. */
body.jr-woo-account-page:not(.logged-in) .entry-content > .woocommerce {
  max-width: 980px;
  margin: 0 auto !important;
}

body.jr-woo-account-page #customer_login {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
  gap: 24px !important;
}

body.jr-woo-account-page #customer_login .u-column1,
body.jr-woo-account-page #customer_login .u-column2 {
  float: none !important;
  box-sizing: border-box !important;
  width: auto !important;
  margin: 0 !important;
  padding: clamp(28px, 4vw, 42px) !important;
  border: 1px solid var(--jr-account-line) !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 18px 48px rgba(7, 9, 12, .06) !important;
}

body.jr-woo-account-page #customer_login h2 {
  margin: 0 0 24px !important;
  color: var(--jr-account-ink) !important;
  font-family: 'Raleway', sans-serif !important;
  font-size: 28px !important;
  font-weight: 850 !important;
  letter-spacing: -.03em !important;
}

body.jr-woo-account-page .woocommerce-form-login,
body.jr-woo-account-page .woocommerce-form-register,
body.jr-woo-account-page .woocommerce-ResetPassword {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

body.jr-woo-account-page .woocommerce-form-login__rememberme {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 14px !important;
}

body.jr-woo-account-page .woocommerce-LostPassword {
  margin-top: 18px !important;
}

@media (max-width: 900px) {
  body.jr-woo-account-page #main-content .container {
    width: calc(100% - 40px) !important;
    padding-top: 108px !important;
  }

  body.jr-woo-account-page.logged-in #main-content .entry-content .woocommerce {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
  }

  body.jr-woo-account-page.logged-in .woocommerce-MyAccount-navigation {
    grid-column: 1 !important;
    grid-row: 1 !important;
    position: relative !important;
    top: auto !important;
    overflow-x: auto !important;
    padding: 10px !important;
  }

  body.jr-woo-account-page .woocommerce-MyAccount-navigation ul {
    display: flex !important;
    width: max-content;
    min-width: 100%;
    gap: 6px !important;
  }

  body.jr-woo-account-page .woocommerce-MyAccount-navigation li {
    flex: 0 0 auto;
    margin: 0 !important;
  }

  body.jr-woo-account-page .woocommerce-MyAccount-navigation a {
    white-space: nowrap;
  }

  body.jr-woo-account-page .woocommerce-MyAccount-navigation-link--customer-logout {
    margin: 0 0 0 6px !important;
    padding: 0 0 0 6px !important;
    border-top: 0 !important;
    border-left: 1px solid var(--jr-account-line) !important;
  }

  body.jr-woo-account-page .woocommerce-MyAccount-content {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
}

@media (max-width: 620px) {
  body.jr-woo-account-page #main-content .container {
    width: calc(100% - 30px) !important;
    padding-top: 94px !important;
  }

  body.jr-woo-account-page #left-area {
    padding-bottom: 72px !important;
  }

  body.jr-woo-account-page .entry-title,
  body.jr-woo-account-page h1.entry-title {
    margin-bottom: 28px !important;
    padding-bottom: 18px !important;
    font-size: clamp(38px, 13vw, 52px) !important;
  }

  body.jr-woo-account-page .woocommerce-MyAccount-content {
    min-height: 0;
    padding: 22px 18px !important;
    border-radius: 18px !important;
  }

  body.jr-woo-account-page .woocommerce-Addresses {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.jr-woo-account-page .woocommerce-Address-title h2,
  body.jr-woo-account-page .woocommerce-Address-title h3 {
    font-size: 22px !important;
  }

  body.jr-woo-account-page .woocommerce table.shop_table_responsive thead {
    display: none !important;
  }

  body.jr-woo-account-page .woocommerce table.shop_table_responsive tr,
  body.jr-woo-account-page .woocommerce table.shop_table_responsive td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  body.jr-woo-account-page .woocommerce table.shop_table_responsive tr {
    padding: 12px 0 !important;
    border-bottom: 1px solid var(--jr-account-line) !important;
  }

  body.jr-woo-account-page .woocommerce table.shop_table_responsive td {
    padding: 9px 14px !important;
    border-bottom: 0 !important;
    text-align: right !important;
  }

  body.jr-woo-account-page .woocommerce table.shop_table_responsive td::before {
    color: var(--jr-account-ink) !important;
    font-weight: 800 !important;
  }

  body.jr-woo-account-page #customer_login {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.jr-woo-account-page .woocommerce-info {
    display: block !important;
  }

  body.jr-woo-account-page .woocommerce-info .button {
    width: 100% !important;
    margin: 14px 0 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.jr-woo-account-page .woocommerce-MyAccount-navigation a,
  body.jr-woo-account-page .woocommerce button.button,
  body.jr-woo-account-page .woocommerce a.button {
    transition: none !important;
  }
}
