/* =========================================================
   alexgareis · sistema de diseño
   Tipografía: Archivo. Escala: 11 etiquetas · 12 notas · 14 interfaz · 16 texto · 20 destacado · 28 sección · 40 página · 64 hero
   Radios: píldora para lo que se toca y 8px para lo que contiene algo. Solo tema claro.
   ========================================================= */
:root {
  --ag-tinta: #030302;
  --ag-tinta-2: #57534c;
  --ag-tinta-3: #75716a;
  --ag-linea: #e4e0d8;
  --ag-superficie: #f6f5f2;
  --ag-naranja: #F2955A;
  --ag-radio: 8px;
  --ag-radio-pildora: 999px;
  --ag-fs-etiqueta: 0.6875rem;
  --ag-fs-nota: 0.75rem;
  --ag-fs-ui: 0.875rem;
  --ag-fs-texto: 1rem;
  --ag-fs-destacado: 1.25rem;
  --ag-fs-seccion: 1.75rem;
  --ag-fs-pagina: 2.5rem;
  --ag-header-h: 64px;
  --ag-margen: clamp(16px, 2.8vw, 40px);
  --ag-player-h: 0px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ag-tinta);
  font-family: 'Archivo', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--ag-player-h);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; margin: 0; }
.ag-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--ag-tinta); outline-offset: 2px; }
[hidden] { display: none !important; }
html.ag-lock, html.ag-lock body { overflow: hidden; }

