/* =====================================================================
   GCE — "Mis cursos" (ronda 6) para el área de alumno WooCommerce.
   Portado de propuestas-esteticas-moodle/ronda-6/interfaz-wordpress-gce.html
   Todo vive bajo .gce-courses para no afectar a otras pestañas de la cuenta
   ni al resto del sitio. Los datos vienen del view-model de RS Bridge; aquí
   solo hay presentación.
   ===================================================================== */

/* ── Preview shell: replace the default account composition ───────────── */
body.gce-account-shell-page {
  background: #ffffff;
  color: #191817;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
}

body.gce-account-shell-page .woocommerce,
body.gce-account-shell-page .gce-account-top,
body.gce-account-shell-page .gce-account-sidebar {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
}

body.gce-account-shell-page #header,
body.gce-account-shell-page .site-header {
  display: none !important;
}

body.gce-account-shell-page #main,
body.gce-account-shell-page #content,
body.gce-account-shell-page .site-main,
body.gce-account-shell-page .ct-container,
body.gce-account-shell-page .ct-container-full,
body.gce-account-shell-page .entry-content,
body.gce-account-shell-page .woocommerce {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* The account page is a Gutenberg wrapper around WooCommerce. Its spacer
 * blocks have no role in the learner shell and otherwise push the sticky bar
 * away from the edge of the viewport. */
body.gce-account-shell-page:not(.gce-auth-page-body) .entry-content > :not(.woocommerce) {
  display: none !important;
}

body.gce-auth-page-body .entry-content > :not(.gce-auth-page):not(.gce-account-top):not(.woocommerce) {
  display: none !important;
}

body.page-id-7310 .blocksy-woo-messages-default,
body.page-id-869 .blocksy-woo-messages-default {
  display: none !important;
}

body.gce-account-shell-page .woocommerce {
  display: grid !important;
  grid-template-columns: 226px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  background: #ffffff;
}

body.gce-account-shell-page .woocommerce-MyAccount-navigation {
  display: none !important;
}

body.gce-account-shell-page:not(.gce-auth-page-body) .ct-acount-nav {
  display: contents !important;
}

body.gce-account-shell-page .woocommerce-MyAccount-content {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  width: auto !important;
  margin: 0 !important;
  padding: 40px 43px 80px !important;
  float: none !important;
}

/* Match the second-iteration preview: the learner content stays readable
 * inside the full-width shell instead of consuming the whole main column. */
@media (min-width: 781px) {
  body.gce-account-shell-page .woocommerce-MyAccount-content {
    box-sizing: border-box;
    width: min(100%, 1054px) !important;
    max-width: 1054px;
    margin-left: max(0px, calc((100vw - 1280px) / 2)) !important;
  }
}

body.gce-account-shell-page .gce-account-top {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  width: 100% !important;
}

body.gce-account-shell-page:not(.gce-auth-page-body) .woocommerce-MyAccount-content > p:not([class]) {
  display: none !important;
}

/* Blocksy/WooCommerce add clearfix pseudo-elements and float rules to the
 * account wrapper. They create an extra black/empty strip in the preview if
 * they are allowed to participate in the new grid. */
body.gce-account-shell-page .woocommerce::before,
body.gce-account-shell-page .woocommerce::after,
body.gce-account-shell-page .woocommerce-MyAccount-content::before,
body.gce-account-shell-page .woocommerce-MyAccount-content::after,
body.gce-auth-page-body .woocommerce .col2-set::before,
body.gce-auth-page-body .woocommerce .col2-set::after {
  display: none !important;
  content: none !important;
}

body.gce-account-shell-page .woocommerce-MyAccount-content > *,
body.gce-account-shell-page .woocommerce-MyAccount-content form,
body.gce-auth-page-body .woocommerce form {
  box-sizing: border-box;
}

body.gce-account-shell-page .gce-courses,
body.gce-account-shell-page .gce-courses *,
body.gce-account-shell-page .gce-auth-card,
body.gce-account-shell-page .gce-auth-card * {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
}

body.gce-account-shell-page .gce-account-top *,
body.gce-account-shell-page .gce-account-sidebar * {
  font-family: inherit !important;
}

/* Guest login/register keeps the existing WooCommerce forms but uses the
 * canonical account page and the same centered auth surface as the preview. */
body.gce-auth-page-body .woocommerce {
  display: block !important;
  min-height: 100vh;
  padding: 0 26px 90px !important;
  background: #ffffff;
}

body.gce-auth-page-body .woocommerce .gce-account-top {
  margin: 0 -26px 48px;
}

body.gce-auth-page-body .woocommerce .gce-google-login-box,
body.gce-auth-page-body .woocommerce .col2-set {
  width: min(100%, 420px) !important;
  max-width: 420px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

body.gce-auth-page-body .woocommerce .gce-google-login-box {
  margin-bottom: 14px;
}

body.gce-auth-page-body .woocommerce .u-column1.col-1,
body.gce-auth-page-body .woocommerce .u-column2.col-2 {
  width: 100% !important;
  max-width: 420px !important;
  margin: 0 auto !important;
  padding: 31px 32px !important;
  border: 1px solid #e7e6e2 !important;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(25, 24, 23, .05), 0 10px 28px rgba(25, 24, 23, .08);
  float: none !important;
}

body.gce-auth-page-body .woocommerce .u-column1.col-1 h2,
body.gce-auth-page-body .woocommerce .u-column2.col-2 h2 {
  display: block !important;
  margin: 0 0 7px;
  color: #191817;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.2;
}

body.gce-auth-page-body .woocommerce .col2-set {
  display: block !important;
  margin-bottom: 0 !important;
}

body.gce-auth-page-body .woocommerce.show-login .u-column2.col-2,
body.gce-auth-page-body .woocommerce:not(.show-register) .u-column2.col-2 {
  display: none !important;
}

body.gce-auth-page-body .woocommerce.show-register .u-column1.col-1 {
  display: none !important;
}

body.gce-auth-page-body .woocommerce form .form-row {
  margin: 0 0 14px;
  padding: 0;
}

body.gce-auth-page-body .woocommerce form .form-row label {
  display: block;
  margin: 0 0 5px;
  color: #6a675f;
  font-size: 11.5px;
  font-weight: 600;
}

body.gce-auth-page-body .woocommerce form .form-row input.input-text {
  width: 100%;
  border: 1px solid #d9d7d1 !important;
  border-radius: 9px;
  background: #fff;
  padding: 11px 12px;
  color: #191817;
  font-size: 13px;
}

body.gce-auth-page-body .woocommerce form .button {
  width: 100% !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #191817 !important;
  color: #fff !important;
  padding: 10px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

body.gce-auth-page-body .woocommerce .toggle-message {
  width: min(100%, 420px);
  margin: 20px auto 0;
  color: #6a675f;
  font-size: 12px;
  text-align: center;
}

body.gce-auth-page-body .woocommerce .toggle-message p {
  margin: 0;
}

body.gce-auth-page-body .woocommerce .toggle-message__register,
body.gce-auth-page-body .woocommerce.show-login .toggle-message__register,
body.gce-auth-page-body .woocommerce:not(.show-register) .toggle-message__register {
  display: none;
}

body.gce-auth-page-body .woocommerce.show-register .toggle-message__login {
  display: none;
}

body.gce-auth-page-body .woocommerce.show-register .toggle-message__register {
  display: block;
}

body.gce-auth-page-body .woocommerce .toggle-message a,
body.gce-auth-page-body .woocommerce .lost_password a {
  color: #191817;
  font-weight: 700;
}

body.gce-auth-page-body .gce-google-login-box {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  text-align: center;
}

body.gce-auth-page-body .gce-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #d9d7d1;
  border-radius: 10px;
  background: #fff;
  color: #191817;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

body.gce-auth-page-body .gce-google-btn img {
  width: 18px;
  height: 18px;
  margin-right: 10px;
}

body.gce-auth-page-body .gce-google-btn:hover,
body.gce-auth-page-body .gce-google-btn:focus-visible {
  border-color: #191817;
  background: #f4f4f2;
  color: #191817;
  text-decoration: none;
}

body.gce-auth-page-body .gce-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #68645c;
  font-size: 12px;
}

body.gce-auth-page-body .gce-separator::before,
body.gce-auth-page-body .gce-separator::after {
  content: '';
  flex: 1;
  border-top: 1px solid #e7e6e2;
}

/* The standalone /login/ page uses the real WordPress login handler too. */
body.gce-auth-page-body .gce-auth-page {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  min-height: calc(100vh - 66px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 26px 90px;
}

body.gce-auth-page-body .entry-content > .gce-account-top {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.gce-auth-card {
  width: min(100%, 420px);
  padding: 31px 32px;
  border: 1px solid #e7e6e2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(25, 24, 23, .05), 0 10px 28px rgba(25, 24, 23, .08);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.gce-auth-card__eyebrow {
  margin: 0 0 13px;
  color: #68645c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.gce-auth-card h1 {
  margin: 0 0 7px;
  color: #191817;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.2;
}

.gce-auth-card__intro {
  margin: 0 0 23px;
  color: #6a675f;
  font-size: 13px;
}

.gce-auth-card .loginform,
.gce-auth-card #loginform {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gce-auth-card .login-username,
.gce-auth-card .login-password,
.gce-auth-card .login-remember {
  margin: 0;
}

.gce-auth-card .login-username label,
.gce-auth-card .login-password label {
  display: block;
  margin-bottom: 5px;
  color: #6a675f;
  font-size: 11.5px;
  font-weight: 600;
}

.gce-auth-card .input {
  width: 100%;
  border: 1px solid #d9d7d1;
  border-radius: 9px;
  padding: 11px 12px;
  color: #191817;
  font-size: 13px;
}

.gce-auth-card .button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #191817;
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
}

.gce-auth-card .gce-google-login-box {
  margin: 20px 0 0;
  text-align: center;
}

.gce-auth-card .gce-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid #d9d7d1;
  border-radius: 10px;
  background: #fff;
  color: #191817;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.gce-auth-card .gce-google-btn img {
  width: 18px;
  height: 18px;
  margin-right: 10px;
}

.gce-auth-card .gce-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  color: #68645c;
  font-size: 12px;
}

.gce-auth-card .gce-separator::before,
.gce-auth-card .gce-separator::after {
  content: '';
  flex: 1;
  border-top: 1px solid #e7e6e2;
}

.gce-auth-switch,
.gce-auth-already {
  margin: 20px 0 0;
  padding-top: 17px;
  border-top: 1px solid #e7e6e2;
  color: #6a675f;
  font-size: 12px;
  text-align: center;
}

.gce-auth-forgot {
  margin: 13px 0 0;
  font-size: 12px;
}

.gce-auth-forgot a {
  color: #191817;
  font-weight: 600;
}

.gce-auth-switch a,
.gce-auth-already a {
  color: #191817;
  font-weight: 700;
}

body.gce-auth-page-body .gce-account-top--guest {
  margin: 0 -26px;
}

.gce-account-icons {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.gce-account-top {
  position: sticky;
  top: 0;
  z-index: 40;
  grid-column: 1 / -1;
  min-height: 66px;
  border-bottom: 1px solid #e7e6e2;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}

.gce-account-top__inner {
  display: flex;
  align-items: center;
  gap: 15px;
  max-width: none;
  min-height: 66px;
  margin: 0;
  padding: 0 26px;
}

.gce-account-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

/* Same logo file and size as the Moodle learner bar (.gce-learner-brand__logo). */
.gce-account-brand__logo {
  display: block;
  width: auto;
  height: 44px;
  max-width: 240px;
  object-fit: contain;
}

.gce-account-user__avatar {
  display: grid;
  place-items: center;
  background: #191817;
  color: #fff;
  font-weight: 700;
}

.gce-account-top__spacer {
  flex: 1 1 auto;
}

.gce-account-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid #d9d7d1;
  border-radius: 10px;
  background: #fff;
}

.gce-account-user__avatar {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  font-size: 11px;
}

.gce-account-user__name {
  color: #191817;
  font-size: 12.5px;
  font-weight: 600;
}

/* The sidebar stays fixed under the top bar (66px + 1px border) while the
 * content scrolls. */
.gce-account-sidebar {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  position: sticky;
  top: 67px;
  box-sizing: border-box;
  height: calc(100vh - 67px);
  overflow-y: auto;
  padding: 28px 17px 35px 26px;
  border-right: 1px solid #e7e6e2;
}

.gce-account-sidebar__kicker {
  margin: 0 11px 10px;
  color: #68645c;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.gce-account-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gce-account-sidebar__item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 11px;
  border-radius: 10px;
  color: #6a675f;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.gce-account-sidebar__item:hover,
.gce-account-sidebar__item:focus-visible,
.gce-account-sidebar__item.is-active {
  background: #f4f4f2;
  color: #191817;
  text-decoration: none;
}

.gce-account-sidebar__item.is-active {
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(25, 24, 23, .07);
}

.gce-account-sidebar__icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid #e7e6e2;
  border-radius: 8px;
  background: #fff;
  color: #6a675f;
}

.gce-account-sidebar__icon svg {
  width: 14px;
  height: 14px;
}

.gce-account-sidebar__item.is-active .gce-account-sidebar__icon {
  border-color: #191817;
  background: #191817;
  color: #fff;
}

.gce-account-sidebar__rule {
  height: 1px;
  margin: 17px 11px;
  background: #e7e6e2;
}

.gce-account-sidebar__logout {
  color: #68645c;
}

/* Staff only: jump to the Moodle learning review, in a new tab. */
.gce-account-sidebar__group {
  margin: 17px 11px 6px;
  color: #68645c;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.gce-account-sidebar__external {
  display: inline-grid;
  margin-left: auto;
  color: #9a968d;
}

.gce-account-sidebar__external svg {
  width: 13px;
  height: 13px;
}

.gce-courses {
  --bg: #ffffff;
  --canvas: #f4f4f2;
  --paper: #fff;
  --ink: #191817;
  --ink-2: #6a675f;
  --ink-3: #68645c;
  --line: #e7e6e2;
  --line-2: #d9d7d1;
  --card-bg: #ebeae6;
  --ok: #4f7a52;
  --ok-soft: #eef3ed;
  --ok-line: #d5e2d2;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
}

.gce-courses *,
.gce-courses *::before,
.gce-courses *::after { box-sizing: border-box; }

.gce-courses a { color: inherit; text-decoration: none; }

/* ── Cabecera ─────────────────────────────────────────────────────── */
.gce-courses__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}
.gce-courses__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 10px;
}
.gce-courses__title {
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.1;
  letter-spacing: -.03em;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--ink);
}
.gce-courses__lead {
  color: var(--ink-2);
  font-size: 15px;
  max-width: 60ch;
  margin: 0;
}
.gce-courses__meta {
  font-size: 12px;
  color: var(--ink-3);
  text-align: right;
  white-space: nowrap;
}
.gce-courses__meta strong {
  display: block;
  color: var(--ink);
  font-size: 26px;
  letter-spacing: -.03em;
  line-height: 1.1;
}

