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

*:not(dialog) {
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at top, rgba(14, 165, 233, 0.14), transparent 28%),
    linear-gradient(180deg, #f7fbff 0%, #eef4f9 100%);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: #10243b;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

ul, ol {
  padding: 0;
  list-style: none;
}

button {
  border: 0;
}

:focus-visible {
  outline: 3px solid #0ea5e9;
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  transform: translateY(-200%);
  background: #0f172a;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  z-index: 400;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-stack {
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.inline-form {
  margin: 0;
}

.text-link {
  color: #0f5ecd;
  font-weight: 700;
}

.text-link:hover {
  color: #0a4da9;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.navbar__container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #0f5ecd;
  font-weight: 800;
  font-size: 1.45rem;
}

.navbar__logo {
  height: 38px;
  width: auto;
  display: block;
}

.footer__logo {
  height: 44px;
  width: auto;
  display: block;
}

.navbar__toggle {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #eef4fb;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  cursor: pointer;
}

.navbar__toggle-bar {
  width: 18px;
  height: 2px;
  background: #10243b;
  border-radius: 999px;
}

.navbar__nav {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 1rem;
  right: 1rem;
  display: none;
  flex-direction: column;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #dbe6f0;
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.navbar__nav.is-open {
  display: flex;
}

.navbar__list,
.navbar__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.navbar__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  color: #516377;
}

.navbar__link:hover,
.navbar__link--secondary:hover {
  background: #eef4fb;
  color: #10243b;
}

.navbar__link--active {
  background: #10243b;
  color: #fff;
}

.navbar__link--active:hover {
  color: #fff;
}

.navbar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0.65rem 1.1rem;
  border-radius: 14px;
  background: #10243b;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.navbar__btn:hover {
  transform: translateY(-1px);
}

.navbar__btn--ghost {
  background: #eff4f9;
  color: #10243b;
  border: 1px solid #d3dde8;
}

.navbar__btn--link,
.hero__btn-action--link {
  text-decoration: none;
}

.navbar__welcome {
  color: #516377;
  font-size: 0.95rem;
}

@media (min-width: 900px) {
  .navbar__container {
    padding: 1rem 2rem;
  }

  .navbar__toggle {
    display: none;
  }

  .navbar__nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
    flex: 1;
  }

  .navbar__list,
  .navbar__actions {
    flex-direction: row;
    align-items: center;
  }
}

.hero {
  width: 100%;
  padding: 4rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.hero--home {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.14), transparent 22%),
    linear-gradient(135deg, #0f5ecd 0%, #12325d 100%);
  text-align: center;
}

.hero--news {
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12), transparent 20%),
    linear-gradient(135deg, #155e75 0%, #1e293b 100%);
  text-align: center;
}

.hero--station {
  position: relative;
  min-height: 58vh;
  padding: 0;
  justify-content: flex-end;
  align-items: flex-start;
}

.hero--station::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.2) 50%, rgba(15, 23, 42, 0.1) 100%);
  z-index: 2;
}

.hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero__title {
  margin-bottom: 0.65rem;
}

.hero__title--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.hero__subtitle {
  font-size: 1.08rem;
  opacity: 0.92;
  max-width: 680px;
  margin: 0 auto 1.5rem;
}

.hero__inline-link {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.hero__pill {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
}

.hero__btn-back,
.hero__btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  font-weight: 700;
}

.hero__btn-back {
  position: absolute;
  top: 1.25rem;
  left: 1rem;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  color: #10243b;
  padding: 0.55rem 0.9rem;
}

.hero__btn-action {
  background: #fff;
  color: #10243b;
  padding: 0.75rem 1.2rem;
}

.hero__btn-action--danger {
  background: #fee2e2;
  color: #991b1b;
}

.hero__info-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero__info-text {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1rem;
}

.hero__info-text--success {
  color: #4ade80;
  font-weight: 600;
}

@media (min-width: 768px) {
  .hero__content {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }

  .hero__btn-back {
    left: 2rem;
  }
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.station-card,
.news-card,
.panel,
.conditions,
.info-widget,
.legal-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(203, 213, 225, 0.65);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}

.station-card,
.news-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.station-card:hover,
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.1);
}

.news-card--static:hover {
  transform: none;
}

