/* ÓPTICA FIJA — Mi cuenta (WooCommerce My Account) restyle a nuestro diseño.
   Cubre: login/registro (deslogueado) + escritorio/pedidos/direcciones/detalles (logueado). */
/* barra de scroll siempre visible (como en el resto de páginas) */
html{ overflow-y:scroll !important; scrollbar-width:auto !important; }
body.woocommerce-account{
  --of-red:#E02B20; --of-red-dark:#B81F17; --of-ink:#1A1A1A; --of-muted:#6B6B6B;
  --of-surface:#F7F6F5; --of-border:#E6E4E1; --of-dark:#16181D; --ok:#1F9D57;
  font-family:'Albert Sans',-apple-system,BlinkMacSystemFont,'Inter','Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  color:var(--of-ink);
}
/* margen arriba/abajo igual (misma separación con la navbar y con el footer) */
body.woocommerce-account .woocommerce{ max-width:1160px; margin:0 auto; padding:clamp(48px,6vh,78px) clamp(16px,4vw,40px); }
body.woocommerce-account .woocommerce-breadcrumb{ display:none !important; }
/* título "Mi cuenta" oculto (como en carrito/checkout) */
body.woocommerce-account .entry-title,
body.woocommerce-account .page-title{ display:none !important; }
body.woocommerce-account a{ color:var(--of-red); text-decoration:none; }
body.woocommerce-account a:hover{ color:var(--of-red-dark); }

/* ---------- avisos ---------- */
body.woocommerce-account .woocommerce-message,
body.woocommerce-account .woocommerce-info,
body.woocommerce-account .woocommerce-error{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap; list-style:none;
  border:1px solid var(--of-border); border-top:1px solid var(--of-border) !important; border-left-width:1px !important;
  background:var(--of-surface); border-radius:12px; padding:14px 18px; box-shadow:none; color:var(--of-ink); margin:0 0 22px;
}
body.woocommerce-account .woocommerce-message::before,
body.woocommerce-account .woocommerce-info::before,
body.woocommerce-account .woocommerce-error::before{ color:var(--of-red); position:static; margin:0; line-height:1; flex:0 0 auto; }
body.woocommerce-account .woocommerce-error{ background:#fdeceb; }

/* ---------- inputs + botones (común) ---------- */
body.woocommerce-account .woocommerce form .form-row label{ font-weight:600; font-size:.92rem; margin:0 0 6px; display:block; color:var(--of-ink); }
body.woocommerce-account .woocommerce-form-row .required{ color:var(--of-red); border:0; }
body.woocommerce-account input.input-text,
body.woocommerce-account input[type=text],
body.woocommerce-account input[type=email],
body.woocommerce-account input[type=password],
body.woocommerce-account input[type=tel],
body.woocommerce-account select{
  width:100%; border:1px solid var(--of-border); border-radius:11px; padding:13px 14px; font:inherit; font-size:.97rem;
  background:#fff; color:var(--of-ink); box-sizing:border-box; transition:border-color .18s ease,box-shadow .18s ease;
}
body.woocommerce-account input.input-text:focus,
body.woocommerce-account select:focus{ border-color:var(--of-red); outline:none; box-shadow:0 0 0 3px rgba(224,43,32,.12); }
body.woocommerce-account .woocommerce-form__label-for-checkbox{ display:flex; align-items:center; gap:9px; font-weight:500; }
body.woocommerce-account .woocommerce-form-login__rememberme{ color:var(--of-muted); }
body.woocommerce-account .password-input{ display:block; position:relative; }
body.woocommerce-account .show-password-input{ top:14px; }

body.woocommerce-account .button,
body.woocommerce-account button[type=submit],
body.woocommerce-account .woocommerce-Button{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  background:var(--of-red) !important; color:#fff !important; border:0 !important; border-radius:999px;
  padding:13px 26px; font-weight:700; font-size:.95rem; letter-spacing:.01em; cursor:pointer; text-transform:none;
  transition:background .2s ease,transform .05s ease; box-shadow:0 6px 18px rgba(224,43,32,.18);
}
body.woocommerce-account .button:hover,
body.woocommerce-account button[type=submit]:hover,
body.woocommerce-account .woocommerce-Button:hover{ background:var(--of-red-dark) !important; }
body.woocommerce-account .button:active,
body.woocommerce-account button[type=submit]:active{ transform:translateY(1px); }
/* botón secundario (p.ej. "Ver" pedido) en tono oscuro */
body.woocommerce-account .woocommerce-orders-table .button,
body.woocommerce-account .woocommerce-MyAccount-content .addresses .button{
  background:var(--of-dark) !important; box-shadow:none;
}
body.woocommerce-account .woocommerce-orders-table .button:hover{ background:var(--of-red) !important; }

/* ---------- LOGIN + REGISTRO (deslogueado) ---------- */
body.woocommerce-account:not(.logged-in) #customer_login{
  display:flex !important; flex-wrap:wrap; gap:26px; align-items:stretch; justify-content:center;
  width:100%; max-width:none; margin:0 !important;
}
body.woocommerce-account:not(.logged-in) #customer_login::before,
body.woocommerce-account:not(.logged-in) #customer_login::after{ content:none !important; display:none !important; }
body.woocommerce-account:not(.logged-in) #customer_login > .u-column1,
body.woocommerce-account:not(.logged-in) #customer_login > .u-column2{
  flex:1 1 360px !important; max-width:530px; width:auto !important; float:none !important; margin:0 !important; box-sizing:border-box;
  background:#fff; border:1px solid var(--of-border); border-radius:18px; padding:30px clamp(20px,3vw,34px);
  box-shadow:0 10px 30px rgba(20,22,28,.05);
}
body.woocommerce-account #customer_login h2{
  font-weight:800; font-size:1.45rem; margin:0 0 20px; padding:0 0 16px; border-bottom:1px solid var(--of-border); letter-spacing:-.01em;
}
body.woocommerce-account .woocommerce-form-login__submit,
body.woocommerce-account .woocommerce-form-register__submit{ width:100%; margin-top:6px; }
body.woocommerce-account .woocommerce-privacy-policy-text{ font-size:.86rem; color:var(--of-muted); margin-top:14px; }
body.woocommerce-account .woocommerce-privacy-policy-text p{ margin:0; }
body.woocommerce-account .lost_password{ margin-top:14px; font-size:.9rem; }