/* ---------- Botones ---------- */
.ag-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: var(--ag-radio-pildora); border: 1px solid var(--ag-linea); background: #fff; color: var(--ag-tinta); font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; }
.ag-btn--dark { background: #000; border-color: #000; color: #fff; }
.ag-btn--dark:hover { background: #1c1c1c; }
.ag-btn--block { display: flex; width: 100%; min-height: 54px; }

/* ---------- Header ---------- */
.ag-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  height: var(--ag-header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--ag-margen);
  background: transparent; border-bottom: 1px solid transparent;
  transition: background-color .25s ease, border-color .25s ease;
}
.ag-header.is-scrolled { background: rgba(255,255,255,.97); border-bottom-color: var(--ag-linea); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ag-header__home, .ag-header__beats { font-size: var(--ag-fs-ui); line-height: 1; text-decoration: none; white-space: nowrap; }
.ag-header__home { font-weight: 600; justify-self: start; }
.ag-header__beats { font-weight: 400; }
.ag-header__beats.is-active { font-weight: 600; }
.ag-header__home:hover, .ag-header__beats:hover { opacity: .55; }
.ag-header__acciones { justify-self: end; display: flex; align-items: center; gap: 4px; margin-right: -10px; }
.ag-header__icono { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; padding: 0; cursor: pointer; color: var(--ag-tinta); border-radius: 50%; -webkit-tap-highlight-color: transparent; }
.ag-header__icono svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ag-cart-count { position: absolute; top: 4px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--ag-tinta); color: #fff; font-size: 10px; font-weight: 600; line-height: 17px; text-align: center; }

/* ---------- Pie ---------- */
.ag-footer { max-width: 1360px; margin: 64px auto 0; padding: 0 var(--ag-margen) 40px; }
.ag-footer p { margin: 0; padding-top: 28px; border-top: 1px solid var(--ag-linea); font-size: var(--ag-fs-nota); color: var(--ag-tinta-3); }

/* =========================================================
   CATÁLOGO
   ========================================================= */
.beat-filter-wrap { width: 100%; max-width: 1080px; margin: 120px auto 8px; padding: 0 var(--ag-margen); }
.beat-toolbar { display: flex; align-items: center; gap: 8px; }
.beat-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 14px; background: #f3f3f2; cursor: text; transition: box-shadow .15s ease; }
.beat-search:focus-within { box-shadow: inset 0 0 0 1.5px #c9c8c4; }
.beat-search svg { width: 16px; height: 16px; fill: none; stroke: #6b6b6b; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.beat-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 0; margin: 0; font: inherit; font-size: 15px; color: var(--ag-tinta); -webkit-appearance: none; appearance: none; }
.beat-search input::placeholder { color: #767676; }
.beat-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.beat-filter-toggle { position: relative; flex: none; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 14px; background: #f3f3f2; color: var(--ag-tinta); display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s ease; }
.beat-filter-toggle:hover, .beat-filter-toggle.is-open { background: #e8e8e6; }
.beat-filter-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.filter-count { position: absolute; top: -5px; right: -5px; display: none; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 20px; border: 2px solid #fff; background: #111; color: #fff; font-size: 11px; font-weight: 600; line-height: 1; align-items: center; justify-content: center; }
.filter-count.visible { display: inline-flex; }
.filter-panel { margin-top: 8px; background: #fff; border: 1px solid var(--ag-linea); border-radius: 14px; padding: 20px; }
.filter-section { margin-bottom: 22px; }
.filter-section:last-child { margin-bottom: 0; }
.filter-label { display: block; font-size: var(--ag-fs-etiqueta); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--ag-tinta-3); margin-bottom: 10px; }
.filter-bpm { display: flex; align-items: center; gap: 10px; }
.filter-bpm input { background: #f4f4f6; border: 1px solid transparent; border-radius: var(--ag-radio); color: #111; padding: 8px 10px; width: 80px; font: inherit; font-size: 14px; font-weight: 500; text-align: center; outline: none; -moz-appearance: textfield; }
.filter-bpm input:focus { border-color: #d6d6da; background: #fff; }
.filter-bpm input::-webkit-inner-spin-button, .filter-bpm input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.filter-bpm-sep { color: var(--ag-tinta-3); }
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-pill { display: inline-flex; align-items: center; padding: 5px 13px; border: none; border-radius: var(--ag-radio-pildora); background: #f2f2f4; color: var(--ag-tinta-2); font-size: var(--ag-fs-nota); font-weight: 500; line-height: 1.2; cursor: pointer; user-select: none; transition: background .15s ease, color .15s ease; }
.filter-pill:hover { background: #e8e8ec; color: #111; }
.filter-pill.active[data-filter="genre"] { background: #fef3c7; color: #92400e; }
.filter-pill.active[data-filter="mood"] { background: #e0e7ff; color: #3730a3; }
.filter-pill.active[data-filter="instrument"] { background: #ccfbf1; color: #115e59; }
.filter-note.active { background: #f3e8ff; color: #6b21a8; }
.filter-notes .filter-pill { min-width: 42px; justify-content: center; }
.key-mode { display: inline-flex; padding: 3px; margin-bottom: 10px; background: #f2f2f4; border-radius: var(--ag-radio-pildora); }
.key-mode-btn { border: none; background: transparent; color: var(--ag-tinta-3); font-size: var(--ag-fs-nota); font-weight: 500; padding: 4px 14px; border-radius: var(--ag-radio-pildora); cursor: pointer; }
.key-mode-btn.active { background: #fff; color: var(--ag-tinta); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.beat-active-chips { display: none; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.beat-active-chips.has-chips { display: flex; }
.filter-panel:not([hidden]) + .beat-active-chips { display: none; }
.active-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px 5px 13px; border: none; border-radius: 20px; font-size: 12px; font-weight: 500; line-height: 1.2; cursor: pointer; }
.active-chip svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; opacity: .7; }
.chip-genre { background: #fef3c7; color: #92400e; }
.chip-mood { background: #e0e7ff; color: #3730a3; }
.chip-instrument { background: #ccfbf1; color: #115e59; }
.chip-key { background: #f3e8ff; color: #6b21a8; }
.chip-bpm, .chip-search { background: #dbeafe; color: #1e40af; }
.chips-reset { border: none; background: transparent; color: #8a8a90; font-size: 12px; cursor: pointer; padding: 4px 2px; }
.chips-reset:hover { color: #111; text-decoration: underline; }

.beat-catalog-wrapper { width: 100%; max-width: 1080px; margin: 0 auto 60px; padding: 0 var(--ag-margen); }
.beat-sort { display: inline-flex; align-items: center; gap: 6px; height: 40px; margin: 6px 0 4px -8px; padding: 0 8px; border: 0; border-radius: 10px; background: none; color: #444; font-size: 13px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.beat-sort:hover { background: #f3f3f2; color: var(--ag-tinta); }
.beat-sort svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.beat-catalog-list { width: 100%; display: flex; flex-direction: column; border-top: 1px solid var(--ag-linea); }

/* Fila: portada con play · nombre · píldoras · BPM · tonalidad · comprar */
.beat-row { position: relative; width: 100%; min-height: 80px; display: grid; grid-template-columns: 64px 220px minmax(0,1fr) 90px 80px 42px; align-items: center; gap: 16px; padding: 8px 10px; border-bottom: 1px solid var(--ag-linea); transition: background .15s ease; }
.beat-row--simple { grid-template-columns: 64px minmax(0,1fr) 0 90px 80px 0; }
.beat-row:hover { background: #fafafa; }
.beat-row.is-playing { background: #f5f5f5; }
.beat-thumb { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.beat-cover { width: 100%; height: 100%; display: block; overflow: hidden; background: #eee; border-radius: 12px; }
@supports (corner-shape: squircle) { .beat-cover, .beat-play-btn { corner-shape: squircle; border-radius: 19px !important; } }
.beat-cover img { width: 100%; height: 100%; object-fit: cover; }
.beat-play-btn { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 12px; background: rgba(0,0,0,.12); color: #fff; display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s ease; }
.beat-play-btn:hover, .beat-row.is-playing .beat-play-btn { background: rgba(0,0,0,.32); }
.beat-play-btn svg { width: 20px; height: 20px; fill: currentColor; }
.beat-play-btn .i-pause, .beat-row.is-playing.is-sonando .beat-play-btn .i-play { display: none; }
.beat-row.is-playing.is-sonando .beat-play-btn .i-pause { display: block; }
.beat-play-btn.no-audio { background: transparent; cursor: default; }
.beat-play-btn.no-audio svg { display: none !important; }
.beat-main-info { min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 4px; }
.beat-title-line { min-width: 0; display: flex; align-items: center; gap: 10px; }
.beat-meta-mobile { display: none; font-size: var(--ag-fs-nota); color: var(--ag-tinta-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.beat-title-link { min-width: 0; color: var(--ag-tinta); text-decoration: none; font-size: var(--ag-fs-ui); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.beat-title-link:hover { text-decoration: underline; }
.beat-eq { display: none; flex: none; align-items: flex-end; gap: 2px; height: 14px; padding-right: 2px; }
.beat-row.is-playing.is-sonando .beat-eq { display: inline-flex; }
.beat-eq i { display: block; width: 3px; height: 14px; border-radius: 1.5px; background: var(--ag-tinta); transform-origin: bottom; animation: ag-beat-eq .9s ease-in-out infinite; }
.beat-eq i:nth-child(2) { animation-delay: .25s; }
.beat-eq i:nth-child(3) { animation-delay: .5s; }
@keyframes ag-beat-eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.beat-pills { min-width: 0; display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; padding: 2px 0; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
.beat-data { font-size: var(--ag-fs-nota); color: var(--ag-tinta-3); text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ag-pl-buy { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #000; color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; transition: transform .15s ease, opacity .15s ease; }
.ag-pl-buy svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ag-pl-buy:active { transform: scale(.95); }
.ag-pl-buy[disabled] { opacity: .35; cursor: default; }
.beat-empty { display: none; padding: 50px 20px; text-align: center; color: #777; font-size: 14px; border-bottom: 1px solid var(--ag-linea); }
.beat-empty.visible { display: block; }

/* Píldoras de colores (género, mood, instrumento) */
.beat-pill { display: inline-flex; align-items: center; flex-shrink: 0; padding: 4px 12px; border-radius: var(--ag-radio-pildora); font-size: var(--ag-fs-nota); font-weight: 500; line-height: 1.2; white-space: nowrap; text-decoration: none; transition: transform .15s ease, filter .15s ease; }
.beat-pill:hover { transform: translateY(-1px); filter: brightness(.95); }
.beat-pill-color-0 { background: #fef3c7; color: #92400e; }
.beat-pill-color-3 { background: #e0e7ff; color: #3730a3; }
.beat-pill-color-5 { background: #ccfbf1; color: #115e59; }

@media (max-width: 700px) {
  .filter-panel { padding: 18px; }
  .beat-search input { font-size: 16px; }
  .beat-row, .beat-row--simple { grid-template-columns: 58px minmax(0,1fr); gap: 14px; min-height: 78px; padding: 10px 0; cursor: pointer; }
  .beat-row:hover, .beat-row.is-playing { background: transparent; }
  .beat-thumb { width: 58px; height: 58px; }
  .beat-title-line .beat-eq { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
  .beat-row.is-playing .beat-main-info { padding-right: 28px; }
  .beat-row > :nth-child(n+3) { display: none !important; }
  .beat-meta-mobile { display: block; }
}

/* =========================================================
   PÁGINA DEL BEAT
   ========================================================= */
.ag-beat { max-width: 1360px; margin: 0 auto; padding: calc(var(--ag-header-h) + 36px) var(--ag-margen) 0; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.ag-beat__media { position: relative; border-radius: var(--ag-radio); overflow: hidden; background: var(--ag-superficie); aspect-ratio: 1; }
.ag-beat__media img { width: 100%; height: 100%; object-fit: cover; }
.ag-fav { position: absolute; right: 14px; bottom: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--ag-tinta); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.12); -webkit-tap-highlight-color: transparent; transition: transform .15s ease; }
.ag-fav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.ag-fav[aria-pressed="true"] svg { fill: #e0245e; stroke: #e0245e; }
.ag-fav:active { transform: scale(.92); }
.ag-beat__info { position: sticky; top: calc(var(--ag-header-h) + 24px); min-width: 0; }
.beat-meta-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.beat-meta-spec { font-size: var(--ag-fs-nota); font-weight: 500; color: var(--ag-tinta-2); }
.beat-meta-divider { color: var(--ag-tinta-3); font-size: 12px; }
.ag-beat__title { margin: 26px 0 30px; font-size: clamp(2rem, 4vw, 2.5rem); letter-spacing: -0.03em; }
.ag-beat__label { margin: 30px 0 12px; font-size: var(--ag-fs-ui); font-weight: 600; }

/* Producción completa (tarjeta naranja y formulario) */
.agpc-card { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 20px 1fr auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; width: 100%; padding: 14px 16px; background: var(--ag-naranja); color: var(--ag-tinta); border-radius: 14px; cursor: pointer; font-family: 'Archivo', system-ui, sans-serif; text-align: left; -webkit-tap-highlight-color: transparent; transition: filter .15s ease, transform .15s ease; }
.agpc-card:hover { filter: brightness(.97); }
.agpc-card:active { transform: scale(.99); }
.agpc-card:focus-visible { outline: 2px solid var(--ag-tinta); outline-offset: 3px; }
.agpc-ico { grid-column: 1; grid-row: 1/3; justify-self: center; display: grid; place-items: center; }
.agpc-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.agpc-name { grid-column: 2; grid-row: 1; font-size: 16px; font-weight: 500; line-height: 1.25; }
.agpc-sub { grid-column: 2; grid-row: 2; font-size: 12.5px; line-height: 1.35; color: rgba(3,3,2,.72); }
.agpc-amt { grid-column: 3; grid-row: 1/3; font-size: 16px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.agpc-modal { --ink: #030302; --fbg: var(--ag-naranja); position: fixed; inset: 0; background: rgba(3,3,2,.55); display: flex; align-items: center; justify-content: center; z-index: 1000001; padding: 16px; opacity: 0; transition: opacity .22s; }
.agpc-modal.agpc-in { opacity: 1; }
.agpc-form { position: relative; background: var(--fbg); border-radius: 8px; padding: 28px 24px 24px; width: min(460px, 100%); max-height: calc(100svh - 32px); overflow: auto; overscroll-behavior: contain; color: var(--ink); transform: translateY(12px) scale(.98); transition: transform .28s cubic-bezier(.2,.75,.2,1); }
.agpc-modal.agpc-in .agpc-form { transform: none; }
.agpc-form h2 { font-size: clamp(36px, 10vw, 52px); font-weight: 800; font-stretch: 72%; font-variation-settings: 'wdth' 72; line-height: .98; letter-spacing: -.03em; margin: 0 44px 8px 0; }
.agpc-x { position: absolute; top: 14px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; padding: 0; }
.agpc-beat { margin: 0; font-size: 14px; font-weight: 600; }
.agpc-lead { margin: 16px 0 0; font-size: 16px; line-height: 1.45; font-weight: 500; text-wrap: pretty; }
.agpc-inc { list-style: none; margin: 16px 0 0; padding: 0; }
.agpc-inc li { margin: 0; padding: 10px 0; border-top: 1.5px solid rgba(3,3,2,.22); font-size: 14px; line-height: 1.4; }
.agpc-inc li:last-child { border-bottom: 1.5px solid rgba(3,3,2,.22); }
.agpc-inc b { display: block; font-size: 16px; font-weight: 700; font-stretch: 90%; font-variation-settings: 'wdth' 90; line-height: 1.2; margin-bottom: 2px; }
.agpc-lab { display: block; font-size: 13px; font-weight: 500; opacity: .75; margin: 22px 0 8px; }
.agpc-form input[type=text], .agpc-form textarea { width: 100%; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0; padding: 8px 0 10px; font: 18px 'Archivo', sans-serif; color: var(--ink); background: transparent; outline: 0; resize: none; -webkit-appearance: none; appearance: none; }
.agpc-form input[type=text]:focus, .agpc-form textarea:focus { border-bottom-width: 3px; padding-bottom: 8.5px; }
.agpc-form textarea::placeholder { color: var(--ink); opacity: .45; }
.agpc-send { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 28px; background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 16px 28px; font: 600 16px 'Archivo', sans-serif; cursor: pointer; }
.agpc-send svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
.agpc-err { display: none; margin: 8px 0 0; font-size: 13px; font-weight: 600; }
.agpc-form.agpc-falta .agpc-err { display: block; }
.agpc-wa { display: none; margin: 16px 0 0; font-size: 14px; text-align: center; }
.agpc-wa a { font-weight: 700; text-underline-offset: 3px; }
.agpc-form.agpc-enviado .agpc-wa { display: block; }

/* Opciones de licencia (página del beat y hoja) */
.ag-lic, .ag-sheet__list { border: 1px solid var(--ag-linea); border-radius: 14px; overflow: hidden; }
.ag-opt { display: grid; grid-template-columns: 20px 1fr auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; width: 100%; padding: 14px 16px; background: #fff; color: var(--ag-tinta-2); border: 0; text-align: left; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ag-opt + .ag-opt { border-top: 1px solid var(--ag-linea); }
.ag-opt.ag-on { background: var(--ag-superficie); color: var(--ag-tinta); }
.ag-opt[disabled] { opacity: .45; cursor: default; }
.ag-radio { grid-column: 1; grid-row: 1 / 3; justify-self: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #c4c4c4; transition: border-width .15s ease; }
.ag-opt.ag-on .ag-radio { border: 5.5px solid var(--ag-tinta); }
.ag-name { grid-column: 2; grid-row: 1; font-size: 16px; font-weight: 500; line-height: 1.25; display: flex; align-items: baseline; gap: 8px; }
.ag-reco { font-size: var(--ag-fs-etiqueta); font-weight: 500; color: var(--ag-tinta-2); }
.ag-sub { grid-column: 2; grid-row: 2; font-size: 12.5px; line-height: 1.35; color: var(--ag-tinta-3); }
.ag-amt { grid-column: 3; grid-row: 1 / 3; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ag-opt.ag-on .ag-name, .ag-opt.ag-on .ag-amt { font-weight: 600; }
.ag-buy-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 58px; margin-top: 18px; border: 0; border-radius: 999px; background: #000; color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; transition: background .15s ease; }
.ag-buy-btn:hover { background: #1c1c1c; }
.ag-buy-btn[disabled] { opacity: .5; cursor: default; }
.ag-assure { margin: 14px 0 0; text-align: center; font-size: var(--ag-fs-nota); color: var(--ag-tinta-3); }
.ag-license-info { margin-top: 24px; border-top: 1px solid var(--ag-linea); border-bottom: 1px solid var(--ag-linea); }
.ag-license-info__summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; cursor: pointer; font-size: var(--ag-fs-ui); font-weight: 500; }
.ag-license-info__summary::-webkit-details-marker { display: none; }
.ag-license-info__chevron { width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: -4px 4px 0 0; transition: transform .2s ease; }
.ag-license-info[open] .ag-license-info__chevron { transform: rotate(-135deg); margin-top: 4px; }
.ag-license-info__list { margin: 0; padding: 0 0 0 18px; display: grid; gap: 8px; font-size: var(--ag-fs-ui); color: var(--ag-tinta-2); }
.ag-license-info__fine { margin: 14px 0 18px; font-size: var(--ag-fs-nota); color: var(--ag-tinta-3); }

/* Más beats */
.ag-mas-beats { max-width: 1360px; margin: 0 auto; padding: 80px var(--ag-margen) 0; }
.ag-mas-beats__titulo { margin: 0 0 20px; font-size: var(--ag-fs-seccion); }
.ag-mas-beats__todos { display: inline-block; margin-top: 22px; font-size: var(--ag-fs-ui); font-weight: 500; text-decoration: none; }
.ag-mas-beats__todos:hover { text-decoration: underline; }

@media (max-width: 989px) {
  .ag-beat { grid-template-columns: 1fr; gap: 28px; padding: var(--ag-header-h) 0 0; }
  .ag-beat__media { border-radius: 0 0 var(--ag-radio) var(--ag-radio); }
  .ag-beat__info { position: static; padding: 0 var(--ag-margen); }
  .ag-beat__title { margin: 20px 0 24px; }
  .ag-mas-beats { padding-top: 56px; }
}

/* =========================================================
   HOJA DE LICENCIAS (catálogo y reproductor)
   ========================================================= */
.ag-sheet-bg { position: fixed; inset: 0; z-index: 999997; background: rgba(0,0,0,.18); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.ag-sheet { position: fixed; left: 0; right: 0; bottom: var(--ag-player-h); z-index: 999998; max-width: 520px; margin: 0 auto; background: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.10); padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateY(16px); opacity: 0; pointer-events: none; visibility: hidden; transition: transform .22s ease, opacity .22s ease, visibility 0s .22s; }
html.ag-sheet-open .ag-sheet-bg { opacity: 1; pointer-events: auto; }
html.ag-sheet-open .ag-sheet { transform: none; opacity: 1; pointer-events: auto; visibility: visible; transition: transform .22s ease, opacity .22s ease; }
.ag-sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ag-sheet__title { margin: 0; font-size: var(--ag-fs-ui); font-weight: 600; line-height: 1.3; }
.ag-sheet__beat { margin: 2px 0 0; font-size: 12.5px; color: var(--ag-tinta-3); }
.ag-sheet__close { width: 30px; height: 30px; flex: none; border: 0; border-radius: 50%; background: #f1f1f1; cursor: pointer; padding: 0; display: grid; place-items: center; font-size: 16px; line-height: 1; }
.ag-sheet__cta { margin-top: 14px; width: 100%; height: 54px; border: 0; border-radius: 999px; background: #000; color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; }
.ag-sheet__cta[disabled] { opacity: .5; cursor: default; }
.ag-sheet__note { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: var(--ag-tinta-3); }

/* =========================================================
   CARRITO (panel lateral)
   ========================================================= */
.ag-drawer-bg { position: fixed; inset: 0; z-index: 1000002; background: rgba(3,3,2,.35); opacity: 0; transition: opacity .25s ease; }
.ag-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1000003; width: min(420px, 100%); background: #fff; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,.08); transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.75,.2,1); }
html.ag-cart-open .ag-drawer-bg { opacity: 1; }
html.ag-cart-open .ag-drawer { transform: none; }
.ag-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--ag-linea); }
.ag-drawer__title { font-size: var(--ag-fs-destacado); letter-spacing: -.01em; }
.ag-drawer__close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f1f1f1; font-size: 18px; line-height: 1; cursor: pointer; }
.ag-drawer__items { flex: 1; overflow: auto; padding: 0 20px; }
.ag-ci { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--ag-linea); }
.ag-ci img, .ag-ci__sin { width: 56px; height: 56px; border-radius: var(--ag-radio); object-fit: cover; background: var(--ag-superficie); }
.ag-ci__nombre { display: block; font-size: var(--ag-fs-ui); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-ci__lic { display: block; font-size: var(--ag-fs-nota); color: var(--ag-tinta-3); margin-top: 2px; }
.ag-ci__der { display: grid; justify-items: end; gap: 4px; }
.ag-ci__precio { font-size: var(--ag-fs-ui); font-weight: 600; font-variant-numeric: tabular-nums; }
.ag-ci__quitar { border: 0; background: none; padding: 0; font-size: var(--ag-fs-nota); color: var(--ag-tinta-3); text-decoration: underline; cursor: pointer; }
.ag-drawer__empty { padding: 48px 20px; text-align: center; color: var(--ag-tinta-2); }
.ag-drawer__empty p { margin: 0 0 18px; }
.ag-drawer__foot { padding: 18px 20px calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--ag-linea); }
.ag-drawer__total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; font-size: var(--ag-fs-texto); }
.ag-drawer__total strong { font-size: var(--ag-fs-destacado); font-variant-numeric: tabular-nums; }
.ag-drawer__note { margin: 10px 0 0; text-align: center; font-size: var(--ag-fs-nota); color: var(--ag-tinta-3); }

/* =========================================================
   REPRODUCTOR FIJO
   ========================================================= */
.ag-player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 999999; background: #fff; border-top: 1px solid rgba(0,0,0,.08); box-shadow: 0 -8px 24px rgba(0,0,0,.06); padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
.ag-player__in { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.ag-player__top { display: flex; align-items: center; gap: 12px; }
.ag-player__time { flex: none; min-width: 32px; font-size: 11px; font-weight: 500; color: #9a9a9a; font-variant-numeric: tabular-nums; }
.ag-player__time:last-child { text-align: right; }
.ag-player__wave { flex: 1; min-width: 0; height: 36px; cursor: pointer; }
.ag-player__bottom { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; column-gap: 8px; }
.ag-player__info { display: grid; grid-template-columns: 40px minmax(0,1fr); grid-template-rows: auto auto; column-gap: 8px; row-gap: 1px; align-items: center; min-width: 0; text-decoration: none; color: inherit; border-radius: var(--ag-radio); }
.ag-player__info:not([href]) { pointer-events: none; }
.ag-player__info:hover .ag-player__title { text-decoration: underline; text-underline-offset: 3px; }
.ag-player__thumb { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #eee; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.ag-player__title { grid-column: 2; font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-player__sub { grid-column: 2; font-size: 12px; line-height: 1.3; color: #9a9a9a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-player__controls { display: flex; align-items: center; gap: 10px; }
.ag-player__nav { width: 32px; height: 32px; border: 0; background: none; padding: 0; display: grid; place-items: center; cursor: pointer; color: #1a1a1a; }
.ag-player__nav svg { width: 18px; height: 18px; fill: currentColor; }
.ag-player__play { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f1f1f1; display: grid; place-items: center; cursor: pointer; padding: 0; }
.ag-player__play:hover { background: #e8e8e8; }
.ag-player__play svg { width: 16px; height: 16px; fill: #1a1a1a; }
.ag-player__play .i-pause, .ag-player.is-sonando .ag-player__play .i-play { display: none; }
.ag-player.is-sonando .ag-player__play .i-pause { display: block; }
.ag-player__end { display: flex; justify-content: flex-end; }
.ag-player .ag-pl-buy:not([disabled]) { animation: ag-codo 5s ease-in-out 1.2s infinite; }
@keyframes ag-codo { 0%, 8%, 16%, 100% { transform: translateX(0); } 4% { transform: translateX(-4px); } 12% { transform: translateX(-3px); } }

/* =========================================================
   FAVORITOS, CHECKOUT Y PÁGINAS DE TEXTO
   ========================================================= */
.ag-favs, .ag-checkout { max-width: 1080px; margin: 0 auto; padding: calc(var(--ag-header-h) + 48px) var(--ag-margen) 0; }
.ag-favs__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.ag-favs__title, .ag-checkout__title { font-size: var(--ag-fs-seccion); }
.ag-favs__count { color: var(--ag-tinta-3); font-weight: 400; font-size: var(--ag-fs-texto); letter-spacing: 0; }
.ag-favs__clear { border: 0; background: #f5f5f5; padding: 9px 16px; border-radius: 999px; font-size: 13px; cursor: pointer; }
.ag-favs__empty { text-align: center; padding: 56px 20px; color: var(--ag-tinta-2); }
.ag-favs__empty p { margin: 0 auto 20px; max-width: 36ch; }
.ag-checkout { max-width: 560px; }
.ag-checkout__title { margin-bottom: 24px; }
.ag-checkout__items { border-top: 1px solid var(--ag-linea); }
.ag-checkout__total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0; font-size: var(--ag-fs-texto); }
.ag-checkout__total strong { font-size: var(--ag-fs-destacado); }
.ag-checkout__aviso { margin: 0 0 18px; font-size: var(--ag-fs-ui); color: var(--ag-tinta-2); }
.ag-checkout__vacio { text-align: center; color: var(--ag-tinta-2); }
.ag-texto { max-width: 720px; margin: 0 auto; padding: calc(var(--ag-header-h) + 56px) var(--ag-margen) 0; font-size: var(--ag-fs-texto); line-height: 1.6; }
.ag-texto h1 { font-size: clamp(2rem, 5vw, 2.5rem); margin-bottom: 28px; }
.ag-texto h2 { font-size: var(--ag-fs-destacado); margin: 36px 0 12px; letter-spacing: -.01em; }
.ag-texto p, .ag-texto ul { margin: 0 0 14px; }
.ag-texto a { text-underline-offset: 3px; }
.ag-texto hr { border: 0; border-top: 1px solid var(--ag-linea); margin: 40px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Favoritos: la fila suma el botón "Quitar" */
.ag-favs .beat-row--simple { grid-template-columns: 64px minmax(0,1fr) 0 90px 80px auto; }
@media (max-width: 700px) {
  .ag-favs .beat-row--simple { grid-template-columns: 58px minmax(0,1fr) auto; }
  .ag-favs .beat-row > [data-sacar] { display: inline-flex !important; }
}
