/* =========================================================
   Tienda: productos (ropa y merchandising) y torneos
   (usa los colores y tipografías de site.css)
   ========================================================= */

.shop { background: var(--fondo); }
.shop--white { background: var(--blanco); }
.shop__inner { padding-top: 48px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 26px; }
.shop--white .shop__inner { padding-top: 56px; padding-bottom: 72px; }
.shop__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.shop__title { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; }
.shop__title--muted { color: var(--suave); margin-top: 18px; }
.shop__note { font-size: 16px; color: var(--suave); max-width: 52ch; }
.shop__note--box { background: var(--blanco); border-radius: 16px; padding: 22px 24px; max-width: none; font-size: 17px; }

/* Filtros por categoría */
.shop-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-filter a { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--linea); background: var(--blanco); color: var(--texto); text-decoration: none; font-weight: 600; font-size: 15px; }
.shop-filter a:hover { border-color: var(--granate); color: var(--granate); }
.shop-filter a[aria-current="page"] { background: var(--granate); border-color: var(--granate); color: var(--blanco); }

/* Tarjetas de producto */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.shop-card { display: flex; flex-direction: column; background: var(--blanco); border-radius: 18px; overflow: hidden; color: var(--texto); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.shop--white .shop-card { background: var(--fondo); }
.shop-card:hover { color: var(--texto); transform: translateY(-4px); box-shadow: 0 18px 40px rgba(19,33,63,.12); }
.shop-card__media { position: relative; aspect-ratio: 1 / 1; background: #F7F5F6; display: block; }
.shop--white .shop-card__media { background: #ECE9EB; }
.shop-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .35s ease; }
.shop-card__media img.is-placeholder { padding: 22%; opacity: .25; filter: grayscale(1); }
.shop-card:hover .shop-card__media img { transform: scale(1.04); }
.shop-card__flag { position: absolute; left: 12px; top: 12px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--azul); color: var(--blanco); }
.shop-card__flag--agotado { background: #5A6278; }
.shop-card__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1 1 auto; }
.shop-card__cat { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--granate); }
.shop-card__name { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1; }
.shop-card__text { font-size: 15px; color: var(--suave); line-height: 1.4; }
.shop-card__foot { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.shop-card__price { font-family: var(--display); font-weight: 900; font-size: 30px; line-height: 1; color: var(--granate); }
.shop-card__price--ask { font-family: var(--body); font-size: 16px; font-weight: 700; }
.shop-card__sizes { font-size: 14px; color: var(--suave); }

/* Ficha de producto */
.product { background: var(--fondo); }
.product > .wrap { padding-top: 32px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 40px; }
.product__crumbs { font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px; color: var(--suave); }
.product__crumbs a { font-weight: 600; }
.product__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: start; }
.product__gallery { display: flex; flex-direction: column; gap: 12px; }
.product__main { background: var(--blanco); border-radius: 22px; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product__main img { width: 100%; height: 100%; object-fit: contain; padding: 22px; }
.product__main img.is-placeholder { padding: 25%; opacity: .25; filter: grayscale(1); }
.product__thumbs { display: flex; gap: 10px; }
.product__thumbs button { width: 86px; height: 86px; padding: 6px; border-radius: 14px; border: 2px solid transparent; background: var(--blanco); cursor: pointer; }
.product__thumbs button[aria-current="true"] { border-color: var(--granate); }
.product__thumbs img { width: 100%; height: 100%; object-fit: contain; }
.product__info { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; position: sticky; top: calc(var(--nav-h) + 24px); }
.product__cat { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--granate); }
.product__name { font-family: var(--display); font-weight: 900; font-size: clamp(44px, 5vw, 72px); line-height: .9; }
.product__price { font-family: var(--display); font-weight: 900; font-size: 48px; line-height: 1; color: var(--granate); }
.product__stock { font-size: 14px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: #E3F4EA; color: #146C3A; }
.product__stock--encargo { background: #E6ECF7; color: #22417A; }
.product__stock--agotado { background: #EEE9EC; color: var(--suave); }
.product__lead { font-size: 19px; line-height: 1.5; }
.product__label { font-size: 14px; font-weight: 700; color: var(--suave); }
.product__sizes { display: flex; flex-direction: column; gap: 8px; }
.product__sizes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.product__sizes li { min-width: 48px; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--linea); background: var(--blanco); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.product__buy { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 18px; border-top: 1px solid var(--linea); width: 100%; }
.product__buy p { font-size: 15px; color: var(--suave); max-width: 46ch; }
.product__desc { max-width: 860px; display: flex; flex-direction: column; gap: 16px; }
.product__desc h2 { font-family: var(--display); font-weight: 800; font-size: 36px; line-height: 1; }

/* Torneos */
.tour-list { display: flex; flex-direction: column; gap: 14px; }
.tour-card { display: grid; grid-template-columns: 110px auto minmax(0, 1fr) auto; align-items: center; gap: 20px 24px; padding: 18px 22px 18px 18px; border-radius: 18px; background: var(--blanco); color: var(--texto); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.tour-card:hover { color: var(--texto); transform: translateY(-3px); box-shadow: 0 16px 34px rgba(19,33,63,.1); }
.tour-card__date { width: 110px; height: 110px; border-radius: 16px; background: var(--granate); color: var(--blanco); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.tour-card__date strong { font-family: var(--display); font-weight: 900; font-size: 46px; line-height: .9; }
.tour-card__date--range strong { font-size: 34px; }
.tour-card__date span { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--oro); }
.tour-card__img { width: 150px; height: 110px; object-fit: cover; border-radius: 14px; }
.tour-card__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; grid-column: 3; }
.tour-card__status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--granate); }
.tour-card__dot { width: 8px; height: 8px; border-radius: 50%; background: #1F9D55; }
.tour-card__name { font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1; }
.tour-card__meta { font-size: 16px; color: var(--suave); }
.tour-card__text { font-size: 15px; color: var(--suave); }
.tour-card__cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tour-card__cats span { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--fondo); }
.tour-card__side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; grid-column: 4; }
.tour-card__price { font-family: var(--display); font-weight: 900; font-size: 34px; line-height: 1; color: var(--granate); display: flex; flex-direction: column; align-items: flex-end; }
.tour-card__price small { font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--suave); }
.tour-card__go { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 18px; border-radius: 999px; background: var(--oro); color: var(--azul); font-weight: 700; font-size: 15px; }
.tour-card--past { background: rgba(255,255,255,.6); }
.tour-card--past .tour-card__date { background: var(--suave); }
.tour-card--past .tour-card__go { background: var(--fondo); }

