/* ═══════════════════════════════════════════════════════════════════════════
   GelatoMaps · perfil del usuario con aspecto de app — MÓVIL PRIMERO (19-nov-2026)
   Viste la capa «gmp-» de mi-perfil.html con el mismo lenguaje que el panel
   del heladero (variables --ga-* de gm-app.css). Cabecera con avatar y cifras,
   pestañas con icono, favoritas con foto en rejilla, votadas en filas, fotos
   en cuadrícula y cuenta tipo ajustes. Anchos en %, sin emojis.
   ═══════════════════════════════════════════════════════════════════════════ */
body.ga-perfil { background: var(--ga-fondo) !important; color: var(--ga-tinta); -webkit-font-smoothing: antialiased; }
body.ga-perfil .container { max-width: 560px; margin: 0 auto; padding: 0; background: transparent; box-shadow: none; }
body.ga-perfil .content { padding: 4px 16px calc(110px + env(safe-area-inset-bottom)); background: transparent; }
body.ga-perfil [hidden] { display: none !important; }

/* ── Barra superior ── */
body.ga-perfil .header.gpf-barra {
  position: sticky; top: 0; z-index: 60; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center;
  min-height: 52px; padding: calc(4px + env(safe-area-inset-top)) 6px 4px; margin: 0;
  background: rgba(250, 247, 244, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 0; border-radius: 0; box-shadow: none; color: var(--ga-tinta);
}
body.ga-perfil .gpf-barra .header-back, body.ga-perfil .gpf-engranaje {
  width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; border-radius: 50%;
  color: var(--ga-tinta); cursor: pointer; padding: 0; font-size: 0; -webkit-tap-highlight-color: transparent;
}
body.ga-perfil .gpf-barra .header-back:active, body.ga-perfil .gpf-engranaje:active { background: var(--ga-relleno); }
body.ga-perfil .gpf-barra svg { width: 25px; height: 25px; }
.gpf-barra-t { text-align: center; font-size: 17px; font-weight: 700; color: var(--ga-tinta); }

/* ── Cabecera de perfil ── */
.gpf-perfil { padding: 10px 16px 14px; }
.gpf-fila { display: flex; align-items: center; gap: 18px; }
.gpf-anillo {
  flex: none; width: 92px; height: 92px; border-radius: 50%; padding: 3px;
  background: linear-gradient(135deg, #F7A8C2, #E8447C 55%, #F59E0B);
}
body.ga-perfil .gpf-anillo .header-avatar {
  width: 100%; height: 100%; border-radius: 50%; border: 3px solid #fff; overflow: hidden;
  display: grid; place-items: center; background: var(--ga-rosa-suave); color: var(--ga-accion);
  font-size: 34px; font-weight: 800; box-shadow: none; margin: 0;
}
body.ga-perfil .gpf-anillo .header-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gpf-cifras { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; min-width: 0; }
.gpf-cifras b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--ga-tinta); }
.gpf-cifras span { display: block; font-size: 13.5px; color: var(--ga-gris); margin-top: 3px; }
body.ga-perfil .gpf-perfil .header-name {
  font-family: 'Playfair Display', Georgia, serif; font-size: 23px; font-weight: 700; line-height: 1.2;
  color: var(--ga-tinta); margin: 12px 0 0; text-align: left; text-shadow: none;
}
.gpf-desde { font-size: 14.5px; color: var(--ga-gris); margin-top: 2px; }
.gpf-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.gpf-botones .gms-btn, .gpf-botones .ga-btn-2 { min-height: 48px; font-size: 16px !important; border-radius: 14px; padding: 8px 10px; }
body.ga-perfil .gmp-panel-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 16px 12px; min-height: 54px;
  background: var(--ga-tinta); color: #fff; border: 0; border-radius: 16px; font-size: 17px; font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 16px rgba(11, 31, 56, .2);
}
body.ga-perfil .gmp-panel-btn img { height: 26px; width: auto; }