/* ── Resumen ──────────────────────────────────────────────────────── */
.gce-courses__summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 30px;
}
.gce-summary-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 17px 18px;
}
.gce-summary-card .k {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
  font-weight: 700;
}
.gce-summary-card strong {
  display: block;
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-top: 7px;
  color: var(--ink);
}
.gce-summary-card p {
  font-size: 11.5px;
  color: var(--ink-3);
  margin: 4px 0 0;
}
.gce-summary-card--next strong {
  font-size: 17px;
  line-height: 1.25;
}
.gce-summary-card .track {
  height: 6px;
  border-radius: 999px;
  background: var(--canvas);
  overflow: hidden;
  margin-top: 12px;
}
.gce-summary-card .track span {
  display: block;
  height: 100%;
  background: var(--ink);
  border-radius: 999px;
}

/* ── Encabezado de sección ────────────────────────────────────────── */
.gce-courses__sectionhead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 15px;
  margin: 30px 0 15px;
}
.gce-courses__sectionhead h2 {
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}
.gce-courses__sectionhead p {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
}

/* ── Grid + tarjetas ──────────────────────────────────────────────── */
.gce-course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.gce-course-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(25, 24, 23, .07);
  transition: transform .16s ease, box-shadow .16s ease;
  display: flex;
  flex-direction: column;
}
.gce-course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(25, 24, 23, .08);
}
.gce-course-card__image {
  height: 145px;
}
.gce-course-card__image span {
  display: block;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: var(--card-bg);
}
.gce-course-card__body {
  padding: 15px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.gce-course-card__body h3 {
  font-size: 16px;
  line-height: 1.3;
  margin: 0 0 13px;
  min-height: 42px;
  color: var(--ink);
  font-weight: 600;
}
.gce-course-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-3);
  font-size: 11px;
}
.gce-course-card__progress {
  margin: 13px 0 14px;
}
.gce-course-card__progress .line {
  height: 5px;
  background: var(--canvas);
  border-radius: 999px;
  overflow: hidden;
}
.gce-course-card__progress .line span {
  height: 100%;
  display: block;
  background: var(--ink);
  border-radius: 999px;
}
.gce-course-card__progress small {
  display: block;
  color: var(--ink-3);
  font-size: 11px;
  margin-top: 5px;
}
.gce-course-card__cta {
  margin-top: auto;
}