.station-card__figure,
.news-card__figure {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #dbe6f0;
  overflow: hidden;
}

.station-card__image,
.news-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.station-card__badge,
.news-card__tag {
  position: absolute;
  left: 0.75rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.station-card__badge {
  top: 0.75rem;
  background: #0f5ecd;
  padding: 0.3rem 0.7rem;
}

.station-card__favorite-form {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.station-card__favorite {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.station-card__content,
.news-card__content {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.station-card__name {
  margin-bottom: 0.25rem;
}

.station-card__location,
.news-card__date {
  color: #597086;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.station-card__location {
  margin-bottom: 1rem;
}

.station-card__data {
  margin-top: auto;
  border-top: 1px solid #e5edf5;
  padding-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.station-card__data-item {
  font-size: 0.92rem;
  font-weight: 600;
}

.station-card__footer {
  padding: 0 1.2rem 1.2rem;
}

.station-card__hint {
  padding: 0 1.2rem 1.2rem;
  text-align: center;
  color: #597086;
  font-size: 0.88rem;
}

.action-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.action-btn--neutral {
  background: #f1f5f9;
  color: #10243b;
  border: 1px solid #d6e1eb;
}

.action-btn--danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.news-card__tag {
  bottom: 0.75rem;
  padding: 0.35rem 0.7rem;
}

.news-card__tag--nevada {
  background: #0f5ecd;
}

.news-card__tag--consejos {
  background: #15803d;
}

.news-card__tag--general {
  background: #475569;
}

.news-card__tag--evento {
  background: #b45309;
}

.news-card__title {
  margin: 0.65rem 0 0.5rem;
}

.news-card__excerpt {
  color: #4b6075;
}

.news-card__more {
  margin-top: 1rem;
  color: #0f5ecd;
  font-size: 0.88rem;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: -1.5rem auto 3rem;
  max-width: 1000px;
  position: relative;
  z-index: 10;
  padding: 0 1rem;
}

.stats__item {
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.stats__item--near {
  background: #dcfce7;
  color: #166534;
}

.stats__item--avg {
  background: #dbeafe;
  color: #1d4ed8;
}

.stats__item--far {
  background: #ede9fe;
  color: #6d28d9;
}

.stats__title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
  opacity: 0.85;
}

.stats__value {
  font-size: 1.5rem;
  font-weight: 800;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.filters {
  padding: 1.5rem 0;
}

.filters__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filters__controls,
.button-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.button-row--center {
  justify-content: center;
}

.filters__view-btn,
.filters__btn,
.admin-pill,
.admin-action {
  border-radius: 999px;
  cursor: pointer;
}

.filters__view-btn {
  background: transparent;
  border: 1px solid #cad7e2;
  color: #597086;
  padding: 0.5rem 0.8rem;
  min-height: 42px;
}

.filters__view-btn--active,
.filters__btn--active {
  background: #fff;
  color: #10243b;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.filters__list {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.filters__list::-webkit-scrollbar {
  display: none;
}

.filters__btn {
  min-height: 42px;
  padding: 0.55rem 1rem;
  background: transparent;
  color: #597086;
  font-weight: 600;
  white-space: nowrap;
}

.panel {
  padding: 1.75rem;
}

.panel--form {
  max-width: 540px;
  margin: 0 auto;
}

.panel--centered {
  text-align: center;
}

.panel--empty {
  max-width: 560px;
  margin: 2rem auto 0;
  text-align: center;
}

.empty-state__icon {
  font-size: 2.6rem;
  margin-bottom: 0.5rem;
}

.alert {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.alert--success {
  background: #dcfce7;
  color: #166534;
}

.alert--error {
  background: #fee2e2;
  color: #991b1b;
}

.alert--warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-weight: 700;
}

.form-input {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
}

.form-input:focus {
  border-color: #0ea5e9;
}

.form-help,
.form-footnote {
  color: #597086;
}

.form-submit {
  width: 100%;
}

.form-footnote {
  margin-top: 1.25rem;
  text-align: center;
}

.station-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.station-layout__main,
.station-layout__aside {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.conditions,
.info-widget,
.legal-card {
  padding: 1.6rem;
}

.conditions__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

.conditions__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.conditions__label,
.info-widget__label {
  font-size: 0.9rem;
  color: #597086;
  font-weight: 600;
}

.conditions__value {
  font-size: 1.45rem;
  font-weight: 800;
}

.conditions__separator {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5edf5;
  text-align: center;
  color: #597086;
}

.text-success {
  color: #15803d;
}

.info-widget--highlight {
  text-align: center;
}

.info-widget__title {
  margin-bottom: 1rem;
}

.info-widget__value {
  font-size: 2.5rem;
  font-weight: 800;
  color: #15803d;
}

.info-widget__note {
  color: #597086;
}

.info-widget__list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.info-widget__list-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eef4f9;
}

.map-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 22px;
  border: 1px solid #dbe6f0;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
  margin-bottom: 3rem;
}

.map-card__canvas {
  width: 100%;
  min-height: 520px;
}

.legal-card__section + .legal-card__section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5edf5;
}

.legal-card p + p {
  margin-top: 0.85rem;
}

.footer {
  margin-top: 3rem;
  background:
    linear-gradient(180deg, #11253a 0%, #0b1728 100%);
  color: rgba(255, 255, 255, 0.72);
  padding-top: 3rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.footer__brand-title,
.footer__title {
  color: #fff;
}

.footer__brand-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.footer__title {
  margin-bottom: 0.8rem;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__link:hover {
  color: #fff;
}

.footer__legal {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  text-align: center;
  font-size: 0.88rem;
}

.admin-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.admin-table th {
  text-align: left;
  background: #f1f5f9;
  padding: 0.9rem 1rem;
}

.admin-table td {
  padding: 0.8rem 1rem;
  border-top: 1px solid #e5edf5;
  vertical-align: top;
}

.admin-table td:last-child,
.admin-table th:last-child {
  text-align: right;
}

.admin-table__actions {
  white-space: nowrap;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.15rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-pill--info {
  background: #dbeafe;
  color: #1d4ed8;
}

.admin-pill--muted {
  background: #f1f5f9;
  color: #475569;
}

.admin-action,
.admin-template-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.4rem 0.75rem;
  margin-left: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 10px;
}

.admin-action--view,
.admin-template-btn--edit {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.admin-action--warn {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.admin-action--role {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
}

.admin-action--danger,
.admin-template-btn--delete {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.admin-help {
  background: #f8fbfe;
  border: 1px solid #e2e8f0;
}

.admin-help ul {
  list-style: disc;
  padding-left: 1.25rem;
  color: #475569;
}

.admin-help li + li {
  margin-top: 0.4rem;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.6rem 1rem;
}

.admin-detail-grid dt {
  color: #597086;
  font-weight: 600;
}

.admin-favorites {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.admin-favorite-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}

.admin-favorite-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.admin-favorite-card__body {
  padding: 0.85rem 1rem;
}

.admin-muted {
  color: #597086;
}

.notificacion {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  max-width: 360px;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  background: #10243b;
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.notificacion.visible {
  opacity: 1;
}

.form-oculto {
  display: none;
}

.form-oculto.activo {
  display: block;
}

.oculto {
  display: none !important;
}

@media (min-width: 768px) {
  .conditions__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .conditions__row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .station-layout {
    grid-template-columns: 2fr 1fr;
  }

  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* ============================================================
   E-commerce: cesta de la compra y forfaits
   ============================================================ */

/* --- Botón de cesta en el header (icono + badge + dropdown) --- */
.cart-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cart-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #eef4fb;
  color: #10243b;
  border: 1px solid #d3dde8;
  cursor: pointer;
}

.cart-button:hover {
  background: #e2ecf6;
}

.cart-button--has-items {
  color: #0f5ecd;
}

.cart-button--active {
  background: #10243b;
  color: #fff;
}

.cart-button__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #0f5ecd;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}

.cart-dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  width: min(320px, 90vw);
  background: #fff;
  border: 1px solid #dbe6f0;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  padding: 1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;

  /* Por defecto oculto; se muestra al pasar el ratón sobre el botón
     o cuando hay foco dentro (accesibilidad: teclado). */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease,
    transform 0.18s ease;
}

/* Puente invisible entre botón y dropdown para que el ratón pueda
   atravesar el hueco sin que se cierre. */
.cart-dropdown::before {
  content: "";
  position: absolute;
  top: -0.4rem;
  left: 0;
  right: 0;
  height: 0.4rem;
}

.cart-wrapper:hover .cart-dropdown,
.cart-wrapper:focus-within .cart-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Mientras el HTML aún tenga el atributo `hidden` (antes de que el JS lo
   quite), no debe ocupar espacio ni recibir eventos. */
.cart-dropdown[hidden] {
  display: none;
}

.cart-dropdown__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #10243b;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e5edf5;
}

.cart-dropdown__items {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cart-dropdown__item {
  background: #f8fafc;
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
}

.cart-dropdown__item-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #10243b;
}

.cart-dropdown__item-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: #4b6075;
}

.cart-dropdown__empty {
  text-align: center;
  color: #597086;
  padding: 0.5rem 0;
  margin: 0;
}

.cart-dropdown__footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e5edf5;
}

.cart-dropdown__subtotal {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  color: #10243b;
}

.cart-dropdown__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  text-align: center;
}

.cart-dropdown__btn--ghost {
  background: #eff4f9;
  color: #10243b;
  border: 1px solid #d3dde8;
}

.cart-dropdown__btn--ghost:hover {
  background: #e2ecf6;
}

.cart-dropdown__btn--primary {
  background: #10243b;
  color: #fff;
}

.cart-dropdown__btn--primary:hover {
  background: #0b1728;
}

@media (max-width: 899px) {
  .cart-dropdown {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* --- Tarjeta de compra dentro de la página de estación --- */
.forfait-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(203, 213, 225, 0.65);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.forfait-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-bottom: 1px solid #e5edf5;
  padding-bottom: 0.8rem;
}

.forfait-card__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #10243b;
}

.forfait-card__price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0;
}

.forfait-card__price strong {
  font-size: 1.9rem;
  font-weight: 800;
  color: #0f5ecd;
}

.forfait-card__price span {
  color: #597086;
  font-weight: 600;
}

.forfait-card__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.forfait-card__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.forfait-card__label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #516377;
}

.forfait-card__input,
.forfait-card__select {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  font-size: 0.95rem;
  color: #10243b;
}

.forfait-card__input:focus,
.forfait-card__select:focus {
  border-color: #0ea5e9;
  outline: none;
}

.forfait-card__summary {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: #4b6075;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
}

.forfait-card__summary strong {
  color: #10243b;
}

.forfait-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  background: #16a34a;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  border: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.forfait-card__cta:hover:not([disabled]) {
  background: #15803d;
  transform: translateY(-1px);
}

.forfait-card__cta[disabled] {
  background: #94a3b8;
  cursor: not-allowed;
}

.forfait-card__feedback {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.forfait-card__feedback--success {
  color: #15803d;
}

.forfait-card__feedback--error {
  color: #991b1b;
}

/* --- Listado /forfaits (tarjetas de estación con precios) --- */
.forfait-grid {
  margin-top: 2rem;
}

.forfait-station-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(203, 213, 225, 0.65);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.forfait-station-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.1);
}

.forfait-station-card__figure {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #dbe6f0;
  overflow: hidden;
}

.forfait-station-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.forfait-station-card__price-tag {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: #16a34a;
  color: #fff;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.25);
}

.forfait-station-card__body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.forfait-station-card__name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #10243b;
}

.forfait-station-card__location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #597086;
  font-size: 0.92rem;
  margin: 0;
}

