/* =========================================================
   BLUUPI — EXPLORE MOBILE
   Fichier : /app/assets/styles/pages/explore.css
========================================================= */

/* =========================================================
   1. VARIABLES
========================================================= */

:root {
  --primary: #0E3E61;
  --blue: #127194;
  --light-blue: #3CA6D6;

  --bg: #f5f9fc;
  --page-bg: #eef3f7;
  --card: #ffffff;

  --text: #102f46;
  --muted: #6d7d8b;
  --line: #e5edf3;

  --shadow: 0 18px 40px rgba(14, 62, 97, 0.12);
  --soft-shadow: 0 10px 24px rgba(14, 62, 97, 0.08);
}

/* =========================================================
   2. BASE MOBILE
========================================================= */

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
  background: var(--page-bg);
}

body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page-bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font-family: inherit;
}

button {
  cursor: pointer;
}

/* =========================================================
   3. CONTAINER APP MOBILE
========================================================= */

.app {
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 20px 120px;
  background: var(--bg);
}

/* =========================================================
   4. HEADER OPTIONNEL
========================================================= */

.explore-header {
  margin-bottom: 24px;
}

.explore-logo {
  width: 150px;
  margin-bottom: 28px;
}

.explore-header h1 {
  margin: 0 0 8px;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.045em;
  color: var(--primary);
}

.explore-header p {
  margin: 0;
  font-size: 17px;
  color: var(--muted);
}

/* =========================================================
   5. FILTRES — STRUCTURE MOBILE
========================================================= */

.explore-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin: 22px 0 28px;
}

/* Recherche ville */

.filter-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 62px;
  padding: 0 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.filter-search span {
  flex: 0 0 auto;
  font-size: 22px;
}

.filter-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 17px;
  color: var(--text);
}

.filter-search input::placeholder {
  color: #a8b2bc;
}

/* Catégorie principale pleine largeur */

.filter-category-row {
  width: 100%;
}

.filter-category-row select {
  width: 100%;
  min-width: 0;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  padding: 0 42px 0 18px;
  outline: 0;
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Ligne principale : Edad + Subcategoría */

.filter-row {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 12px;
  width: 100%;
}

.filter-row select {
  width: 100%;
  min-width: 0;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  padding: 0 36px 0 14px;
  outline: 0;
  box-shadow: 0 6px 18px rgba(14, 62, 97, 0.05);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Ligne extra : Fecha + Altura + Precio */

.filter-extra-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.filter-extra-row input,
.filter-extra-row select {
  width: 100%;
  min-width: 0;
  height: 54px;
  box-sizing: border-box;

  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  color: var(--text);

  font-size: 14px;
  font-weight: 600;
  padding: 0 12px;

  outline: 0;
  box-shadow: 0 6px 18px rgba(14, 62, 97, 0.05);

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  appearance: none;
  -webkit-appearance: none;
}

/* Placeholder du champ Fecha */

.filter-extra-row input::placeholder {
  color: var(--text);
  opacity: 1;
}

.filter-date-input {
  text-align: left;
}

/* Pour éviter les débordements spécifiques aux inputs date */

.filter-extra-row input[type="date"] {
  font-size: 13px;
  padding: 0 8px;
}

.filter-extra-row input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}

.filter-extra-row input[type="date"]::-webkit-calendar-picker-indicator {
  margin: 0;
  padding: 0;
}

/* Ancien bloc neutralisé si encore présent */

.filter-secondary-row,
.subcategory-row {
  width: 100%;
  margin: 0;
}

/* =========================================================
   6. FILTRES RAPIDES
========================================================= */

.quick-filter-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  overflow: hidden;
}

.quick-filter-row button {
  min-width: 0;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: #eaf1f6;
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.quick-filter-row button.active {
  background: var(--primary);
  color: #ffffff;
}

/* Bouton filtrer */

.filter-submit {
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 20px;
  background: var(--primary);
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(14, 62, 97, 0.18);
}

/* =========================================================
   7. LISTE DES ACTIVITÉS
========================================================= */

.explore-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

/* =========================================================
   8. CARTE ACTIVITÉ
========================================================= */

.explore-card {
  width: 100%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.explore-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eaf2f7;
}

.explore-img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Badge catégorie */

.badge-category {
  position: absolute;
  top: 14px;
  left: 14px;
  max-width: calc(100% - 86px);
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Favori */

.heart-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary);
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.heart-btn.is-favorite,
.favorite-btn.is-favorite {
  color: #e63946;
}

/* Contenu carte */

.explore-card-content {
  padding: 20px;
}

.title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.title-row h2 {
  margin: 0;
  color: var(--primary);
  font-size: 27px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.rating {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.activity-desc {
  margin: 13px 0 16px;
  color: #40576a;
  font-size: 17px;
  line-height: 1.45;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}

.meta-row span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f0f6fa;
  color: #607080;
  font-size: 13px;
  font-weight: 800;
}

/* Prix */

.price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.price-public,
.price-bluupi {
  padding: 12px;
  border-radius: 16px;
  background: #f5f9fc;
}

.price-public small,
.price-bluupi small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.price-public span {
  color: #8b97a3;
  font-size: 18px;
  font-weight: 900;
  text-decoration: line-through;
}

.price-bluupi strong {
  color: var(--blue);
  font-size: 23px;
  font-weight: 900;
}

.price-box.free {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #eafaf0;
  color: #159447;
  font-size: 22px;
  font-weight: 900;
}

/* CTA carte */

.card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  border-radius: 18px;
  background: var(--primary);
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
}

/* Message vide */

.explore-empty,
.app > p {
  margin: 24px 0;
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--soft-shadow);
}

/* =========================================================
   9. NAVIGATION MOBILE
========================================================= */

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 460px);
  height: 82px;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #8a98a6;
  font-size: 12px;
  font-weight: 650;
}

.bottom-nav i {
  width: 25px;
  height: 25px;
  stroke-width: 2;
}

.bottom-nav small {
  font-size: 12px;
  font-weight: 650;
}

.bottom-nav a.active {
  color: var(--blue);
}

/* =========================================================
   10. AJUSTEMENTS PETITS MOBILES
========================================================= */

@media (max-width: 430px) {
  .app {
    padding: 28px 18px 118px;
  }

  .filter-search {
    height: 60px;
    border-radius: 22px;
  }

  .filter-category-row select {
    height: 56px;
    font-size: 15px;
  }

  .filter-row,
  .filter-secondary-row {
    grid-template-columns: 0.72fr 1.28fr;
    gap: 10px;
  }

  .filter-row select,
  .filter-secondary-row select {
    height: 56px;
    font-size: 15px;
  }

  .quick-filter-row {
    gap: 8px;
  }

  .quick-filter-row button {
    height: 46px;
    font-size: 13px;
    padding: 0 10px;
  }

  .filter-submit {
    height: 56px;
    font-size: 17px;
  }

  .explore-card {
    border-radius: 28px;
  }

  .title-row h2 {
    font-size: 26px;
  }
}

@media (max-width: 380px) {
  .app {
    padding-left: 14px;
    padding-right: 14px;
  }

  .filter-row,
  .filter-secondary-row {
    grid-template-columns: 1fr;
  }

  .quick-filter-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .title-row {
    flex-direction: column;
  }

  .rating {
    align-self: flex-start;
  }
}

/* Éléments desktop cachés sur mobile */
.desktop-header,
.desktop-footer{
  display:none;
}