/* Botón (round-6) — scopeado para no chocar con .btn del tema/Woo */
.gce-courses .gce-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 12px;
  cursor: pointer;
  transition: transform .14s ease, background .14s ease;
  text-decoration: none;
}
.gce-courses .gce-btn:hover {
  background: #000;
  transform: translateY(-1px);
  color: #fff;
}
.gce-courses .gce-btn--ghost {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.gce-courses .gce-btn--ghost:hover {
  background: var(--canvas);
  color: var(--ink);
}

/* ── Estado vacío ─────────────────────────────────────────────────── */
.gce-courses__empty {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 42px 28px;
  text-align: center;
  max-width: 680px;
}
.gce-courses__empty h2 {
  font-size: 20px;
  margin: 0 0 7px;
  color: var(--ink);
}
.gce-courses__empty p {
  color: var(--ink-2);
  font-size: 13px;
  max-width: 43ch;
  margin: 0 auto 19px;
}

/* ── Pedidos y Mi perfil ──────────────────────────────────────────────
   Mismas plantillas de WooCommerce; solo se alinean tipografía, colores,
   bordes y botones con "Mis cursos". */
body.gce-account-shell-page .woocommerce-MyAccount-content {
  color: #191817;
  font-size: 13px;
}

body.gce-account-shell-page .woocommerce-MyAccount-content * {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
}

.gce-account-page-head .gce-courses__head {
  margin-bottom: 28px;
}

/* Botones: los mismos que .gce-btn en las tarjetas de curso. */
body.gce-account-shell-page .woocommerce-MyAccount-content .button,
body.gce-account-shell-page .woocommerce-MyAccount-content button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  border: 1px solid #191817;
  border-radius: 10px;
  background: #191817;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  padding: 9px 16px;
  text-decoration: none;
  box-shadow: none;
  transition: transform .14s ease, background .14s ease;
}