.forfait-station-card__price-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin: 0;
}

.forfait-station-card__price-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: #4b6075;
}

.forfait-station-card__price-list strong {
  color: #10243b;
}

.forfait-station-card__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  background: #10243b;
  color: #fff;
  font-weight: 700;
}

.forfait-station-card__cta:hover {
  background: #0b1728;
  color: #fff;
}

/* --- Página /cesta --- */
.cart-page__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 2rem 0 3rem;
}

.cart-page__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-line {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid #dbe6f0;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.cart-line__media {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  overflow: hidden;
  background: #e5edf5;
}

.cart-line__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-line__media-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.cart-line__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-line__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #10243b;
}

.cart-line__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.88rem;
  color: #597086;
  margin: 0;
}

.cart-line__meta div {
  display: flex;
  flex-direction: column;
}

.cart-line__meta dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #94a3b8;
}

.cart-line__meta dd {
  margin: 0;
  font-weight: 600;
  color: #10243b;
}

.cart-line__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.cart-line__qty {
  width: 76px;
  min-height: 38px;
  padding: 0.4rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-weight: 600;
}

.cart-line__remove {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 0.45rem 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.cart-line__remove:hover {
  background: #fee2e2;
}

.cart-line__total {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid #e5edf5;
  font-weight: 700;
}

.cart-line__total strong {
  font-size: 1.15rem;
  color: #0f5ecd;
}

.cart-page__summary {
  position: sticky;
  top: 100px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-page__summary-title {
  margin: 0;
}

.cart-page__summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-page__summary-row {
  display: flex;
  justify-content: space-between;
  color: #4b6075;
}

.cart-page__summary-row dt,
.cart-page__summary-row dd {
  margin: 0;
}

.cart-page__summary-row--total {
  padding-top: 0.65rem;
  border-top: 1px solid #e5edf5;
  font-weight: 800;
  color: #10243b;
  font-size: 1.1rem;
}

.cart-page__checkout {
  width: 100%;
}

.cart-page__clear {
  background: transparent;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 0.55rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.cart-page__clear:hover {
  background: #fef2f2;
}

.cart-page__note {
  font-size: 0.85rem;
  color: #597086;
  margin: 0;
}

@media (min-width: 900px) {
  .cart-page__layout {
    grid-template-columns: 2fr 1fr;
  }

  .cart-line {
    grid-template-columns: 120px 1fr 160px;
  }

  .cart-line__total {
    grid-column: 3;
    border-top: 0;
    padding-top: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
  }
}


/* ─── Estado de pistas en directo (página /pistas y widget home) ──── */

.pistas-state {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  color: #4b6075;
}

.pistas-state p {
  margin: 0;
  text-align: center;
}

.pistas-state__aviso {
  margin-top: 0.5rem !important;
  font-size: 0.9rem;
  color: #597086;
}

.pistas-state--cargando {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

.pistas-state--error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.pistas-state--vacio {
  background: #f8fafc;
  color: #4b6075;
}

.pistas-cities {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pistas-cities__label {
  margin: 0;
  font-weight: 600;
  color: #10243b;
}

.pistas-cities__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pistas-cities__chip {
  padding: 0.45rem 0.95rem;
  background: #eef4fb;
  border-radius: 999px;
  font-weight: 600;
  color: #0f5ecd;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.pistas-cities__chip:hover {
  background: #dbeafe;
}

.pistas-cities__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}

.pistas-cities__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 200px;
}

.pistas-cities__field span {
  font-size: 0.85rem;
  color: #597086;
}

.pistas-cities__field input {
  padding: 0.55rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}

.pistas-cities__field input:focus-visible {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
}

/* Tarjetas de pista en /pistas */

.pista-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem;
}

.pista-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.pista-card__name {
  margin: 0;
  font-size: 1.15rem;
  color: #10243b;
}

.pista-card__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
}

.pista-card__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.pista-card__status--abierta {
  background: #dcfce7;
  color: #166534;
}

.pista-card__status--parcial {
  background: #fef9c3;
  color: #854d0e;
}

.pista-card__status--cerrada {
  background: #fee2e2;
  color: #991b1b;
}

.pista-card__distance {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: #16a34a;
  font-weight: 600;
  font-size: 0.9rem;
}

.pista-card__metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 1rem;
  margin: 0;
}

.pista-card__metric {
  display: flex;
  flex-direction: column;
}

.pista-card__metric dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #597086;
  font-weight: 600;
}

.pista-card__metric dd {
  margin: 0;
  font-weight: 700;
  color: #10243b;
}

.pista-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e5edf5;
  font-size: 0.85rem;
}

.pista-card__quality {
  color: #4b6075;
}

/* Widget de home: 3 pistas en directo */

.pistas-home {
  margin-top: 2rem;
}

.pistas-home__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pistas-home__aviso {
  margin: 0;
  color: #597086;
  font-size: 0.9rem;
}

.pistas-home__list {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .pistas-home__list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pistas-home__card {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pistas-home__name {
  margin: 0;
  font-size: 1.05rem;
  color: #10243b;
}

.pistas-home__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  align-self: flex-start;
}

.pistas-home__data {
  margin: 0;
  font-size: 0.88rem;
  color: #4b6075;
}

.pistas-home__link {
  align-self: flex-end;
  font-size: 0.9rem;
}