/* ── Pestañas con icono ── */
body.ga-perfil .tabs {
  position: sticky; top: calc(52px + env(safe-area-inset-top)); z-index: 55;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0; margin: 0; overflow: visible;
  background: rgba(250, 247, 244, .96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 0; border-bottom: 1px solid var(--ga-linea); border-radius: 0; box-shadow: none;
}
body.ga-perfil .tabs .tab-button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 58px; padding: 6px 2px; margin: 0; background: none !important; border: 0; border-radius: 0;
  border-bottom: 2.5px solid transparent; color: var(--ga-gris-2); box-shadow: none !important;
  font-family: inherit; font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transform: none !important;
}
body.ga-perfil .tabs .tab-button svg { width: 25px; height: 25px; }
body.ga-perfil .tabs .tab-button.active { color: var(--ga-tinta); border-bottom-color: var(--ga-rosa); }
body.ga-perfil .tabs .tab-button.active svg { color: var(--ga-accion); stroke-width: 2.3; }

/* ── Secciones ── */
body.ga-perfil .gmp { font-size: 16px; line-height: 1.45; color: var(--ga-tinta); }
body.ga-perfil .gmp-sec { background: none; border: 0; box-shadow: none; padding: 0; margin: 20px 0 0; }
body.ga-perfil .gmp-h { font-family: inherit; font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: var(--ga-tinta); margin: 0 2px 2px; }
body.ga-perfil .gmp-sub { font-size: 15px; color: var(--ga-gris); margin: 0 2px 12px; }
body.ga-perfil .gmp-lista { list-style: none; margin: 0; padding: 0; }
body.ga-perfil .gmp-pie { font-size: 14.5px; color: var(--ga-gris); }
body.ga-perfil .gmp-pie a, body.ga-perfil .gmp-enlace { color: var(--ga-accion-osc); font-weight: 700; }
body.ga-perfil .gmp-aviso { background: #FFF6E5; color: #5C3A05; border: 0; border-radius: 16px; padding: 13px 16px; font-size: 15.5px; }
body.ga-perfil .gmp-vacio {
  background: #fff; border: 0; border-radius: var(--ga-radio); box-shadow: var(--ga-sombra);
  padding: 28px 20px; text-align: center; margin-top: 8px;
}
body.ga-perfil .gmp-vacio img { height: 72px; width: auto; margin: 0 auto 12px; display: block; }
body.ga-perfil .gmp-vacio p { font-size: 16px; color: var(--ga-gris); margin: 0 0 16px; }

/* botones */
body.ga-perfil .gmp-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px;
  background: var(--ga-accion); color: #fff; border: 0; border-radius: 14px; font-family: inherit;
  font-size: 15.5px; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: none;
}
body.ga-perfil .gmp-btn--sec { background: var(--ga-relleno); color: var(--ga-tinta); }
body.ga-perfil .gmp-btn--grande { display: flex; width: 100%; min-height: 54px; font-size: 17px; border-radius: 16px; box-shadow: 0 6px 16px rgba(217, 51, 107, .26); }

/* fotos de heladería y de sabor (con fondo de marca si no cargan) */
.gpf-foto {
  display: block; position: relative; overflow: hidden; background: linear-gradient(135deg, #FDECF2, #F9C7D8);
}
.gpf-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gpf-foto.sin-foto::after, .gpf-foto:empty::after {
  content: ''; position: absolute; inset: 22%; background: url('/icons/markers/cone-pink-ui.png') center / contain no-repeat; opacity: .9;
}
.gpf-nota {
  display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 8px; border-radius: 15px;
  font-size: 19px; font-weight: 800; letter-spacing: -.02em; background: #EEF0F3; color: #4B5563;
}
.gpf-nota[data-n="alta"] { background: var(--ga-verde-suave); color: var(--ga-verde); }
.gpf-nota[data-n="media"] { background: var(--ga-oro-suave); color: var(--ga-oro); }

/* bolas dibujadas */
body.ga-perfil .gmp-nivel { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ga-gris); margin-top: 6px; line-height: 1.25; }
body.ga-perfil .gmp-bolas { color: var(--ga-rosa); font-size: 13px; letter-spacing: 2px; flex: none; }

