/* ==========================================================================
   Centro de ayuda de Shop21
   Marca: morado #5D2A8C (acciones) · morado profundo #2F1951 (fondos) · naranja #FF7F27 (acento).
   Titulares en Cal Sans, texto en Poppins.
   ========================================================================== */
:root {
    --purple: #5D2A8C;
    --deep: #2F1951;
    --orange: #FF7F27;
    --ink: #231c36;
    --muted: #5f5a70;
    --line: #e8e3f0;
    --soft: #f7f4fb;
}
html { scroll-behavior: smooth; }
body { font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .ay-marca span, .btn { font-family: "Cal Sans", "Poppins", sans-serif; font-style: normal; }
a { color: var(--purple); }
a:hover { color: var(--deep); }
.ay-saltar { position: absolute; left: -999px; top: 0; background: var(--deep); color: #fff; padding: .5rem 1rem; z-index: 2000; }
.ay-saltar:focus { left: 8px; top: 8px; }

/* Botones (misma identidad que la web de Shop21) */
.btn-shop { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn-shop:hover, .btn-shop:focus { background: #4a2170; border-color: #4a2170; color: #fff; }
.btn-outline-shop { color: var(--purple); border-color: var(--purple); }
.btn-outline-shop:hover { background: var(--purple); border-color: var(--purple); color: #fff; }
.btn-accent { background: var(--orange); border-color: var(--orange); color: #1d1230; font-weight: 600; }
.btn-accent:hover, .btn-accent:focus { background: #ff9448; border-color: #ff9448; color: #1d1230; }

/* ---------- Cabecera ---------- */
.ay-top { position: sticky; top: 0; z-index: 1000; background: #fff; border-bottom: 1px solid var(--line); }
.ay-top-in { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.ay-marca { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--deep); flex: none; }
.ay-marca span { font-size: 1.05rem; padding-left: .75rem; border-left: 2px solid var(--line); }
.ay-nav { margin-left: auto; flex: none; }
.ay-nav a { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; font-weight: 500; font-size: .92rem; color: var(--purple); padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 999px; }
.ay-nav a:hover { background: var(--soft); }
.ay-buscar-top { flex: 1 1 auto; max-width: 440px; }

/* ---------- Buscador ---------- */
.ay-buscar { position: relative; display: flex; align-items: center; }
.ay-buscar > .bi-search { position: absolute; left: 14px; color: #8a8199; pointer-events: none; }
.ay-buscar input[type="search"] { width: 100%; border: 1.5px solid var(--line); border-radius: 999px; padding: .6rem 1rem .6rem 2.4rem; font-size: .95rem; font-family: inherit; background: #fff; color: var(--ink); -webkit-appearance: none; appearance: none; }
.ay-buscar input[type="search"]:focus { outline: 0; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(93, 42, 140, .15); }
.ay-sugerencias { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px rgba(35, 28, 54, .18); overflow: hidden; z-index: 1500; text-align: left; }
.ay-sugerencias[hidden] { display: none; }
.ay-sugerencias a { display: block; padding: .7rem 1rem; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.ay-sugerencias a:last-child { border-bottom: 0; }
.ay-sugerencias a:hover, .ay-sugerencias a.sel { background: var(--soft); }
.ay-sugerencias strong { display: block; font-size: .93rem; color: var(--deep); font-weight: 600; }
.ay-sugerencias small { display: block; color: var(--muted); font-size: .8rem; }
.ay-sugerencias .ay-sug-mod { color: var(--orange); font-weight: 600; }
.ay-sug-vacio { padding: .9rem 1rem; color: var(--muted); font-size: .9rem; }

/* ---------- Portada ---------- */
.ay-hero { background: linear-gradient(135deg, var(--deep) 0%, var(--purple) 100%); color: #fff; text-align: center; padding: 4rem 0 3.5rem; }
.ay-hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin-bottom: .6rem; }
.ay-hero p { color: rgba(255, 255, 255, .85); font-size: 1.05rem; }
.ay-buscar-hero { max-width: 680px; margin: 1.75rem auto 0; }
.ay-buscar-hero input[type="search"] { padding: 1rem 8.2rem 1rem 3rem; font-size: 1.02rem; border: 0; box-shadow: 0 14px 40px rgba(20, 8, 40, .35); }
.ay-buscar-hero > .bi-search { left: 20px; font-size: 1.1rem; }
.ay-btn-buscar { position: absolute; right: 8px; background: var(--orange); border: 0; border-radius: 999px; color: #1d1230; font-family: "Cal Sans", "Poppins", sans-serif; padding: .6rem 1.4rem; }
.ay-btn-buscar:hover { background: #ff9448; }
.ay-sugeridas { margin: 1.1rem 0 0; font-size: .9rem; }
.ay-sugeridas a { color: #fff; background: rgba(255, 255, 255, .14); border-radius: 999px; padding: .2rem .7rem; text-decoration: none; margin: 0 .2rem; display: inline-block; }
.ay-sugeridas a:hover { background: rgba(255, 255, 255, .26); }

.ay-seccion { padding: 3rem 0; }
.ay-seccion-suave { background: var(--soft); }
.ay-h2 { font-size: 1.55rem; color: var(--deep); margin-bottom: 1.4rem; }
.ay-h2-sm { font-size: 1.15rem; color: var(--deep); margin-bottom: .8rem; }

.ay-empieza { display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: 1.4rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); transition: box-shadow .2s, transform .2s, border-color .2s; }
.ay-empieza:hover { box-shadow: 0 12px 30px rgba(47, 25, 81, .1); transform: translateY(-2px); border-color: var(--orange); }
.ay-empieza i { font-size: 1.6rem; color: var(--orange); }
.ay-empieza strong { font-family: "Cal Sans", "Poppins", sans-serif; font-weight: 400; font-size: 1.08rem; color: var(--deep); }
.ay-empieza span { color: var(--muted); font-size: .9rem; }

.ay-modulo { display: flex; gap: 1rem; height: 100%; padding: 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); transition: box-shadow .2s, transform .2s; }
.ay-modulo:hover { box-shadow: 0 12px 30px rgba(47, 25, 81, .1); transform: translateY(-2px); }
.ay-ico { flex: none; width: 2.9rem; height: 2.9rem; border-radius: 12px; background: var(--purple); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.ay-ico-grande { width: 3.6rem; height: 3.6rem; font-size: 1.7rem; border-radius: 16px; }
.ay-modulo-txt { display: flex; flex-direction: column; gap: .15rem; }
.ay-modulo-txt strong { font-family: "Cal Sans", "Poppins", sans-serif; font-weight: 400; color: var(--deep); font-size: 1.05rem; }
.ay-modulo-txt small { color: var(--muted); font-size: .86rem; line-height: 1.4; }
.ay-modulo-txt em { font-style: normal; color: var(--orange); font-size: .8rem; font-weight: 600; margin-top: .2rem; }

.ay-lista-pop { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem 1.5rem; }
.ay-lista-pop a { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.ay-lista-pop a:hover { background: var(--soft); }
.ay-lista-pop i { color: var(--purple); }
.ay-lista-pop span { flex: 1; font-weight: 500; }
.ay-lista-pop small { color: var(--muted); font-size: .78rem; }

/* ---------- Páginas internas ---------- */
.ay-pagina { padding-top: 1.5rem; padding-bottom: 3rem; }
.ay-migas { font-size: .85rem; color: var(--muted); margin-bottom: 1.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.ay-migas a { text-decoration: none; }
.ay-migas i { font-size: .7rem; }
.ay-h1 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); color: var(--deep); line-height: 1.2; margin-bottom: .6rem; }
.ay-lead { color: var(--muted); font-size: 1.05rem; line-height: 1.55; }
.ay-muted { color: var(--muted); }
.ay-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; font-size: .83rem; color: var(--muted); margin: .4rem 0 1.5rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.ay-meta i { margin-right: .3rem; }
.ay-rol { display: inline-flex; align-items: center; gap: .3rem; background: #fff1e8; color: #b34a07; border-radius: 999px; padding: .15rem .65rem; font-size: .78rem; font-style: normal; font-weight: 600; }

.ay-modulo-cab { display: flex; gap: 1.1rem; align-items: center; margin-bottom: 2rem; }
.ay-art-card { display: flex; flex-direction: column; gap: .3rem; height: 100%; padding: 1.15rem 1.25rem; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); background: #fff; transition: box-shadow .2s, border-color .2s; }
.ay-art-card:hover { box-shadow: 0 10px 26px rgba(47, 25, 81, .09); border-color: #cfc2e2; }
.ay-art-card strong { font-family: "Cal Sans", "Poppins", sans-serif; font-weight: 400; font-size: 1.05rem; color: var(--deep); }
.ay-art-card span { color: var(--muted); font-size: .9rem; }
.ay-ayuda-extra { margin-top: 2rem; padding: 1rem 1.25rem; background: var(--soft); border-radius: 14px; color: var(--muted); }
.ay-ayuda-extra p { margin: 0; }

/* Barra lateral del módulo */
.ay-menu-mod { background: var(--soft); border-radius: 14px; padding: 1rem; position: sticky; top: 84px; }
.ay-menu-mod summary { cursor: pointer; font-family: "Cal Sans", "Poppins", sans-serif; color: var(--deep); font-size: 1rem; list-style: none; display: flex; align-items: center; gap: .5rem; }
.ay-menu-mod summary::-webkit-details-marker { display: none; }
.ay-menu-mod ul { list-style: none; padding: 0; margin: .8rem 0 .6rem; }
.ay-menu-mod li a { display: block; padding: .4rem .6rem; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .88rem; line-height: 1.35; }
.ay-menu-mod li a:hover { background: #fff; }
.ay-menu-mod li a.activo { background: #fff; color: var(--purple); font-weight: 600; box-shadow: inset 3px 0 0 var(--orange); }
.ay-otros-mod { font-size: .85rem; text-decoration: none; }

/* Artículo */
.ay-cuerpo { font-size: 1rem; line-height: 1.75; }
.ay-cuerpo h2 { font-size: 1.4rem; color: var(--deep); margin: 2.2rem 0 .8rem; scroll-margin-top: 90px; }
.ay-cuerpo h3 { font-size: 1.12rem; color: var(--deep); margin: 1.6rem 0 .6rem; scroll-margin-top: 90px; }
.ay-cuerpo p { margin: 0 0 1rem; }
.ay-cuerpo ul { padding-left: 1.3rem; margin: 0 0 1.1rem; }
.ay-cuerpo li { margin-bottom: .35rem; }
.ay-cuerpo code { background: #f1ecf8; color: #4a2170; padding: .1rem .4rem; border-radius: 6px; font-size: .9em; }
.ay-cuerpo a { text-underline-offset: 2px; }
.ay-pasos { list-style: none; padding: 0; margin: 0 0 1.4rem; counter-reset: paso; }
.ay-pasos > li { position: relative; padding: .2rem 0 .2rem 3rem; margin-bottom: .9rem; counter-increment: paso; min-height: 2.2rem; }
.ay-pasos > li::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--purple); color: #fff; display: flex; align-items: center; justify-content: center; font-family: "Cal Sans", "Poppins", sans-serif; font-size: .95rem; }
.ay-pasos ul { margin-top: .5rem; }
.ay-tabla { overflow-x: auto; margin: 0 0 1.4rem; border: 1px solid var(--line); border-radius: 12px; }
.ay-tabla table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.5; }
.ay-tabla th { background: var(--soft); color: var(--deep); text-align: left; font-family: "Cal Sans", "Poppins", sans-serif; font-weight: 400; }
.ay-tabla th, .ay-tabla td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.ay-tabla tr:last-child td { border-bottom: 0; }
.ay-tabla td:first-child { font-weight: 500; }

.ay-nota { display: flex; gap: .8rem; padding: 1rem 1.1rem; border-radius: 12px; margin: 0 0 1.3rem; font-size: .95rem; line-height: 1.6; border: 1px solid; }
.ay-nota > i { flex: none; font-size: 1.2rem; margin-top: .1rem; }
.ay-nota > div { min-width: 0; }
.ay-tip { background: #f1fbf5; border-color: #bfe6cd; color: #1b5a37; }
.ay-nota.ay-tip > i { color: #1c7c43; }
.ay-importante { background: #fff4ea; border-color: #ffd2a8; color: #7a3a07; }
.ay-nota.ay-importante > i { color: #d9560b; }
.ay-nota.ay-nota-tipo, .ay-nota:not(.ay-tip):not(.ay-importante) { background: #f3f0fa; border-color: #d9d0ec; color: #3b2a5c; }
.ay-nota:not(.ay-tip):not(.ay-importante) > i { color: var(--purple); }

/* ¿Te fue útil? */
.ay-util { margin-top: 2.5rem; padding: 1.3rem 1.4rem; background: var(--soft); border-radius: 14px; }
.ay-util-p { margin: 0 0 .7rem; }
.ay-util-btns { display: flex; gap: .6rem; }
.ay-voto { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: .45rem 1.2rem; font-family: inherit; font-weight: 500; color: var(--ink); cursor: pointer; }
.ay-voto:hover { border-color: var(--purple); color: var(--purple); }
.ay-voto.sel { background: var(--purple); border-color: var(--purple); color: #fff; }
.ay-util-no { margin-top: 1rem; }
.ay-util-no label { display: block; font-weight: 500; margin-bottom: .4rem; font-size: .92rem; }
.ay-util-no textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: .7rem .9rem; font-family: inherit; font-size: .93rem; margin-bottom: .6rem; }
.ay-util-no textarea:focus { outline: 0; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(93, 42, 140, .15); }
.ay-util-ok { margin: .9rem 0 0; color: #1c7c43; font-weight: 500; }
.ay-util [hidden] { display: none; }

.ay-rel { margin-top: 2rem; }
.ay-rel ul { list-style: none; padding: 0; margin: 0; }
.ay-rel li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.ay-rel li a { font-weight: 500; text-decoration: none; }
.ay-rel small { color: var(--muted); }
.ay-prevsig { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.ay-prevsig a { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.ay-prevsig a:hover { border-color: var(--purple); }
.ay-prevsig small { color: var(--muted); }
.ay-prevsig span { font-weight: 500; color: var(--deep); font-size: .93rem; }
.ay-sig { text-align: right; grid-column: 2; }

/* Lateral derecho */
.ay-lateral { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 1.2rem; }
.ay-toc strong { display: block; font-family: "Cal Sans", "Poppins", sans-serif; font-weight: 400; color: var(--deep); margin-bottom: .6rem; font-size: .95rem; }
.ay-toc ul { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.ay-toc a { display: block; padding: .3rem .8rem; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); font-size: .86rem; line-height: 1.35; }
.ay-toc a:hover { color: var(--purple); }
.ay-toc a.activo { color: var(--purple); border-left-color: var(--orange); font-weight: 600; }
.ay-soporte { background: var(--deep); color: #fff; border-radius: 14px; padding: 1.2rem; }
.ay-soporte i { font-size: 1.5rem; color: var(--orange); display: block; margin-bottom: .4rem; }
.ay-soporte strong { font-family: "Cal Sans", "Poppins", sans-serif; font-weight: 400; display: block; font-size: 1.02rem; }
.ay-soporte p { color: rgba(255, 255, 255, .8); font-size: .86rem; margin: .3rem 0 .8rem; }

/* Resultados */
.ay-resultados { list-style: none; padding: 0; margin: 1rem 0 0; }
.ay-resultados li a { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; margin-bottom: .7rem; text-decoration: none; color: var(--ink); }
.ay-resultados li a:hover { box-shadow: 0 10px 26px rgba(47, 25, 81, .09); border-color: #cfc2e2; }
.ay-resultados strong { font-family: "Cal Sans", "Poppins", sans-serif; font-weight: 400; color: var(--deep); font-size: 1.08rem; }
.ay-resultados span:last-child { color: var(--muted); font-size: .9rem; }
.ay-etq { color: var(--orange); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ay-vacio { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.ay-vacio > i { font-size: 2.6rem; color: var(--purple); display: block; margin-bottom: .6rem; }
.ay-acciones { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }

/* Pie */
.ay-pie { background: var(--deep); color: rgba(255, 255, 255, .8); padding: 2.2rem 0 1.4rem; margin-top: 2rem; }
.ay-pie-in { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: flex-start; }
.ay-pie-logo { filter: brightness(0) invert(1); }
.ay-pie p { margin: .4rem 0 0; }
.ay-pie-contacto { display: flex; flex-direction: column; gap: .35rem; }
.ay-pie-contacto strong { color: #fff; font-family: "Cal Sans", "Poppins", sans-serif; font-weight: 400; }
.ay-pie a { color: #fff; text-decoration: none; }
.ay-pie a:hover { text-decoration: underline; }
.ay-copy { font-size: .82rem; margin-top: 1.4rem !important; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .15); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .ay-menu-mod, .ay-lateral { position: static; }
    .ay-lateral .ay-toc { display: none; }
    .ay-lista-pop { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    .ay-top-in { flex-wrap: wrap; padding-top: .6rem; padding-bottom: .6rem; }
    .ay-marca span { display: none; }
    .ay-nav a span { display: none; }
    .ay-nav a { padding: .45rem .65rem; }
    .ay-buscar-top { order: 3; max-width: none; flex-basis: 100%; }
    .ay-hero { padding: 2.6rem 0 2.4rem; }
    .ay-buscar-hero input[type="search"] { padding-right: 1rem; }
    .ay-btn-buscar { display: none; }
    .ay-modulo-cab { flex-direction: column; align-items: flex-start; }
    .ay-prevsig { grid-template-columns: 1fr; }
    .ay-sig { grid-column: auto; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .ay-empieza, .ay-modulo { transition: none; }
    .ay-empieza:hover, .ay-modulo:hover { transform: none; }
}
@media print {
    .ay-top, .ay-pie, .ay-util, .ay-prevsig, .ay-lateral, .ay-menu-mod, .ay-migas, .ay-rel { display: none !important; }
    .ay-cuerpo { font-size: 11pt; }
}