/* ---------- LOGUEADO: layout 2 columnas ---------- */
body.woocommerce-account.logged-in .woocommerce{ display:flex; flex-wrap:wrap; gap:30px; align-items:flex-start; }
.woocommerce-MyAccount-navigation{ flex:0 0 264px; max-width:264px; width:auto !important; float:none !important; }
.woocommerce-MyAccount-navigation ul{
  list-style:none; margin:0; padding:8px; background:#fff; border:1px solid var(--of-border); border-radius:18px;
  box-shadow:0 10px 30px rgba(20,22,28,.05); position:sticky; top:182px;
}
.woocommerce-MyAccount-navigation li{ margin:0; }
.woocommerce-MyAccount-navigation li a{
  display:flex; align-items:center; gap:11px; padding:13px 15px; border-radius:12px;
  color:var(--of-ink); font-weight:600; font-size:.96rem; transition:background .16s ease,color .16s ease;
}
.woocommerce-MyAccount-navigation li a::before{
  content:""; width:8px; height:8px; border-radius:50%; background:var(--of-border); flex:0 0 auto; transition:background .16s ease;
}
.woocommerce-MyAccount-navigation li a:hover{ background:var(--of-surface); color:var(--of-ink); }
.woocommerce-MyAccount-navigation li.is-active a{ background:var(--of-red); color:#fff; }
.woocommerce-MyAccount-navigation li.is-active a::before{ background:#fff; }
.woocommerce-MyAccount-navigation li--woocommerce-MyAccount-navigation-link--customer-logout a::before{ background:var(--of-red); }

.woocommerce-MyAccount-content{
  flex:1 1 0; min-width:0; width:auto !important; float:none !important;
  background:#fff; border:1px solid var(--of-border); border-radius:18px; padding:30px clamp(20px,3vw,36px);
  box-shadow:0 10px 30px rgba(20,22,28,.05); line-height:1.6;
}
.woocommerce-MyAccount-content > p:first-child{ margin-top:0; }
.woocommerce-MyAccount-content strong{ font-weight:700; }
/* encabezados de la zona de cuenta a la escala de la web (el tema los hacía gigantes) */
.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content .woocommerce-order-details__title,
.woocommerce-MyAccount-content .woocommerce-customer-details > h2{
  font-weight:800 !important; letter-spacing:-.015em; font-size:1.45rem !important; line-height:1.25; margin:30px 0 16px !important;
}
.woocommerce-MyAccount-content h3,
.woocommerce-MyAccount-content .woocommerce-column__title{
  font-weight:800 !important; letter-spacing:-.01em; font-size:1.15rem !important; line-height:1.3; margin:0 0 12px !important;
}
.woocommerce-MyAccount-content > :first-child{ margin-top:0 !important; }
.woocommerce-MyAccount-content .woocommerce-order-details__title:first-child{ margin-top:4px !important; }
/* intro del pedido ("El pedido #… se realizó…") */
.woocommerce-MyAccount-content > p{ color:var(--of-ink); }
.woocommerce-MyAccount-content mark.order-number,
.woocommerce-MyAccount-content mark.order-date,
.woocommerce-MyAccount-content mark.order-status{ background:transparent; color:var(--of-ink); font-weight:700; }

/* ---------- formularios de cuenta (detalles / contraseña) ---------- */
.woocommerce-MyAccount-content form fieldset{
  border:1px solid var(--of-border) !important; border-radius:14px; padding:6px 22px 18px; margin:22px 0 0; min-width:0; background:var(--of-surface);
}
.woocommerce-MyAccount-content form fieldset legend{
  font-weight:700; font-size:1rem; color:var(--of-ink); padding:0 9px; width:auto; max-width:none; border:0; margin:0; letter-spacing:-.01em;
}
.woocommerce-MyAccount-content form fieldset .form-row input.input-text{ background:#fff; }
/* espacio sobre el botón "Guardar cambios" (va justo tras el fieldset) */
.woocommerce-MyAccount-content form fieldset ~ p,
.woocommerce-MyAccount-content form fieldset + p{ margin-top:26px; }
.woocommerce-MyAccount-content .woocommerce-EditAccountForm > p,
.woocommerce-MyAccount-content form.edit-account > p{ margin-bottom:16px; }

/* tarjeta de pedidos / tablas */
.woocommerce-MyAccount-content table.shop_table,
.woocommerce-MyAccount-content table.woocommerce-orders-table,
.woocommerce-MyAccount-content table.woocommerce-table--order-details{
  border:1px solid var(--of-border); border-radius:14px; border-collapse:separate; border-spacing:0; overflow:hidden; width:100%;
}
.woocommerce-MyAccount-content table.shop_table thead th{ background:var(--of-surface); border:0; font-weight:700; padding:14px 16px; text-transform:none; }
.woocommerce-MyAccount-content table.shop_table td{ border:0; border-top:1px solid var(--of-border); padding:15px 16px; vertical-align:middle; }
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-status{ font-weight:700; }
.woocommerce-MyAccount-content mark{ background:transparent; color:var(--of-red); font-weight:700; }

/* direcciones: 2 columnas (flex, para ganar al float por defecto de WooCommerce) */
.woocommerce-MyAccount-content .woocommerce-Addresses{
  display:flex !important; flex-wrap:wrap; gap:24px; margin-top:14px; align-items:flex-start;
}
.woocommerce-MyAccount-content .woocommerce-Addresses > .u-column1,
.woocommerce-MyAccount-content .woocommerce-Addresses > .u-column2{
  flex:1 1 0 !important; width:auto !important; float:none !important; margin:0 !important; min-width:0;
}
.woocommerce-MyAccount-content .woocommerce-Address-title{
  display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:0 0 4px;
}
.woocommerce-MyAccount-content .woocommerce-Address-title h3{ font-weight:800; font-size:1.15rem !important; margin:0; line-height:1.25; letter-spacing:-.01em; }
.woocommerce-MyAccount-content .woocommerce-Address-title a{ font-size:.9rem; font-weight:600; flex:0 0 auto; }
.woocommerce-MyAccount-content address{
  font-style:normal; background:var(--of-surface); border:1px solid var(--of-border); border-radius:12px; padding:16px 18px; margin-top:12px; line-height:1.7;
}

/* ---------- detalle de pedido (view-order): direcciones de cliente en 2 columnas ---------- */
.woocommerce-MyAccount-content .woocommerce-customer-details{ margin-top:30px; }
.woocommerce-MyAccount-content .woocommerce-columns--addresses{
  display:flex !important; flex-wrap:wrap; gap:24px; margin:0;
}
.woocommerce-MyAccount-content .woocommerce-columns--addresses > .woocommerce-column{
  flex:1 1 0 !important; width:auto !important; float:none !important; margin:0 !important; min-width:0;
}
.woocommerce-MyAccount-content .woocommerce-customer-details address{ width:100%; box-sizing:border-box; }
.woocommerce-MyAccount-content .woocommerce-customer-details--phone,
.woocommerce-MyAccount-content .woocommerce-customer-details--email{ margin:0; padding-top:6px; }

/* ---------- cualquier otra tabla del contenido (p.ej. "Pedido extra"/campos) ---------- */
.woocommerce-MyAccount-content table:not(.shop_table):not(.woocommerce-orders-table):not(.woocommerce-table--order-details){
  border:1px solid var(--of-border); border-radius:14px; border-collapse:separate; border-spacing:0; overflow:hidden; width:100%; margin:10px 0 0;
}
.woocommerce-MyAccount-content table:not(.shop_table) th,
.woocommerce-MyAccount-content table:not(.shop_table) td{ border:0; border-top:1px solid var(--of-border); padding:14px 16px; text-align:left; }
.woocommerce-MyAccount-content table:not(.shop_table) tr:first-child th,
.woocommerce-MyAccount-content table:not(.shop_table) tr:first-child td{ border-top:0; }
.woocommerce-MyAccount-content table:not(.shop_table) th{ background:var(--of-surface); font-weight:700; }

/* ---------- responsive ---------- */
@media(max-width:900px){
  body.woocommerce-account:not(.logged-in) #customer_login{ flex-direction:column; align-items:stretch; }
  body.woocommerce-account:not(.logged-in) #customer_login > .u-column1,
  body.woocommerce-account:not(.logged-in) #customer_login > .u-column2{ max-width:none; }
  body.woocommerce-account.logged-in .woocommerce{ flex-direction:column; }
  .woocommerce-MyAccount-navigation{ flex:1 1 100%; max-width:none; }
  .woocommerce-MyAccount-navigation ul{ position:static; display:flex; flex-wrap:wrap; gap:4px; }
  .woocommerce-MyAccount-navigation li a{ padding:10px 13px; }
  .woocommerce-MyAccount-content{ width:100%; }
  .woocommerce-MyAccount-content .woocommerce-Addresses{ flex-direction:column; }
}