body.gce-account-shell-page .woocommerce-MyAccount-content .button:hover,
body.gce-account-shell-page .woocommerce-MyAccount-content button[type="submit"]:hover {
  border-color: #000;
  background: #000;
  color: #fff;
  transform: translateY(-1px);
}

body.gce-account-shell-page .woocommerce-orders-table .button,
body.gce-account-shell-page .woocommerce-pagination .button {
  border-color: #d9d7d1;
  background: #fff;
  color: #191817;
  font-size: 12px;
  padding: 7px 14px;
}

body.gce-account-shell-page .woocommerce-orders-table .button:hover,
body.gce-account-shell-page .woocommerce-pagination .button:hover {
  border-color: #d9d7d1;
  background: #f4f4f2;
  color: #191817;
}

/* Avisos de WooCommerce (verificación de correo, sin pedidos, guardado). */
body.gce-account-shell-page .woocommerce-MyAccount-content .woocommerce-info,
body.gce-account-shell-page .woocommerce-MyAccount-content .woocommerce-message,
body.gce-account-shell-page .woocommerce-MyAccount-content .woocommerce-error {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  margin: 0 0 24px;
  padding: 14px 16px 14px 18px;
  border: 1px solid #e7e6e2;
  border-radius: 15px;
  background: #fff;
  color: #6a675f;
  font-size: 13px;
  line-height: 1.5;
}