.tour { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.tour__main { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.tour__img { width: 100%; max-height: 560px; object-fit: cover; border-radius: 18px; }
.tour__card { position: sticky; top: calc(var(--nav-h) + 24px); background: var(--blanco); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; border-top: 6px solid var(--oro); }
.tour__empty { background: var(--blanco); border-radius: 18px; padding: 28px; font-size: 18px; color: var(--suave); }
.tour__card p { font-size: 15px; color: var(--suave); }
.tour__status { font-weight: 700; font-size: 15px; padding: 5px 12px; border-radius: 999px; background: #EEE9EC; color: var(--suave); }
.tour__status.is-open { background: #E3F4EA; color: #146C3A; }
.tour__facts { margin: 0; width: 100%; display: flex; flex-direction: column; }
.tour__facts div { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid #EEE9EC; }
.tour__facts div:first-child { border-top: 0; padding-top: 0; }
.tour__facts dt { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--granate); }
.tour__facts dd { margin: 0; font-size: 17px; font-weight: 600; }

/* Torneos de nuestros equipos: pagos de las familias */
.shop__head { display: flex; flex-direction: column; gap: 6px; }
.shop__head + .tour-list { margin-top: -10px; }
.tour-list + .shop__head { margin-top: 18px; }
.tour-card--teams .tour-card__date { background: var(--azul); }
.tour__kind { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--granate); }
.tour__pays { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.tour__pays li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--fondo); }
.tour__pays li span { display: flex; flex-direction: column; font-weight: 600; }
.tour__pays li small { font-weight: 400; font-size: 13px; color: var(--suave); }
.tour__pays li strong { white-space: nowrap; font-family: var(--display); font-weight: 900; font-size: 26px; line-height: 1; color: var(--granate); }
.tour__pays li.is-closed { opacity: .55; }
.tour-pay { width: 100%; display: flex; flex-direction: column; gap: 16px; border-top: 1px solid #EEE9EC; padding-top: 18px; }
.tour-pay .cf-field input, .tour-pay .cf-field select { min-height: 48px; font-size: 16px; }
.tour-pay .camp-alert { margin: 0; font-size: 15px; }
.tour-opts { display: flex; flex-direction: column; gap: 8px; }
.tour-opt { position: relative; cursor: pointer; }
.tour-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tour-opt > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 10px 16px; border-radius: 14px; border: 1.5px solid var(--linea); background: var(--blanco); transition: border-color .15s, background .15s, color .15s; }
.tour-opt__label { display: flex; flex-direction: column; font-weight: 600; }
.tour-opt__label small { font-weight: 400; font-size: 13px; color: var(--suave); }
.tour-opt strong { white-space: nowrap; font-family: var(--display); font-weight: 900; font-size: 26px; line-height: 1; color: var(--granate); }
.tour-opt:hover > span { border-color: var(--granate); }
.tour-opt input:checked + span { border-color: var(--granate); background: var(--granate); color: var(--blanco); }
.tour-opt input:checked + span small, .tour-opt input:checked + span strong { color: var(--oro); }
.tour-opt input:focus-visible + span { outline: 3px solid var(--oro); outline-offset: 2px; }
.cf-field.is-bad .tour-opt > span { border-color: #B42318; }
.tour-pay__btn { justify-content: center; width: 100%; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.tour-pay__btn:disabled { opacity: .7; cursor: wait; }
.tour-pay__note { margin: 0; }
.tour-done { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; border-top: 1px solid #EEE9EC; padding-top: 18px; }
.tour-done__icon { width: 46px; height: 46px; border-radius: 50%; background: #1F9D55; display: inline-flex; align-items: center; justify-content: center; }
.tour-done__icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tour-done__title { font-family: var(--display); font-weight: 900; font-size: 34px; line-height: 1; }
.tour-done__list { margin: 0; width: 100%; display: flex; flex-direction: column; }
.tour-done__list div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #EEE9EC; }
.tour-done__list dt { color: var(--suave); font-size: 15px; }
.tour-done__list dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.tour-done__small { font-size: 14px !important; }

@media (max-width: 900px) {
  .product__grid, .tour { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .product__info, .tour__card { position: static; }
  .tour-card { grid-template-columns: 84px minmax(0, 1fr); padding: 16px; gap: 14px 16px; }
  .tour-card__date { width: 84px; height: 84px; align-self: start; }
  .tour-card__date strong { font-size: 36px; }
  .tour-card__date--range strong { font-size: 26px; }
  .tour-card__img { display: none; }
  .tour-card__body { grid-column: 2; }
  .tour-card__side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .tour-card__price { align-items: flex-start; }
}
@media (max-width: 640px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .shop-card__body { padding: 12px 12px 14px; }
  .shop-card__name { font-size: 21px; }
  .shop-card__price { font-size: 24px; }
  .shop-card__text { display: none; }
  .shop__title { font-size: 32px; }
  .product__thumbs button { width: 70px; height: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .shop-card, .shop-card__media img, .tour-card { transition: none; }
  .shop-card:hover, .tour-card:hover { transform: none; }
}

/* Comprar desde la ficha del producto (cesta) */
.product__buy--cart { gap: 14px; }
.buy-row { display: flex; flex-wrap: wrap; gap: 12px; }
.buy-field { display: flex; flex-direction: column; gap: 6px; }
.buy-field select { min-height: 48px; min-width: 150px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--linea); background: var(--blanco); font: inherit; font-size: 16px; font-weight: 700; color: var(--texto); }
.buy-field--qty select { min-width: 90px; }
.buy-field select:focus { outline: none; border-color: var(--granate); box-shadow: 0 0 0 3px rgba(107,21,38,.15); }
.buy-btn { border: 0; cursor: pointer; font-size: 17px; }
.buy-msg { font-weight: 700; color: #146C3A !important; background: #E3F4EA; padding: 10px 14px; border-radius: 10px; }
.buy-msg.is-bad { color: #B42318 !important; background: #FDECEA; }
.buy-msg a { color: inherit; }

/* Torneos propios: fotos de cabecera que van pasando e inscripción de equipos */
.tour__slides { position: relative; width: 100%; aspect-ratio: 3 / 2; max-height: 560px; border-radius: 18px; overflow: hidden; background: var(--azul); }
.tour__slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity 1.2s ease, transform 6s ease-out; }
.tour__slides img.is-on { opacity: 1; transform: scale(1.09); }
@media (prefers-reduced-motion: reduce) { .tour__slides img { transition: opacity .3s ease; transform: none !important; } }
.tour-entry .cf-check { padding: 0; background: none; }
.tour-entry .cf-check span { font-size: 15px; }
.tour-entry .cf-error:empty { display: none; }
.tour-entry .tour-opt strong { font-size: 24px; }
.tour-bank { width: 100%; border: 1.5px dashed var(--oro); border-radius: 14px; padding: 12px 14px; background: #FFFBF2; }
.tour-bank p { margin: 0 0 4px; color: var(--texto); font-weight: 600; }
.tour-bank dd { font-weight: 700; text-align: right; word-break: break-word; }
.tour-done [hidden], .tour-entry[hidden], .tour-done[hidden] { display: none; }
/* En la página de un torneo, los bloques anchos del editor se quedan en su columna (no pasan por debajo de la ficha). */
.tour__main .prose > .cba-wide { width: 100%; max-width: 100%; }