/* ── Favoritas: rejilla de 2 con foto ── */
#gmpFavoritas .gmp-lista { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#gmpFavoritas .gmp-card {
  position: relative; background: #fff; border: 0; border-radius: 20px; box-shadow: var(--ga-sombra);
  padding: 0 0 12px; margin: 0; overflow: hidden; min-width: 0;
}
#gmpFavoritas .gpf-foto { aspect-ratio: 1 / 1; border-radius: 0; }
#gmpFavoritas .gmp-card-nombre {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.25; color: var(--ga-tinta);
  text-decoration: none; margin: 10px 12px 0;
}
#gmpFavoritas .gmp-card-ciudad { font-size: 14px; color: var(--ga-gris); margin: 2px 12px 0; }
#gmpFavoritas .gmp-nivel { margin: 6px 12px 0; flex-wrap: wrap; }
#gmpFavoritas .gmp-acciones { margin: 0; padding: 0; }
#gmpFavoritas .gmp-acciones > a.gmp-btn { display: none; }      /* toda la tarjeta lleva a la ficha */
#gmpFavoritas [data-gmp-quitar] {                              /* corazón sobre la foto */
  position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%;
  font-size: 0; color: transparent; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .94) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23E8447C'%3E%3Cpath d='M12 20.5s-7.5-4.6-7.5-10.200A4.3 4.3 0 0 1 12 7.600a4.3 4.3 0 0 1 7.5 2.700c0 5.6-7.5 10.2-7.5 10.200z'/%3E%3C/svg%3E") center / 22px no-repeat;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

/* ── Filas (votadas, votos, cupones, mensajes) ── */
#gmpVotadas .gmp-lista, #gmpVotosHeladeria .gmp-lista, #gmpVotosSabor .gmp-lista {
  background: #fff; border-radius: var(--ga-radio); box-shadow: var(--ga-sombra); overflow: hidden;
}
#gmpVotadas .gmp-card, #gmpVotosHeladeria .gmp-card, #gmpVotosSabor .gmp-card {
  position: relative; display: grid; grid-template-columns: 64px 1fr auto; column-gap: 13px; align-items: start;
  background: none; border: 0; border-radius: 0; box-shadow: none; padding: 14px; margin: 0;
}
#gmpVotadas .gmp-card + .gmp-card, #gmpVotosHeladeria .gmp-card + .gmp-card, #gmpVotosSabor .gmp-card + .gmp-card { border-top: 1px solid var(--ga-linea); }
#gmpVotadas .gpf-foto, #gmpVotosHeladeria .gpf-foto { grid-column: 1; grid-row: 1 / span 4; width: 64px; height: 64px; border-radius: 16px; }
#gmpVotadas .gpf-nota, #gmpVotosHeladeria .gpf-nota { grid-column: 3; grid-row: 1 / span 2; }
#gmpVotadas .gmp-card > :not(.gpf-foto):not(.gpf-nota), #gmpVotosHeladeria .gmp-card > :not(.gpf-foto):not(.gpf-nota) { grid-column: 2; min-width: 0; }
#gmpVotadas .gmp-card-nombre, #gmpVotosHeladeria .gmp-card-nombre, #gmpVotosSabor .gmp-card-nombre {
  font-family: inherit; font-size: 17px; font-weight: 700; line-height: 1.25; color: var(--ga-tinta); text-decoration: none;
}
body.ga-perfil .gmp-card-ciudad { font-size: 14.5px; color: var(--ga-gris); margin-top: 1px; }
body.ga-perfil .gmp-nota { font-size: 14.5px; color: var(--ga-gris); margin-top: 3px; }
body.ga-perfil .gmp-nota strong { color: var(--ga-tinta); }
body.ga-perfil .gmp-coment { font-size: 15.5px; color: #3C4654; margin-top: 6px; font-style: normal; }
#gmpVotadas .gmp-acciones { display: none; }                    /* la fila entera es el enlace */
#gmpVotadas .gmp-nivel { margin-top: 3px; }
#gmpVotosHeladeria .gmp-acciones { grid-column: 2 / span 2 !important; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#gmpVotosHeladeria .gmp-acciones .gmp-btn { min-height: 40px; padding: 6px 14px; font-size: 14.5px; background: var(--ga-rosa-suave); color: var(--ga-accion-osc); }
#gmpVotosHeladeria .gmp-acciones .gmp-btn--sec { background: var(--ga-relleno); color: var(--ga-tinta); }
#gmpVotosHeladeria .gmp-editor, #gmpVotosHeladeria .gmp-msg { grid-column: 1 / -1 !important; }
body.ga-perfil .gmp-editor { background: var(--ga-relleno); border: 0; border-radius: 18px; padding: 16px; margin-top: 12px; }
body.ga-perfil .gmp-editor-fila { display: flex; align-items: center; justify-content: center; gap: 22px; margin-bottom: 14px; }
body.ga-perfil .gmp-paso {
  width: 52px; height: 52px; border-radius: 50%; border: 0; background: #fff; color: var(--ga-tinta);
  font-size: 18px; font-weight: 800; box-shadow: var(--ga-sombra); cursor: pointer;
}
body.ga-perfil .gmp-editor-val { min-width: 84px; text-align: center; font-size: 44px; font-weight: 800; letter-spacing: -.03em; color: var(--ga-tinta); line-height: 1; }
body.ga-perfil .gmp-msg { font-size: 15px; font-weight: 600; margin-top: 8px; }
#gmpVotosSabor .gmp-card { grid-template-columns: 52px 1fr; align-items: center; }
#gmpVotosSabor .gpf-foto--sabor { grid-row: 1 / span 2; width: 52px; height: 52px; border-radius: 50%; }
#gmpVotosSabor .gmp-card > :not(.gpf-foto) { grid-column: 2; }

/* tarjetas sueltas (cupones, sellos, mensajes) */
body.ga-perfil #gmpExtras .gmp-card, body.ga-perfil .gmp-sec > .gmp-lista > .gmp-card:not([data-gmp-id]):not([data-gmp-voto]):not(.gpf-sabor) {
  background: #fff; border: 0; border-radius: 20px; box-shadow: var(--ga-sombra); padding: 16px; margin: 0 0 10px;
}