body.gce-account-shell-page .woocommerce-MyAccount-content .woocommerce-info::before,
body.gce-account-shell-page .woocommerce-MyAccount-content .woocommerce-info::after,
body.gce-account-shell-page .woocommerce-MyAccount-content .woocommerce-message::before,
body.gce-account-shell-page .woocommerce-MyAccount-content .woocommerce-message::after,
body.gce-account-shell-page .woocommerce-MyAccount-content .woocommerce-error::before,
body.gce-account-shell-page .woocommerce-MyAccount-content .woocommerce-error::after {
  display: none;
  content: none;
}

body.gce-account-shell-page .woocommerce-MyAccount-content .woocommerce-info .button,
body.gce-account-shell-page .woocommerce-MyAccount-content .woocommerce-message .button {
  /* WooCommerce prints the button before the text; keep it on the right. */
  order: 2;
  flex: 0 0 auto;
  margin: 0 0 0 auto !important;
  font-size: 12px;
  padding: 8px 14px;
}

/* Tabla de pedidos */
body.gce-account-shell-page .woocommerce-orders-table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  font-size: 13px;
}

body.gce-account-shell-page .woocommerce-orders-table thead th {
  padding: 0 14px 10px 0;
  border: 0;
  border-bottom: 1px solid #d9d7d1;
  color: #68645c;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}

body.gce-account-shell-page .woocommerce-orders-table tbody th,
body.gce-account-shell-page .woocommerce-orders-table tbody td {
  padding: 16px 14px 16px 0;
  border: 0;
  border-bottom: 1px solid #e7e6e2;
  color: #6a675f;
  font-size: 13px;
  font-weight: 400;
  vertical-align: middle;
}

body.gce-account-shell-page .woocommerce-orders-table__cell-order-number a {
  color: #191817;
  font-weight: 600;
  text-decoration: none;
}

body.gce-account-shell-page .woocommerce-orders-table__cell-order-total .amount {
  color: #191817;
  font-weight: 600;
}

body.gce-account-shell-page .woocommerce-orders-table__header-order-actions,
body.gce-account-shell-page .woocommerce-orders-table__cell-order-actions {
  padding-right: 0 !important;
  text-align: right !important;
}

body.gce-account-shell-page .woocommerce-orders-table__cell-order-actions .button {
  width: auto;
  min-width: 0;
  margin: 0 0 0 6px;
}

body.gce-account-shell-page .woocommerce-pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

/* WooCommerce stacks the table below 768px and hides the order number cell;
 * keep it visible as the heading of each order. */
@media (max-width: 768px) {
  body.gce-account-shell-page .woocommerce-MyAccount-content .woocommerce-info,
  body.gce-account-shell-page .woocommerce-MyAccount-content .woocommerce-message {
    flex-direction: column;
    align-items: stretch;
  }

  body.gce-account-shell-page .woocommerce-MyAccount-content .woocommerce-info .button,
  body.gce-account-shell-page .woocommerce-MyAccount-content .woocommerce-message .button {
    margin: 0 !important;
    white-space: normal;
  }

  body.gce-account-shell-page .woocommerce-orders-table tbody tr {
    display: block;
    padding: 0 0 10px;
    border-bottom: 1px solid #d9d7d1;
  }

  body.gce-account-shell-page .woocommerce-orders-table tbody th {
    display: block !important;
    padding: 18px 0 6px;
    border-bottom: 0;
  }

  body.gce-account-shell-page .woocommerce-orders-table tbody td {
    padding: 6px 0;
    border-bottom: 0;
  }

  body.gce-account-shell-page .woocommerce-orders-table tbody td::before {
    color: #68645c;
    font-size: 12px;
    font-weight: 600;
  }
}

/* Formulario de perfil */
body.gce-account-shell-page .woocommerce-EditAccountForm {
  max-width: 760px;
}

body.gce-account-shell-page .woocommerce-EditAccountForm .form-row {
  margin: 0 0 15px;
  padding: 0;
}

body.gce-account-shell-page .woocommerce-EditAccountForm label {
  display: block;
  margin: 0 0 6px;
  color: #6a675f;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
}

body.gce-account-shell-page .woocommerce-EditAccountForm .required {
  color: #68645c;
  text-decoration: none;
}

body.gce-account-shell-page .woocommerce-EditAccountForm input.input-text {
  width: 100%;
  height: auto;
  min-height: 0;
  border: 1px solid #d9d7d1;
  border-radius: 9px;
  background: #fff;
  padding: 10px 12px;
  color: #191817;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: none;
}

body.gce-account-shell-page .woocommerce-EditAccountForm input.input-text:focus {
  border-color: #191817;
  outline: 0;
}

body.gce-account-shell-page .woocommerce-EditAccountForm #account_display_name_description {
  display: block;
  margin-top: 6px;
  color: #68645c;
  font-size: 11.5px;
}

