/* ============================================================
   Beshop Account — área de cliente con sidebar
   v1.0.0 — Teinor SA
   Cargar condicionalmente: php_self === 'my-account' y demás
   páginas de cliente
   ============================================================ */

/* ------------------------------------------------------------------
   Layout principal — sidebar + contenido
   ------------------------------------------------------------------ */
.beshop-account {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  border: 0.5px solid var(--beshop-line);
  border-radius: 12px;
  overflow: hidden;
  min-height: 520px;
}

/* Quitar padding/border de la card nativa PS */
.page-account-content,
.page-my-account {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* ------------------------------------------------------------------
   Sidebar
   ------------------------------------------------------------------ */
.beshop-account__sidebar {
  background: var(--beshop-bg-soft);
  border-right: 0.5px solid var(--beshop-line);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.beshop-account__sidebar-head {
  margin-bottom: 1.75rem;
}

.beshop-account__sidebar-hello {
  font-size: var(--fs-2xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--beshop-text);
  margin-bottom: .2rem;
}

.beshop-account__sidebar-name {
  font-size: var(--fs-md);
  font-weight: 400;
  color: var(--beshop-text);
  margin-bottom: .3rem;
  /* font-family: var(--beshop-font-primary), Georgia, serif; */
}

.beshop-account__sidebar-desc {
  font-size: var(--fs-xs);
  color: var(--beshop-text);
  line-height: 1.5;
}

/* Nav */
.beshop-account__nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.beshop-account__nav-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: var(--fs-base);
  color: var(--beshop-text-muted);
  text-decoration: none;
  transition: background .12s, color .12s;
  border: 0.5px solid transparent;
}

.beshop-account__nav-item a:hover {
  background: var(--beshop-bg-card);
  color: var(--beshop-text);
  border-color: var(--beshop-line);
}

.beshop-account__nav-item a svg {
  width: calc(16px * var(--beshop-icon-scale, 1));
  height: calc(16px * var(--beshop-icon-scale, 1));
  flex-shrink: 0;
  color: var(--beshop-text-subtle);
  transition: color .12s;
}

.beshop-account__nav-item a:hover svg {
  color: var(--beshop-text-subtle);
}

/* Estado activo */
.beshop-account__nav-item.active a {
  background: var(--beshop-bg-card);
  color: var(--beshop-text);
  font-weight: 500;
  border-color: var(--beshop-line);
}

.beshop-account__nav-item.active a svg {
  color: var(--beshop-text-subtle);
}

/* Separador */
.beshop-account__nav-sep {
  height: 0.5px;
  background: var(--beshop-line);
  margin: 8px 0;
}

/* Logout */
.beshop-account__nav-item--logout a {
  color: var(--beshop-text-subtle);
}

.beshop-account__nav-item--logout a:hover {
  background: color-mix(in srgb, var(--beshop-error) 6%, var(--beshop-bg-card));
  color: var(--beshop-error);
  border-color: color-mix(in srgb, var(--beshop-error) 25%, var(--beshop-bg-card));
}

.beshop-account__nav-item--logout a:hover svg {
  color: var(--beshop-error);
}

/* ------------------------------------------------------------------
   Área de contenido derecha
   ------------------------------------------------------------------ */
.beshop-account__content {
  padding: 2.5rem;
  background: var(--beshop-bg-card);
}

.beshop-account__eyebrow {
  font-size: var(--fs-2xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--beshop-text);
  margin-bottom: .4rem;
}

.beshop-account__title {
  font-size: var(--fs-md);
  font-weight: 400;
  color: var(--beshop-text);
  margin-bottom: 2rem;
  font-family: var(--beshop-font-secondary), sans-serif;
}

/* Welcome */
.beshop-account__welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1rem;
  text-align: center;
}

.beshop-account__welcome svg {
  width: calc(48px * var(--beshop-icon-scale, 1));
  height: calc(48px * var(--beshop-icon-scale, 1));
  color: var(--beshop-line);
}

.beshop-account__welcome p {
  font-size: var(--fs-base);
  color: var(--beshop-text);
  max-width: 280px;
  line-height: 1.7;
}

.beshop-account__welcome a {
  font-size: var(--fs-xs);
  color: var(--beshop-text-muted);
  text-decoration: none;
  border-bottom: 0.5px solid var(--beshop-line);
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}

.beshop-account__welcome a:hover {
  color: var(--beshop-text);
  border-bottom-color: var(--beshop-primary);
}

/* ------------------------------------------------------------------
   Hooks de módulos externos (wishlist, gdpr, alertas)
   Los módulos inyectan <a> dentro de displayCustomerAccount
   los envolvemos para que tengan el mismo estilo
   ------------------------------------------------------------------ */
.beshop-account__nav #wishlist-link,
.beshop-account__nav #psgdpr-link,
.beshop-account__nav #emailsalerts,
.beshop-account__nav .account-link {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  font-size: var(--fs-base) !important;
  color: var(--beshop-text-muted) !important;
  text-decoration: none !important;
  transition: background .12s, color .12s !important;
  border: 0.5px solid transparent !important;
  margin: 1px 0 !important;
}

.beshop-account__nav #wishlist-link:hover,
.beshop-account__nav #psgdpr-link:hover,
.beshop-account__nav #emailsalerts:hover {
  background: var(--beshop-bg-card) !important;
  color: var(--beshop-text) !important;
  border-color: var(--beshop-line) !important;
}

/* Ocultar iconos material-icons de módulos externos */
.beshop-account__nav .material-icons {
  display: none !important;
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 991px) {
  .beshop-account {
    grid-template-columns: 1fr;
  }

  .beshop-account__sidebar {
    border-right: none;
    border-bottom: 0.5px solid var(--beshop-line);
    padding: 1.5rem;
  }

  .beshop-account__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .beshop-account__nav-item a {
    padding: 6px 10px;
    font-size: var(--fs-xs);
  }

  .beshop-account__nav-sep {
    width: 100%;
    height: 0.5px;
    margin: 4px 0;
  }

  .beshop-account__content {
    padding: 1.75rem;
  }
}


/* ============================================================
   Login (dos columnas)
   Movido desde el custom.sass de la web (v1.4.0)
   ============================================================ */
#authentication #content {
  max-width: 1200px;
}
#authentication .beshop-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 4rem;
  max-width: 1100px;
  margin: 2rem auto 4rem;
}
#authentication .beshop-login__divider {
  background: var(--beshop-line);
}
#authentication .beshop-login__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
#authentication .beshop-login__text {
  font-size: 0.9rem;
  color: var(--beshop-text-muted);
  margin-bottom: 1rem;
}
#authentication .beshop-login__block + .beshop-login__block {
  margin-top: 2.5rem;
}
#authentication .beshop-login__btn,
#authentication .beshop-login #submit-login {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.8rem;
}
#authentication .beshop-login__btn--outline {
  background: transparent;
  border: 1px solid var(--beshop-primary);
  color: var(--beshop-text);
}
#authentication .beshop-login__btn--outline:hover {
  background: var(--beshop-primary);
  color: var(--beshop-primary-contrast);
}
#authentication .beshop-login .forgot-password {
  text-align: right;
  margin: -0.25rem 0 1.25rem;
  font-size: 0.85rem;
}
#authentication .beshop-login .forgot-password a {
  text-decoration: underline;
}
#authentication .beshop-login .form-footer {
  margin: 0;
}
@media (max-width: 767px) {
  #authentication .beshop-login {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  #authentication .beshop-login__divider {
    height: 1px;
  }
}