/* mapa */
body.ga-perfil .gmp-mapa { border-radius: var(--ga-radio); overflow: hidden; box-shadow: var(--ga-sombra); border: 0; min-height: 240px; }
body.ga-perfil .gmp-leyenda { display: flex; gap: 8px; margin-top: 10px; font-size: 14px; color: var(--ga-tinta); }
body.ga-perfil .gmp-leyenda span { display: inline-flex; align-items: center; gap: 7px; background: #fff; border-radius: 999px; padding: 6px 12px; box-shadow: var(--ga-sombra); }

/* ── Mi cuenta ── */
body.ga-perfil #cuentaContent .gmp-sec { background: #fff; border-radius: var(--ga-radio); box-shadow: var(--ga-sombra); padding: 18px; margin-top: 16px; }
body.ga-perfil .gmp-cuenta-cab { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
body.ga-perfil .gmp-avatar {
  flex: none; width: 60px; height: 60px; border-radius: 50%; overflow: hidden; position: relative; display: grid; place-items: center;
  background: var(--ga-rosa-suave); color: var(--ga-accion); font-size: 24px; font-weight: 800; border: 0;
}
body.ga-perfil .gmp-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
body.ga-perfil .gmp-cuenta-nombre { font-family: inherit; font-size: 18px; font-weight: 800; color: var(--ga-tinta); }
body.ga-perfil .gmp-cuenta-email { font-size: 14.5px; color: var(--ga-gris); overflow-wrap: anywhere; }
body.ga-perfil .gmp-acciones { display: flex; flex-wrap: wrap; gap: 8px; }
body.ga-perfil #gmpNombreInput { background: var(--ga-relleno) !important; border: 1.5px solid transparent !important; border-radius: 14px !important; min-height: 54px !important; font-size: 17px !important; }
body.ga-perfil #gmpNombreInput:focus { background: #fff !important; border-color: var(--ga-rosa) !important; outline: none; box-shadow: 0 0 0 4px rgba(232, 68, 124, .14); }
body.ga-perfil .gmp-reclama {
  display: block; margin-top: 16px; padding: 16px 18px; background: #fff; border: 0; border-radius: var(--ga-radio);
  box-shadow: var(--ga-sombra); font-size: 16px; font-weight: 600; color: var(--ga-tinta); text-decoration: none; text-align: left;
}

/* ── Mis fotos: cuadrícula ── */
body.ga-perfil #memorias .memories-grid, body.ga-perfil #memorias .mem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }

@media (max-width: 359px) {
  .gpf-fila { gap: 12px; } .gpf-anillo { width: 78px; height: 78px; } .gpf-cifras b { font-size: 19px; }
  .gpf-cifras span { font-size: 12.5px; }
}

/* ajuste de márgenes: una sola sangría de 16 px */
body.ga-perfil .tab-content { padding: 0 !important; }
body.ga-perfil .gmp-sec:first-child, body.ga-perfil #gmpHeladerias > .gmp-sec:first-child { margin-top: 16px; }
#gmpVotadas .gmp-nivel, #gmpFavoritas .gmp-nivel { font-size: 13px; }
#gmpVotadas .gmp-nivel > span:last-child { min-width: 0; }

/* Mis fotos: las polaroid de siempre, dos por fila sin salirse, con los colores de la casa */
body.ga-perfil #memorias .pol-grid { grid-template-columns: 1fr 1fr; gap: 20px 12px; padding: 8px 2px 24px; max-width: 100%; overflow: hidden; }
body.ga-perfil #memorias .pol-grid > * { min-width: 0; max-width: 100%; }
body.ga-perfil #memorias .pol-hdr { padding-left: 2px; padding-right: 2px; margin-top: 12px; }
body.ga-perfil #memorias .pol-hdr-title { font-family: inherit; font-size: 20px; font-weight: 800; color: var(--ga-tinta); }
body.ga-perfil #memorias .pol-hdr-share { background: var(--ga-accion) !important; color: #fff !important; border: 0 !important; box-shadow: 0 6px 16px rgba(217, 51, 107, .26) !important; border-radius: 14px !important; min-height: 44px; font-weight: 700; }
@media (min-width: 600px) { body.ga-perfil #memorias .pol-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Mi cuenta como una lista de ajustes ── */
body.ga-perfil #cuentaContent .gmp-acciones { display: block; background: var(--ga-relleno); border-radius: 16px; overflow: hidden; }
body.ga-perfil #cuentaContent .gmp-acciones .gmp-btn {
  display: flex; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 8px 16px;
  background: none; color: var(--ga-tinta); border-radius: 0; font-size: 16.5px; font-weight: 600; text-align: left;
}
body.ga-perfil #cuentaContent .gmp-acciones .gmp-btn + .gmp-btn { border-top: 1px solid #E9E3DD; }
body.ga-perfil #cuentaContent .gmp-acciones .gmp-btn::after {
  content: ''; flex: none; width: 9px; height: 9px; border-right: 2.5px solid #B4BAC3; border-bottom: 2.5px solid #B4BAC3; transform: rotate(-45deg);
}
body.ga-perfil #cuentaContent .gmp-acciones .gmp-btn:active { background: #EDE7E1; }
body.ga-perfil #cuentaContent .gmp-pie { margin: 14px 2px 0; line-height: 1.9; }
body.ga-perfil #cuentaContent .gmi-selector { margin-top: 16px; }

/* ── La barra del sitio, clara en esta página (misma casa que el perfil) ── */
@media (max-width: 768px) {
  body.ga-perfil .mobile-tabbar--v2 .mtb-bar {
    background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--ga-linea); box-shadow: none;
  }
  body.ga-perfil .mobile-tabbar--v2 .mtb-bar a, body.ga-perfil .mobile-tabbar--v2 .mtb-more { color: var(--ga-gris-2); }
  body.ga-perfil .mobile-tabbar--v2 .mtb-bar a svg { stroke: currentColor; }
  body.ga-perfil .mobile-tabbar--v2 .mtb-bar a.active { color: var(--ga-accion); }
  body.ga-perfil .mobile-tabbar--v2 .mtb-bar a.active svg { stroke: var(--ga-accion); }
  body.ga-perfil .mobile-tabbar--v2 .mtb-bar a:active, body.ga-perfil .mobile-tabbar--v2 .mtb-more:active { background: var(--ga-relleno); }
}