body.gce-account-shell-page .woocommerce-EditAccountForm #account_display_name_description em {
  font-style: normal;
}

body.gce-account-shell-page .woocommerce-EditAccountForm fieldset {
  margin: 30px 0 0;
  padding: 24px 0 0;
  border: 0;
  border-top: 1px solid #e7e6e2;
  border-radius: 0;
}

/* A floated legend sits inside the fieldset like a regular section title. */
body.gce-account-shell-page .woocommerce-EditAccountForm legend {
  float: left;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  color: #191817;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
}

body.gce-account-shell-page .woocommerce-EditAccountForm legend + * {
  clear: both;
}

body.gce-account-shell-page .woocommerce-EditAccountForm > p:last-of-type {
  display: flex;
  justify-content: flex-end;
  margin: 21px 0 0;
  padding-top: 18px;
  border-top: 1px solid #e7e6e2;
}

/* ── Responsive ───────────────────────────────────────────────────── */
body.gce-auth-page-body .woocommerce-ResetPassword {
  width: min(420px, calc(100% - 32px));
  margin: 32px auto;
  padding: 28px;
  background: #fff;
  border: 1px solid #e7e6e2;
  border-radius: 18px;
}
body.gce-auth-page-body .woocommerce-ResetPassword .form-row {
  float: none;
  width: 100%;
}
.gce-auth-back { text-align: center; margin: 20px auto; }

