/* =========================================================================
   CREANDO VIDAS — tienda (productos, categorías, carrito, pago), cursos,
   cuenta de alumno y páginas legales
   ========================================================================= */

:root {
  --shop-link: #CC3366;
  --shop-price: #958E09;
  --shop-purple: #7F54B3;
  --shop-grey: #E9E6ED;
  --shop-grey-text: #515151;
  --shop-border: #D3CED2;
}

/* ---------- Contenedor general de tienda ---------- */
.shop-main { max-width: 1140px; margin: 0 auto; padding: 0 0 40px; font-family: var(--font-sys); font-size: 16px; line-height: 1.5; color: var(--c-sys); }
.shop-main a { color: var(--shop-link); }
.shop-main a:hover { text-decoration: underline; }
@media (max-width: 1200px) { .shop-main { padding: 0 20px 40px; } }

.breadcrumb { margin: 0 0 14.72px; font-size: 14.72px; line-height: 1.5; color: #767676; }
.breadcrumb a { color: #767676 !important; }

.price { color: var(--shop-price); }
.price del { opacity: .5; margin-right: 4px; }
.price ins { text-decoration: none; font-weight: 700; }
.price__suffix { font-size: .8em; }

.btn-purple { display: inline-block; padding: 9.888px 16px; border: 0; border-radius: 3px; background: var(--shop-purple); color: #fff; font-family: var(--font); font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; transition: .3s; }
.btn-purple:hover { background: #7249A4; }
.btn-grey { display: inline-block; margin-top: 16px; padding: 9.888px 16px; border-radius: 3px; background: var(--shop-grey); color: var(--shop-grey-text) !important; font-size: 16px; font-weight: 700; line-height: 1; text-decoration: none !important; transition: .3s; }
.btn-grey:hover { background: #DCD7E3; }
.btn-grey.is-added::after { content: " ✓"; }

/* ---------- Ficha de producto ---------- */
.product { display: flex; gap: 4%; margin-bottom: 32px; }
.gallery { position: relative; flex: 0 0 48%; }
.gallery__main img { width: 100%; }
.gallery__zoom { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 100%; background: #fff; pointer-events: none; }
.gallery__zoom svg { width: 16px; height: 16px; fill: var(--c-sys); }
.gallery__thumbs { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.gallery__thumbs li { width: 25%; }
.gallery__thumbs button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; opacity: .5; transition: opacity .3s; }
.gallery__thumbs button:hover, .gallery__thumbs button.is-active { opacity: 1; }
.gallery__thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.summary { flex: 0 0 48%; }
.product__title { margin: 0 0 16px; font-family: var(--font-sys); font-size: 40px; font-weight: 500; line-height: 1.2; color: var(--c-sys); }
.summary .price { margin: 0 0 14.4px; font-size: 20px; line-height: 1.5; }
.summary .price__suffix { font-size: 16px; }
.product__short p { margin: 0 0 14.4px; line-height: 1.5; }
.add-to-cart { display: flex; gap: 4px; align-items: center; margin: 0 0 32px; }
.qty { width: 58px; height: 42px; padding: 8px 4px; border: 1px solid #666; border-radius: 3px; text-align: center; font-size: 16px; }
.product__meta { font-size: 16px; }

/* Pestañas */
.tabs__list { display: flex; list-style: none; margin: 0 0 25.888px; padding: 0 0 0 16px; border-bottom: 1px solid var(--shop-border); }
.tabs__list li { margin: 0 -1px -1px 0; }
.tabs__list button { padding: 8px 16px; border: 1px solid var(--shop-border); border-radius: 4px 4px 0 0; background: var(--shop-grey); color: var(--shop-grey-text); font-family: var(--font-sys); font-size: 16px; font-weight: 700; line-height: 24px; cursor: pointer; }
.tabs__list button[aria-selected="true"] { background: #fff; border-bottom-color: #fff; }
.tabs__panel h2, .related > h2 { margin: 8px 0 16px; font-family: var(--font-sys); font-size: 32px; font-weight: 500; line-height: 1.2; color: var(--c-sys); }
.tabs__panel p { margin: 0 0 14.4px; line-height: 1.5; }

/* Rejilla de productos (relacionados y categorías) */
.related { margin-top: 48px; }
.products { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; column-gap: 3.8%; }
.product-card { width: 22.15%; margin-bottom: 47.872px; }
.product-card__link { display: block; text-decoration: none !important; }
.product-card img { width: 100%; margin-bottom: 16px; }
.product-card__title { padding: 8px 0; margin: 0; font-family: var(--font-sys); font-size: 16px; font-weight: 500; line-height: 1.2; color: var(--shop-link); }
.product-card .price { display: block; margin-bottom: 6.856px; font-size: 13.712px; line-height: 1.5; }
.product-card .price__suffix { font-size: .8em; }

/* Cabecera de categoría */
.shop-title { margin: 8px 0 16px; font-family: var(--font-sys); font-size: 40px; font-weight: 500; line-height: 1.2; color: var(--c-sys); }
.shop-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.result-count { margin: 0; }
.orderby { min-width: 250px; padding: 8px 10px; border: 1px solid #666; border-radius: 3px; background: #fff; font-size: 16px; }

@media (max-width: 1024px) {
  .product-card { width: 30.75%; }
}
@media (max-width: 767px) {
  .product { flex-direction: column; gap: 24px; }
  .product__title { font-size: 28px; }
  .products { column-gap: 4%; }
  .product-card { width: 48%; }
  .shop-title { font-size: 28px; }
  .shop-toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---------- Carrito y pago ---------- */
.page-title { margin: 0 0 40px; padding-top: 0; font-size: 33px; font-weight: 600; line-height: 1.2; color: var(--c-text); text-align: center; }
.wc-wrap { max-width: 1340px; margin: 0 auto; padding: 0 50px 60px; font-family: var(--font); color: var(--c-text); }
.wc-notice { display: flex; gap: 12px; align-items: center; margin: 0 0 40px; padding: 16px 20px; border-top: 3px solid #1E85BE; background: #F6F5F8; font-size: 16px; }
.wc-notice svg { width: 16px; height: 16px; fill: #1E85BE; }
.wc-notice a { color: var(--shop-link); }
.cart-table, .order-table { width: 100%; border: 1px solid rgba(0,0,0,.1); border-collapse: separate; border-spacing: 0; border-radius: 5px; font-size: 14px; }
.cart-table th, .cart-table td, .order-table th, .order-table td { padding: 9px 12px; border-top: 1px solid rgba(0,0,0,.1); text-align: left; vertical-align: middle; }
.cart-table thead th, .order-table thead th { border-top: 0; font-weight: 700; }
.order-table tbody td, .order-table tfoot td { color: #8a8a8a; }
.cart-table img { width: 64px; height: 64px; object-fit: cover; }
.cart-table a { color: var(--shop-link); }
.cart-remove { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border: 0; border-radius: 100%; background: none; color: red; font-size: 22px; line-height: 1; cursor: pointer; }
.cart-remove:hover { background: red; color: #fff; }
.cart-totals { max-width: 48%; margin: 40px 0 0 auto; }
.cart-totals h2 { margin: 0 0 16px; font-size: 24px; font-weight: 500; }
.cart-empty { padding: 30px 0; text-align: center; }
.cart-empty p { margin-bottom: 20px; }
.checkout { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.checkout h3 { margin: 0 0 16px; font-size: 20px; font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
.field { margin: 0 0 12px; }
.field label { display: block; margin-bottom: 4px; font-size: 16px; line-height: 1.6; }
.field label .req { color: #e01020; text-decoration: none; }
.field input, .field select, .field textarea { width: 100%; padding: 6px 8px; border: 1px solid #666; border-radius: 3px; background: #fff; font-family: var(--font); font-size: 15px; color: var(--c-text); }
.field textarea { min-height: 40px; }
.order-review { grid-column: 1 / -1; margin-top: 30px; }
.payment-box { margin-top: 24px; padding: 16px; border-radius: 5px; background: #F6F5F8; color: #8a8a8a; font-size: 15px; }
.payment-box__method { display: flex; justify-content: space-between; padding: 16px 0; }
.payment-box__card { padding: 16px 10px; background: #EBE9EB; }
.payment-box__card div { height: 26px; border: 1px solid #ccc; background: #f5f5f5; }
.payment-box__legal { padding: 20px 0; border-top: 1px solid #e5e5e5; margin-top: 20px; }
.payment-box__terms { display: flex; gap: 8px; align-items: flex-start; }
.payment-box__terms a { color: var(--shop-link); }
.payment-box__actions { display: flex; justify-content: flex-end; }
.payment-box__actions .btn-purple { font-size: 16px; padding: 10px 20px; }
.payment-box__actions .btn-purple[disabled] { opacity: .5; cursor: not-allowed; }
.checkout-note { margin-top: 12px; font-size: 13px; color: #8a8a8a; text-align: right; }
@media (max-width: 767px) {
  .wc-wrap { padding: 0 16px 40px; }
  .checkout, .field-row { grid-template-columns: 1fr; }
  .cart-totals { max-width: 100%; }
  .cart-table thead { display: none; }
  .cart-table td { display: block; border-top: 0; }
  .cart-table tr td:first-child { border-top: 1px solid rgba(0,0,0,.1); }
}

/* ---------- Cuenta del alumno ---------- */
.account { max-width: 1440px; margin: 0 auto; padding: 0 60px 40px; }
.account__heading { margin: 110px 0 20px; font-family: var(--font-round); font-size: 30px; font-weight: 600; line-height: 1.2; color: #5B178D; text-align: center; }
.account__forms { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; padding: 10px; font-family: Roboto, var(--font-sys); }
.account__forms h2 { margin: 0; font-family: Roboto, var(--font-sys); font-size: 32px; font-weight: 400; line-height: 1.2; color: #000; }
.wc-form { margin: 28px 0; padding: 16px 30px; border: 1px solid #D5D8DC; border-radius: 3px; background: #fff; font-size: 14px; line-height: 1.6; color: #69727D; }
.wc-form p { margin: 0 0 14px; }
.wc-form label { display: block; line-height: 28px; }
.wc-form label .req { color: #e01020; }
.wc-form input[type="text"], .wc-form input[type="email"], .wc-form input[type="password"] { display: block; width: 100%; height: 48px; padding: 16px; border: 0; background: #F9FAFA; font-size: 14px; color: #69727D; }
.wc-form .pass { position: relative; }
.wc-form .pass button { position: absolute; top: 50%; right: 10px; width: 22px; height: 22px; transform: translateY(-50%); padding: 0; border: 0; background: none; cursor: pointer; }
.wc-form .pass button svg { width: 18px; height: 18px; fill: #000; }
.wc-form .actions { display: flex; align-items: center; gap: 12px; }
.wc-form .btn-blue { padding: 12px 32px; border: 0; border-radius: 3px; background: #5BC0DE; color: #fff; font-family: var(--font); font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; }
.wc-form .small { font-size: 12px; }
.wc-form a { color: #5BC0DE; }
.wc-form__msg { padding: 10px; border-radius: 3px; background: #FFF4E5; color: #8a5a00; font-size: 13px; }
.programs__title { margin: 0; padding: 10px; font-family: var(--font-serif); font-size: 40px; font-weight: 600; line-height: 1.2; color: #EF0098; text-align: center; }
.programs { display: grid; grid-template-columns: repeat(4, 1fr); padding-top: 70px; }
.program { display: flex; flex-direction: column; align-items: center; padding: 10px; text-align: center; }
.program h3 { margin: 0; font-family: var(--font-round); font-size: 28px; font-weight: 600; line-height: 1.2; color: #5B178D; }
.program h4 { margin: 0; font-family: var(--font-round); font-size: 20px; font-weight: 600; line-height: 1.2; color: #5B178D; }
.program img { border-radius: 30px; margin: 0 auto; max-height: 401px; width: auto; }
.btn-gradient { display: inline-block; padding: 12px 24px; border-radius: 30px; background-image: linear-gradient(#FFCE2A 0%, #F03F6B 100%); color: #fff; font-family: var(--font-round); font-size: 15px; font-weight: 500; line-height: 1; transition: .3s; }
.btn-gradient:hover { filter: brightness(1.05); }
@media (max-width: 1024px) { .programs { grid-template-columns: repeat(2, 1fr); row-gap: 30px; } }
@media (max-width: 767px) {
  .account { padding: 0 16px 40px; }
  .account__heading { margin-top: 40px; }
  .account__forms { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .programs { grid-template-columns: 1fr; }
  .programs__title { font-size: 30px; }
}

/* "Mis cursos" */
.my-courses { max-width: 1340px; margin: 0 auto; padding: 0 50px 40px; font-family: var(--font); }
.my-courses .notice { margin-bottom: 18px; border-radius: 5px; font-size: 16px; padding: 16px 25.888px; }
.my-courses h2 { margin: 18px 0 12px; font-size: 32px; font-weight: 400; color: var(--c-sys); font-family: var(--font-sys); }
.login-box { padding: 14px; border: 1px solid #ccc; border-radius: 5px; font-family: var(--font-sys); }
.login-box label { display: block; margin: 0 0 4px; font-size: 16px; }
.login-box input[type="text"], .login-box input[type="password"] { width: 100%; height: 42px; margin-bottom: 12px; padding: 8px; border: 1px solid #666; border-radius: 3px; }
.login-box .actions { display: flex; gap: 12px; align-items: center; }
.login-box .btn-blue { padding: 10px 22px; border: 1px solid #5BC0DE; border-radius: 3px; background: #6EC1E4; color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; }
.login-box a { color: var(--shop-link); }
@media (max-width: 767px) { .my-courses { padding: 0 16px 40px; } }

/* ---------- Páginas legales ---------- */
.legal { max-width: 1440px; margin: 0 auto; padding: 0 50px 60px; font-family: var(--font); color: var(--c-text); }
.legal__title { margin: 0 0 20px; font-size: 33px; font-weight: 600; line-height: 1.2; text-align: center; }
.legal__subtitle { margin: 0 0 20px; padding: 0 10px; font-family: var(--font-round); font-size: 30px; font-weight: 600; line-height: 1.2; color: var(--c-beige); text-align: center; text-transform: capitalize; }
.legal__text { padding: 0 10px; font-size: 16px; line-height: 1.4; text-align: justify; }
.legal__text p { margin: 0 0 14.4px; }
.legal__text a { color: var(--shop-link); }
.legal__text ul, .legal__text ol { margin: 0 0 14.4px; }
@media (max-width: 767px) { .legal { padding: 0 16px 40px; } .legal__title { font-size: 26px; } .legal__subtitle { font-size: 24px; } }

/* ---------- 404 ---------- */
.not-found { max-width: 700px; margin: 0 auto; padding: 60px 20px 100px; text-align: center; }
.not-found h1 { margin-bottom: 16px; font-size: 33px; }
.not-found p { margin-bottom: 24px; }