@media (max-width: 1050px) {
  .gce-course-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .gce-course-grid { grid-template-columns: 1fr; }
  .gce-courses__summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gce-courses__summary .gce-summary-card--next { grid-column: 1 / -1; }
  .gce-courses__summary .gce-summary-card { padding: 14px; }
  .gce-courses__head { display: block; }
  .gce-courses__meta { text-align: left; margin-top: 14px; }
}

@media (max-width: 780px) {
  body.gce-account-shell-page .woocommerce {
    display: block !important;
    min-height: 0;
  }

  body.gce-account-shell-page .woocommerce-MyAccount-content {
    padding: 30px 20px 70px !important;
  }

  .gce-account-top__inner {
    min-height: 66px;
    flex-wrap: wrap;
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .gce-account-brand__logo {
    height: 36px;
    max-width: 180px;
  }

  .gce-account-sidebar {
    position: static;
    height: auto;
    overflow: visible;
    padding: 11px 18px;
    border-right: 0;
    border-bottom: 1px solid #e7e6e2;
  }

  .gce-account-sidebar__kicker,
  .gce-account-sidebar__rule,
  .gce-account-sidebar__group {
    display: none;
  }

  .gce-account-sidebar__nav {
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
  }

  .gce-account-sidebar__item {
    width: auto;
    flex: 0 0 auto;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .gce-account-sidebar__icon {
    display: none;
  }

  .gce-account-user__name {
    display: none;
  }
}

/* ── Portadas de curso: fondo de un tono + personaje blanco con volumen ──
   Las dibuja gce-course-covers.js dentro de .gce-course-card__image[data-gce-cover].
   Sin JS queda el degradado del tono de la portada. Maqueta: propuestas-esteticas-moodle/portadas-cursos-xai/ */
.gce-course-card__image[data-gce-cover] { position: relative; overflow: hidden; }
/* Con portada animada, la imagen antigua (card_art.php de Moodle) no se pinta
   ni se descarga: antes se veía un instante hasta que el JS dibujaba encima.
   Mientras tanto la tarjeta ya tiene el color de su portada. */
.gce-course-card__image[data-gce-cover] > span:not(.gce-cover) { display: none; }
.gce-course-card__image[data-gce-cover="comprender"]   { background: linear-gradient(135deg, #1dbb70, #0b8a4d 50%, #04461f); }
.gce-course-card__image[data-gce-cover="crear"]        { background: linear-gradient(135deg, #e3388e, #a81b66 50%, #5e0e3a); }
.gce-course-card__image[data-gce-cover="disc"]         { background: linear-gradient(135deg, #9b70ff, #5f37cc 50%, #2c1569); }
.gce-course-card__image[data-gce-cover="comunicacion"] { background: linear-gradient(135deg, #d98a12, #a6640b 50%, #5c3505); }
.gce-course-card__image[data-gce-cover="negociacion"]  { background: linear-gradient(135deg, #1f7ae2, #0b4d9e 50%, #06295a); }
.gce-course-card__image[data-gce-cover="dificiles"]    { background: linear-gradient(135deg, #ff2c48, #c41631 50%, #4e0613); }
.gce-course-card__image[data-gce-cover="cambio"]       { background: linear-gradient(135deg, #f8d3f3, #e3a9e4 50%, #b97fcb); }
.gce-course-card__image[data-gce-cover="desmotivada"]  { background: linear-gradient(135deg, #8fa3cf, #5a6d98 50%, #2c3858); }
.gce-course-card__image[data-gce-cover="problemas"]    { background: linear-gradient(135deg, #22cbe2, #0a8ea8 50%, #044b5b); }
.gce-course-card__image .gce-cover {
  position: absolute; inset: 0; display: block; width: auto; height: auto;
  background: none;
  animation: gcecv-in .35s ease both;
}
@keyframes gcecv-in { from { opacity: 0 } to { opacity: 1 } }
.gce-course-card__image .gce-cover__bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gce-course-card__image .gce-cover__mark {
  position: absolute; inset: 0; width: auto; height: auto;
  display: flex; align-items: center; justify-content: center; background: none;
}
.gce-cover__mark svg { height: 42%; width: auto; overflow: visible; display: block; }
.gce-cover__mark svg * { transform-box: view-box; }

.gce-cover .blinkE { animation: gcecv-blink 4.6s ease-in-out infinite; }
@keyframes gcecv-blink { 0%,90%,100% { transform: scaleY(1) } 93% { transform: scaleY(.1) } 96% { transform: scaleY(1) } }
.gce-cover .idle-sphere { transform-origin: 60px 100px; animation: gcecv-tilt 5s ease-in-out infinite; }
.gce-cover .idle-cylinder { transform-origin: 60px 104px; animation: gcecv-tilt 5s ease-in-out infinite; }
.gce-cover .look-cylinder { animation: gcecv-look 6s ease-in-out infinite; }
@keyframes gcecv-tilt { 0%,100% { transform: rotate(-5deg) } 50% { transform: rotate(5deg) } }
.gce-cover .look-sphere { animation: gcecv-drift 5s ease-in-out infinite; }
@keyframes gcecv-drift { 0%,100% { transform: translateX(-2px) } 50% { transform: translateX(3px) } }
.gce-cover .idle-egg { transform-origin: 60px 104px; animation: gcecv-rock 3.4s ease-in-out infinite; }
@keyframes gcecv-rock { 0%,100% { transform: rotate(-8deg) } 50% { transform: rotate(8deg) } }
.gce-cover .sh-egg { animation: gcecv-shrock 3.4s ease-in-out infinite; }
@keyframes gcecv-shrock { 0%,100% { transform: translateX(-3px) } 50% { transform: translateX(3px) } }
.gce-cover .idle-cushion, .gce-cover .sh-cushion, .gce-cover .idle-arch, .gce-cover .sh-arch { animation: gcecv-squish 3.3s ease-in-out infinite; }
.gce-cover .idle-cushion { transform-origin: 60px 100px; }
.gce-cover .idle-arch { transform-origin: 60px 102px; }
@keyframes gcecv-squish { 0%,100% { transform: scale(1,1) } 50% { transform: scale(1.04,.95) } }
.gce-cover .look-cushion, .gce-cover .look-arch { animation: gcecv-look 6s ease-in-out infinite; }
@keyframes gcecv-look { 0%,15% { transform: translateX(0) } 25%,45% { transform: translateX(-5px) } 55%,75% { transform: translateX(5px) } 85%,100% { transform: translateX(0) } }
.gce-cover .idle-clover { transform-origin: 60px 62px; animation: gcecv-turn 6s ease-in-out infinite; }
@keyframes gcecv-turn { 0%,100% { transform: rotate(-10deg) } 50% { transform: rotate(10deg) } }
.gce-cover .idle-cube { animation: gcecv-float 3s ease-in-out infinite; }
@keyframes gcecv-float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-5px) } }
.gce-cover .sh-cube { animation: gcecv-shfloat 3s ease-in-out infinite; }
@keyframes gcecv-shfloat { 0%,100% { transform: scale(1); opacity: .26 } 50% { transform: scale(.84); opacity: .16 } }
.gce-cover .idle-pyramid { transform-origin: 60px 105px; animation: gcecv-hop 3s cubic-bezier(.4,0,.2,1) infinite; }
@keyframes gcecv-hop { 0%,30%,100% { transform: translateY(0) scale(1,1) } 40% { transform: translateY(0) scale(1.06,.93) } 55% { transform: translateY(-9px) scale(.97,1.04) } 70% { transform: translateY(0) scale(1,1) } }
.gce-cover .sh-pyramid { animation: gcecv-shhop 3s cubic-bezier(.4,0,.2,1) infinite; }
@keyframes gcecv-shhop { 0%,30%,100% { transform: scale(1); opacity: .26 } 40% { transform: scale(1.08) } 55% { transform: scale(.75); opacity: .14 } 70% { transform: scale(1); opacity: .26 } }
.gce-cover .idle-tear { transform-origin: 60px 105px; animation: gcecv-sigh 5s ease-in-out infinite; }
@keyframes gcecv-sigh { 0%,100% { transform: scale(1,1) } 40% { transform: scale(1.02,1.03) } 60% { transform: scale(1.05,.93) } }
@media (prefers-reduced-motion: reduce) { .gce-cover, .gce-cover svg * { animation: none !important; } }
