/* ==========================================================================
   Te Pido · UI 2026
   Capa de diseño del home (index.html) y de "Mi perfil" (user/perfil.php).
   Todo está bajo la clase .tp del <body>, así no afecta al resto de las
   pantallas que comparten estilosTepido.css / funcionesTepido.js.
   ========================================================================== */

:root {
  --tp-red: #ff0013;
  --tp-red-600: #e00011;
  --tp-red-700: #b8000e;
  --tp-red-50: #fff1f2;
  --tp-red-100: #ffe0e2;

  --tp-ink: #16120f;
  --tp-ink-2: #3a3531;
  --tp-muted: #6b645f;
  --tp-line: #ebe6e2;
  --tp-soft: #f7f4f1;
  --tp-bg: #ffffff;

  --tp-ok: #0f9d6b;
  --tp-info: #1d6fd6;
  --tp-warn: #c56a00;
  --tp-error: #d40f2a;

  --tp-r-sm: 12px;
  --tp-r: 16px;
  --tp-r-lg: 24px;
  --tp-r-xl: 32px;

  --tp-shadow-sm: 0 1px 2px rgba(22, 18, 15, .06), 0 2px 8px rgba(22, 18, 15, .05);
  --tp-shadow: 0 12px 32px -12px rgba(22, 18, 15, .2), 0 2px 8px rgba(22, 18, 15, .06);
  --tp-shadow-lg: 0 32px 64px -24px rgba(22, 18, 15, .4);

  --tp-font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tp-display: "Bricolage Grotesque", "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Base ---------------------------------------------------------- */

html { scroll-behavior: smooth; }

body.tp {
  margin: 0;
  font-family: var(--tp-font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--tp-ink);
  background: var(--tp-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

.tp h1, .tp h2, .tp h3, .tp h4, .tp p { margin: 0; }
.tp a { color: inherit; text-decoration: none; }
.tp a:hover { color: inherit; text-decoration: none; }
.tp img { max-width: 100%; }
.tp button { font-family: inherit; }
.tp [hidden] { display: none !important; }

.tp :focus { outline: none; }
.tp :focus-visible {
  outline: 3px solid rgba(255, 0, 19, .45);
  outline-offset: 2px;
}

.tp-container { max-width: 1160px; margin: 0 auto; }

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

/* ---------- Botones ------------------------------------------------------- */

.tp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px;
  border: 0; border-radius: 14px;
  font: 700 16px/1 var(--tp-font);
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease, transform .12s ease, box-shadow .18s ease;
}
.tp-btn:active { transform: scale(.98); }
.tp-btn:disabled, .tp-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.tp-btn--primary { background: var(--tp-red); color: #fff; }
.tp-btn--primary:hover:not(:disabled) { background: var(--tp-red-600); color: #fff; }

.tp-btn--dark { background: var(--tp-ink); color: #fff; }
.tp-btn--dark:hover:not(:disabled) { background: #000; color: #fff; }

.tp-btn--light { background: #fff; color: var(--tp-ink); box-shadow: var(--tp-shadow-sm); }
.tp-btn--light:hover:not(:disabled) { background: var(--tp-soft); color: var(--tp-ink); }

.tp-btn--ghost { background: transparent; color: var(--tp-ink-2); }
.tp-btn--ghost:hover:not(:disabled) { background: var(--tp-soft); color: var(--tp-ink); }

.tp-btn--sm { height: 42px; padding: 0 18px; font-size: 15px; border-radius: 12px; }
.tp-btn--block { display: flex; width: 100%; }

.tp-link {
  font-weight: 600; cursor: pointer;
  text-decoration: underline !important; text-underline-offset: 3px;
  text-decoration-color: rgba(22, 18, 15, .3) !important;
}
.tp-link:hover { text-decoration-color: currentColor !important; }
.tp-link--red { color: var(--tp-red-700) !important; text-decoration-color: rgba(184, 0, 14, .35) !important; }

.tp-spinner {
  display: inline-block; width: 18px; height: 18px; vertical-align: -3px;
  border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: tp-spin .7s linear infinite;
}
@keyframes tp-spin { to { transform: rotate(360deg); } }

/* ---------- Header -------------------------------------------------------- */

.tp-header {
  position: sticky; top: 0; z-index: 1030;
  padding: 12px 16px 0;
}
.tp-header__inner {
  position: relative;
  max-width: 1240px; height: 64px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px 0 12px;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border: 1px solid rgba(22, 18, 15, .07);
  border-radius: 20px;
  box-shadow: var(--tp-shadow-sm);
  transition: box-shadow .25s ease;
}
.tp-header.is-scrolled .tp-header__inner { box-shadow: var(--tp-shadow); }

.tp-brand { display: inline-flex; align-items: center; gap: 10px; margin-right: 12px; }
.tp-brand img { width: 40px; height: 40px; border-radius: 50%; display: block; }
.tp-brand span {
  font: 800 22px/1 var(--tp-display); letter-spacing: -.02em; color: var(--tp-ink);
}

.tp-nav { display: flex; align-items: center; gap: 2px; }
.tp-nav a {
  padding: 10px 14px; border-radius: 12px;
  font-size: 15px; font-weight: 600; color: var(--tp-ink-2);
  transition: background-color .15s ease, color .15s ease;
}
.tp-nav a:hover { background: var(--tp-soft); color: var(--tp-ink); }

.tp-header__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.tp-burger {
  display: none; width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: transparent; color: var(--tp-ink); font-size: 18px; cursor: pointer;
}
.tp-burger:hover { background: var(--tp-soft); }

/* Usuario logueado: fcn_checkSession() muestra/oculta #btnHeaderUser y #btnUserName */
.tp-user { position: relative; display: none; }
.tp-logged .tp-user { display: block; }
.tp-logged #btnHeaderLogin { display: none !important; }

.tp-user__chip {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 14px 0 5px;
  background: #fff; border: 1px solid var(--tp-line); border-radius: 999px;
  color: var(--tp-ink); cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tp-user__chip:hover { border-color: #d6cfc9; box-shadow: var(--tp-shadow-sm); }
.tp-user__chip > .fas { font-size: 11px; color: var(--tp-muted); transition: transform .2s ease; }
.tp-user__chip[aria-expanded="true"] > .fas { transform: rotate(180deg); }

.tp #btnHeaderUser {
  display: block; flex: none;
  width: 36px; height: 36px; margin: 0;
  border-radius: 50%;
  background-color: var(--tp-soft); background-size: cover; background-position: center;
  box-shadow: none;
}
.tp #btnUserName {
  display: block; margin: 0;
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; font-weight: 600; color: var(--tp-ink); text-align: left;
}

.tp-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 5;
  min-width: 240px; padding: 8px;
  background: #fff; border: 1px solid var(--tp-line); border-radius: 18px;
  box-shadow: var(--tp-shadow);
  animation: tp-pop .16s ease;
}
.tp-menu a, .tp-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 12px; border: 0; border-radius: 12px; background: transparent;
  font-size: 15px; font-weight: 600; color: var(--tp-ink); text-align: left; cursor: pointer;
}
.tp-menu a:hover, .tp-menu button:hover { background: var(--tp-soft); }
.tp-menu i { width: 18px; text-align: center; color: var(--tp-muted); }
.tp-menu hr { margin: 6px 4px; border: 0; border-top: 1px solid var(--tp-line); }
.tp-menu .is-danger, .tp-menu .is-danger i { color: var(--tp-red-700); }
.tp-menu .is-current { background: var(--tp-soft); }

@keyframes tp-pop {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .tp-header { padding: 8px 10px 0; }
  .tp-header__inner { height: 58px; border-radius: 18px; }
  .tp-brand img { width: 36px; height: 36px; }
  .tp-brand span { font-size: 20px; }
  .tp-burger { display: inline-grid; place-items: center; }
  .tp-nav {
    display: none;
    position: absolute; right: 0; top: calc(100% + 10px);
    flex-direction: column; align-items: stretch; gap: 0;
    min-width: 230px; padding: 8px;
    background: #fff; border: 1px solid var(--tp-line); border-radius: 18px;
    box-shadow: var(--tp-shadow);
  }
  .tp-nav.is-open { display: flex; animation: tp-pop .16s ease; }
  .tp-nav a { padding: 12px; }
  .tp-user__chip { padding: 0 5px; }
  .tp-user__chip > .fas, .tp #btnUserName { display: none !important; }
}

/* ---------- Hero ---------------------------------------------------------- */

.tp-hero { padding: 12px 16px 0; }

.tp-hero__panel {
  position: relative;
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(28px, 4.5vw, 64px);
  padding: clamp(28px, 5vw, 68px);
  background: var(--tp-red);
  border-radius: var(--tp-r-xl);
  color: #fff;
}
.tp-hero__panel :focus-visible { outline-color: #fff; }

.tp-hero__deco {
  position: absolute; inset: 0; z-index: 0;
  border-radius: inherit; overflow: hidden; pointer-events: none;
  background: radial-gradient(90% 120% at 100% 0%, rgba(255, 110, 120, .55) 0%, rgba(255, 110, 120, 0) 55%);
}
.tp-hero__deco::before, .tp-hero__deco::after {
  content: ""; position: absolute; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .2);
}
.tp-hero__deco::before { width: 520px; height: 520px; left: -220px; bottom: -300px; }
.tp-hero__deco::after  { width: 760px; height: 760px; left: -340px; bottom: -420px; border-color: rgba(255, 255, 255, .12); }

.tp-hero__copy {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  min-width: 0;
}

.tp-pill {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px;
  background: #fff; color: var(--tp-ink); border-radius: 999px;
  font-size: 14px; font-weight: 700;
}
.tp-pill i {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tp-red); color: #fff; font-size: 11px;
}

.tp-hero h1 {
  font: 800 clamp(2.6rem, 5.2vw + .7rem, 5.4rem)/.98 var(--tp-display);
  letter-spacing: -.02em;
  color: #fff;
  text-wrap: balance;
}

/* Buscador */
.tp-search-card {
  position: relative; z-index: 3;
  padding: 16px;
  background: #fff; color: var(--tp-ink);
  border-radius: var(--tp-r-lg);
  box-shadow: 0 28px 56px -24px rgba(90, 0, 8, .6);
}
.tp-search-card :focus-visible { outline-color: rgba(255, 0, 19, .45); }
.tp-search-card__label {
  display: block; margin: 2px 6px 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--tp-muted);
}

.tp-search {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  min-height: 60px; padding: 6px 6px 6px 16px;
  background: var(--tp-soft);
  border: 1.5px solid transparent; border-radius: var(--tp-r);
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.tp-search:focus-within {
  background: #fff; border-color: var(--tp-red);
  box-shadow: 0 0 0 4px rgba(255, 0, 19, .12);
}

.tp #searchGeo { float: none; flex: none; margin: 0; font-size: 18px; color: var(--tp-red); }

.tp #searchInput, .tp #selectDir {
  flex: 1 1 auto; min-width: 0; height: 46px;
  padding: 0 4px; margin: 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: 0;
  font: 500 16px/1.2 var(--tp-font); color: var(--tp-ink);
}
.tp #selectDir { cursor: pointer; }
.tp #searchInput::placeholder { color: #9b938d; opacity: 1; }

.tp #searchButton {
  float: none; position: static; flex: none;
  height: 48px; min-width: 112px; margin: 0; padding: 0 20px;
  border-radius: 12px;
}
.tp #searchButton img { height: 22px; filter: brightness(0) invert(1); }

.tp #cntPlaces {
  display: none;
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 9;
  width: auto; max-height: 300px; overflow-y: auto;
  padding: 6px;
  background: #fff; border: 1px solid var(--tp-line); border-radius: var(--tp-r);
  box-shadow: var(--tp-shadow);
}
.tp #cntPlaces > div {
  position: relative;
  padding: 12px 14px 12px 42px;
  border-radius: 10px;
  font-size: 15px; color: var(--tp-ink-2); text-align: left; cursor: pointer;
}
.tp #cntPlaces > div::before {
  content: "\f3c5"; font-family: "Font Awesome 5 Free"; font-weight: 900;
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 14px; color: #b3aba5;
}
.tp #cntPlaces > div:hover { background: var(--tp-soft); color: var(--tp-ink); }
.tp #cntPlaces > div:hover::before { color: var(--tp-red); }

.tp #divVerDir { float: none; margin: 10px 6px 0; text-align: right; font-size: 13px; color: var(--tp-ink-2); }
.tp #verDirLink { color: var(--tp-ink-2) !important; }

/* Direcciones guardadas */
.tp-dirs { margin: 14px 6px 2px; }
.tp-dirs__label { margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--tp-muted); }
.tp-dirs__list { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-chipbtn {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 100%; padding: 8px 14px;
  background: #fff; border: 1.5px solid var(--tp-line); border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--tp-ink-2); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.tp-chipbtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-chipbtn i { font-size: 12px; color: var(--tp-red); }
.tp-chipbtn:hover { border-color: var(--tp-ink); color: var(--tp-ink); }

.tp-chipbtn span b { font-weight: 700; color: var(--tp-ink); }
.tp-chipbtn[aria-pressed="true"], .tp-chipbtn[aria-pressed="true"]:hover { background: var(--tp-ink); border-color: var(--tp-ink); color: #fff; }
.tp-chipbtn[aria-pressed="true"] i { color: #fff; }

/* Alias de la dirección (modal del mapa) */
.tp-alias { margin-top: 16px; }
.tp-alias__opt { font-weight: 500; color: var(--tp-muted); }
.tp-alias__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-alias .inputNew { margin-top: 10px; }

/* Pedidos del día */
.tp #divInfoPedido:not(:empty) { margin-top: 14px; display: grid; gap: 8px; }
.tp-order {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 10px 16px 10px 10px;
  background: var(--tp-soft); border: 1.5px solid transparent; border-radius: var(--tp-r);
  color: var(--tp-ink); text-align: left; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.tp-order:hover { background: #fff; border-color: var(--tp-ink); }
.tp-order__logo {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: #fff center/contain no-repeat; border: 1px solid var(--tp-line);
}
.tp-order__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tp-order__body strong { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-order__status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--tp-ink-2); }
.tp-order__status::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tp-ok); }
.tp-order--listo .tp-order__status::before { background: var(--tp-info); }
.tp-order--rechazado .tp-order__status::before { background: var(--tp-error); }
.tp-order > .fas { font-size: 12px; color: var(--tp-muted); }

/* Descarga de la app (hero) */
.tp-hero__apps { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.tp-hero__apps p { font-size: 19px; font-weight: 700; line-height: 1.25; color: #fff; }
.tp-stores { display: flex; flex-wrap: wrap; gap: 10px; }
.tp-store {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 18px 0 14px;
  background: var(--tp-ink); color: #fff; border: 0; border-radius: 14px;
  cursor: pointer; text-align: left;
  transition: transform .15s ease, background-color .15s ease;
}
.tp-store:hover { background: #000; transform: translateY(-2px); }
.tp-store i { font-size: 24px; }
.tp-store span { display: flex; flex-direction: column; font-size: 16px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.tp-store small { font-size: 11px; font-weight: 500; opacity: .8; }
.tp-store--light { background: #fff; color: var(--tp-ink); }
.tp-store--light:hover { background: var(--tp-soft); }

/* Foto */
.tp-hero__media { position: relative; z-index: 1; min-height: 440px; }
.tp-hero__photo {
  position: absolute; inset: 0;
  border-radius: 28px;
  background: var(--tp-red-700) center/cover no-repeat;
  box-shadow: 0 26px 44px -28px rgba(70, 0, 6, .8);
  transform: rotate(2deg);
}
.tp-float {
  position: absolute; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px 12px;
  background: #fff; color: var(--tp-ink); border-radius: 18px;
  box-shadow: var(--tp-shadow);
  font-size: 15px; font-weight: 700; line-height: 1.2;
  animation: tp-float 6s ease-in-out infinite;
}
.tp-float i {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--tp-red-50); color: var(--tp-red); font-size: 16px;
}
.tp-float small { display: block; font-size: 12.5px; font-weight: 500; color: var(--tp-muted); }
.tp-float--a { left: -26px; top: 12%; }
.tp-float--b { right: -14px; bottom: 11%; animation-delay: -3s; }
@keyframes tp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (max-width: 960px) {
  .tp-hero__panel { grid-template-columns: minmax(0, 1fr); }
  .tp-hero__media { display: none; }
}
@media (max-width: 760px) {
  .tp-hero { padding: 8px 10px 0; }
  .tp-hero__panel { border-radius: 26px; padding: 26px 16px 22px; }
  .tp-hero__copy { gap: 18px; }
  .tp-search-card { padding: 12px; border-radius: 20px; }
  .tp-search { padding-left: 12px; }
  .tp #searchButton { min-width: 88px; padding: 0 14px; }
  .tp-hero__apps p { width: 100%; font-size: 19px; }
  .tp-store { flex: 1 1 0; min-width: 0; padding: 0 10px; justify-content: center; }
  .tp-store span { font-size: 15px; }
}

/* ---------- Secciones ----------------------------------------------------- */

.tp-section { padding: clamp(64px, 8vw, 112px) 16px 0; scroll-margin-top: 80px; }

.tp-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--tp-ink-2);
}
.tp-eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--tp-red); }

.tp-h2 {
  margin: 12px 0 12px !important;
  font: 800 clamp(2rem, 3.4vw + .4rem, 3.3rem)/1.02 var(--tp-display);
  letter-spacing: -.015em; color: var(--tp-ink);
  text-wrap: balance;
}
.tp-lead { max-width: 54ch; font-size: clamp(1.05rem, .5vw + .95rem, 1.22rem); color: var(--tp-muted); }
.tp-lead strong { color: var(--tp-ink); font-weight: 700; }

/* ¿Por qué Te Pido? */
.tp-why { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 18px; margin-top: 40px; }
.tp-why__photo { position: relative; min-height: 440px; border-radius: 28px; overflow: hidden; background: var(--tp-soft); }
.tp-why__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tp-why__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.tp-feature {
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px;
  background: var(--tp-soft); border-radius: var(--tp-r-lg);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.tp-feature:hover { transform: translateY(-4px); background: #fff; box-shadow: var(--tp-shadow); }
.tp-feature__icon {
  width: 48px; height: 48px; margin-bottom: auto; border-radius: 14px;
  display: grid; place-items: center;
  background: #fff; color: var(--tp-red); font-size: 19px;
  box-shadow: var(--tp-shadow-sm);
}
.tp-feature h3 { margin-top: 22px; font: 700 20px/1.15 var(--tp-display); letter-spacing: -.01em; color: var(--tp-ink); }
.tp-feature p { font-size: 15px; color: var(--tp-muted); }
.tp-feature--dark, .tp-feature--dark:hover { background: var(--tp-ink); }
.tp-feature--dark h3 { color: #fff; }
.tp-feature--dark p { color: #cfc8c2; }
.tp-feature--dark .tp-feature__icon { background: var(--tp-red); color: #fff; box-shadow: none; }

@media (max-width: 960px) {
  .tp-why { grid-template-columns: minmax(0, 1fr); }
  .tp-why__photo { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 520px) {
  .tp-why__cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tp-feature { padding: 20px; }
  .tp-feature h3 { margin-top: 14px; }
}

/* Comunidad (se completa por AJAX; si viene vacío no ocupa lugar) */
.tp #divComunidad { margin: 0; }
.tp #divComunidad:not(:empty) { padding: clamp(64px, 8vw, 112px) 16px 0; }
.tp-reviews { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.tp-review {
  display: flex; flex-direction: column; gap: 14px;
  padding: 22px;
  background: #fff; border: 1px solid var(--tp-line); border-radius: var(--tp-r-lg);
}
.tp-review__head { display: flex; align-items: center; gap: 12px; }
.tp-review__photo { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--tp-soft) center/cover no-repeat; }
.tp-review__name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-review__stars {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px;
  background: var(--tp-ink); color: #fff; font-size: 13px; font-weight: 700;
}
.tp-review__stars i { font-size: 10px; color: #ffc93c; }
.tp-review__text { flex: 1; font-size: 15px; color: var(--tp-ink-2); overflow-wrap: anywhere; }
.tp-review__meta { padding-top: 14px; border-top: 1px solid var(--tp-line); font-size: 13px; color: var(--tp-muted); }
.tp-review__meta strong { display: block; color: var(--tp-ink); font-weight: 700; }

@media (max-width: 1040px) { .tp-reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .tp-reviews {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-left: -16px; margin-right: -16px; padding: 0 16px 8px;
    scrollbar-width: none;
  }
  .tp-reviews::-webkit-scrollbar { display: none; }
  .tp-review { flex: 0 0 82%; scroll-snap-align: center; }
}

/* Tengo una tienda */
.tp-cta-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }
.tp-cta {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  padding: clamp(26px, 4vw, 48px);
  border-radius: 28px;
}
.tp-cta__icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; font-size: 22px;
}
.tp-cta h2, .tp-cta h3 {
  font: 800 clamp(1.6rem, 2.2vw + .5rem, 2.5rem)/1.05 var(--tp-display);
  letter-spacing: -.015em; text-wrap: balance;
}
.tp-cta p { font-size: 17px; max-width: 46ch; }
.tp-cta .tp-btn { margin-top: auto; }
.tp-cta--dark { background: var(--tp-ink); color: #fff; }
.tp-cta--dark .tp-cta__icon { background: var(--tp-red); color: #fff; }
.tp-cta--dark p { color: #cfc8c2; }
.tp-cta--dark :focus-visible { outline-color: #fff; }
.tp-cta--soft { background: var(--tp-red-50); color: var(--tp-ink); }
.tp-cta--soft .tp-cta__icon { background: #fff; color: var(--tp-red); }
.tp-cta--soft p { color: var(--tp-ink-2); }
.tp-cta__mail { margin-top: auto; font-size: 15px !important; }

@media (max-width: 860px) { .tp-cta-grid { grid-template-columns: minmax(0, 1fr); } }

/* Logos de clientes */
.tp #divLogosClientes:not(:empty) { margin-top: clamp(40px, 6vw, 72px); }
.tp-logos__title { text-align: center; font-size: 15px; font-weight: 600; color: var(--tp-muted); }
.tp-logos {
  margin-top: 22px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.tp-logos__track { display: flex; width: max-content; animation: tp-marquee 46s linear infinite; }
.tp-logos:hover .tp-logos__track { animation-play-state: paused; }
.tp-logos__item {
  flex: none; width: 84px; height: 84px; margin: 0 14px;
  display: grid; place-items: center; overflow: hidden;
  background: #fff; border: 1px solid var(--tp-line); border-radius: 50%;
}
.tp-logos__item img { width: 100%; height: 100%; object-fit: contain; }
@keyframes tp-marquee { to { transform: translateX(-50%); } }

/* Banda de descarga */
.tp-appband {
  position: relative; overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(30px, 5vw, 60px);
  background: var(--tp-red); color: #fff; border-radius: var(--tp-r-xl);
}
.tp-appband::after {
  content: ""; position: absolute; right: -90px; top: 50%;
  width: 380px; height: 380px; transform: translateY(-50%);
  border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .22);
  box-shadow: 0 0 0 70px rgba(255, 255, 255, .06), 0 0 0 150px rgba(255, 255, 255, .04);
  pointer-events: none;
}
.tp-appband h2 {
  position: relative; z-index: 1; max-width: 16ch;
  font: 800 clamp(1.9rem, 3vw + .5rem, 3.2rem)/1.02 var(--tp-display); letter-spacing: -.015em; color: #fff;
}
.tp-appband .tp-stores { position: relative; z-index: 1; }
.tp-appband :focus-visible { outline-color: #fff; }

/* ---------- Footer -------------------------------------------------------- */

.tp-footer { padding: clamp(56px, 7vw, 96px) 16px 28px; }
.tp-footer__top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px;
  padding-bottom: 36px; border-bottom: 1px solid var(--tp-line);
}
.tp-footer__brand p { margin-top: 14px; max-width: 30ch; font-size: 15px; color: var(--tp-muted); }
.tp-footer h4 {
  margin-bottom: 14px;
  font: 700 13px/1 var(--tp-font); letter-spacing: .09em; text-transform: uppercase; color: var(--tp-muted);
}
.tp-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tp-footer li a { font-size: 15px; font-weight: 500; color: var(--tp-ink-2); }
.tp-footer li a:hover { color: var(--tp-red-700); }
.tp-social { display: flex; gap: 10px; }
.tp-social a, .tp-social button {
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tp-soft); color: var(--tp-ink); font-size: 17px; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.tp-social a:hover, .tp-social button:hover { background: var(--tp-red); color: #fff; transform: translateY(-2px); }
.tp-footer__bottom { padding-top: 22px; font-size: 13.5px; color: var(--tp-muted); }

@media (max-width: 860px) { .tp-footer__top { grid-template-columns: 1fr 1fr; } .tp-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .tp-footer__top { grid-template-columns: 1fr; } }

/* ---------- Formularios --------------------------------------------------- */

.tp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.tp-form-grid > .tp-col-2 { grid-column: 1 / -1; }
@media (max-width: 520px) { .tp-form-grid { grid-template-columns: minmax(0, 1fr); } }

.tp-field { margin-bottom: 14px; min-width: 0; }
.tp .titContField, .tp-label {
  display: block; margin: 0 0 6px 2px;
  font-size: 13px; font-weight: 600; color: var(--tp-ink-2); text-align: left;
}

.tp .inputNew, .tp-input {
  display: block; width: 100%; height: 50px; padding: 0 14px;
  background: var(--tp-soft) !important;
  border: 1.5px solid transparent !important; border-radius: var(--tp-r-sm);
  font: 500 16px/1.2 var(--tp-font); color: var(--tp-ink);
  -webkit-appearance: none; appearance: none;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.tp textarea.inputNew { height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
.tp .inputNew::placeholder, .tp-input::placeholder { color: #a39b95; opacity: 1; }
.tp .inputNew:hover, .tp-input:hover { border-color: #ddd6d0 !important; }
.tp .inputNew:focus, .tp-input:focus {
  background: #fff !important; border-color: var(--tp-red) !important;
  box-shadow: 0 0 0 4px rgba(255, 0, 19, .12); outline: 0 !important;
}
.tp .inputNew.hasError, .tp-input.hasError { background: #fff5f6 !important; border-color: var(--tp-error) !important; }
.tp-input:disabled, .tp-input[readonly] { color: var(--tp-muted); cursor: not-allowed; }
.tp-input:disabled:hover { border-color: transparent !important; }
.tp-help { margin: 6px 2px 0; font-size: 12.5px; color: var(--tp-muted); }

.tp-pass { position: relative; }
.tp-pass .inputNew, .tp-pass .tp-input { padding-right: 50px; }
.tp-pass__toggle {
  position: absolute; right: 4px; top: 4px;
  width: 42px; height: 42px; border: 0; border-radius: 10px;
  background: transparent; color: var(--tp-muted); cursor: pointer;
}
.tp-pass__toggle:hover { color: var(--tp-ink); background: rgba(22, 18, 15, .05); }

.tp-choice { display: flex; gap: 8px; }
.tp .btnTipoCom, .tp .btnTipoCom2 {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center;
  width: auto; height: auto; min-height: 50px; margin: 0; padding: 6px 10px;
  background: #fff; border: 1.5px solid var(--tp-line); border-radius: var(--tp-r-sm);
  font-size: 13.5px; font-weight: 600; line-height: 1.2; color: var(--tp-ink-2); text-align: center;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.tp .btnTipoCom:hover, .tp .btnTipoCom2:hover { background: #fff; border-color: var(--tp-ink); }
.tp .btnTipoCom.btnSelected, .tp .btnTipoCom2.btnSelected,
.tp .btnTipoCom.btnSelected:hover, .tp .btnTipoCom2.btnSelected:hover {
  background: var(--tp-red-50); border-color: var(--tp-red); color: var(--tp-red-700);
}

.tp-alert {
  margin-top: 4px; padding: 12px 14px; border-radius: var(--tp-r-sm);
  font-size: 14.5px; font-weight: 500; text-align: center;
  background: var(--tp-soft); color: var(--tp-ink-2);
}
.tp-alert--error { background: #fff1f2; color: #a30b1f; }
.tp-alert--ok { background: #e9f8f1; color: #0a6b49; }

/* ---------- Modales (Bootstrap) ------------------------------------------- */

.tp .modal-backdrop { background: #16120f; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.tp .modal-backdrop.show { opacity: .55; }

.tp-modal .modal-dialog { max-width: 440px; margin: 16px auto; padding: 0 12px; }
.tp-modal--wide .modal-dialog { max-width: 660px; }
.tp-modal--map .modal-dialog { max-width: 560px; }
.tp-modal .modal-content {
  border: 0 !important; border-radius: 28px; overflow: hidden;
  background: #fff; color: var(--tp-ink);
  box-shadow: var(--tp-shadow-lg);
}
.tp-modal.fade .modal-dialog { transform: translateY(18px) scale(.98); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.tp-modal.show .modal-dialog { transform: none; }

.tp-modal__head { position: relative; padding: 28px 76px 0 28px; }
.tp-modal__logo { display: block; width: 48px; height: 48px; margin-bottom: 18px; border-radius: 50%; }
.tp-modal .tituloModalTxt {
  margin: 0; color: var(--tp-ink); text-align: left;
  font: 800 28px/1.08 var(--tp-display); letter-spacing: -.015em;
}
.tp-modal__sub { margin-top: 8px !important; font-size: 15.5px; color: var(--tp-muted); }
.tp-modal__close {
  position: absolute; right: 18px; top: 18px;
  width: 42px; height: 42px; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tp-soft); color: var(--tp-ink-2); font-size: 15px; cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.tp-modal__close:hover { background: #ece7e2; transform: rotate(90deg); }
.tp-modal .modal-body { padding: 22px 28px 28px; }
.tp-modal__actions { display: grid; gap: 6px; margin-top: 18px; }
.tp-modal__actions--row { display: flex; flex-direction: row-reverse; gap: 10px; }
.tp-modal__actions--row > * { flex: 1 1 0; }
.tp #loginPaso1 { text-align: left; }
.tp-modal__switch {
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--tp-line);
  text-align: center; font-size: 15px; color: var(--tp-muted);
}
.tp-modal__switch a { margin-left: 4px; }
.tp-modal__forgot { margin-top: 10px; text-align: right; font-size: 13.5px; }
.tp-modal__legal { margin: 2px 2px 0; font-size: 13px; color: var(--tp-muted); }

/* Mensajes y contenido que inyecta funcionesTepido.js dentro del modal */
.tp #modalLoginMsj:not(:empty), .tp #modalContactoMsj:not(:empty) {
  margin-top: 6px; padding: 14px; border-radius: var(--tp-r-sm);
  background: var(--tp-soft); font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--tp-ink-2);
}
.tp #modalContactoMsj:not(:empty) { padding: 0; background: transparent; }
.tp #modalLoginMsj img { height: 22px; margin-right: 6px; vertical-align: -5px; }
.tp #mailValidation { font-size: 15px !important; color: var(--tp-ink-2); }
.tp #mailValidation .Font15 { font-size: 15px !important; }
.tp-modal .btn {
  display: flex; width: 100%; min-height: 48px; margin: 8px 0 0; padding: 10px 16px;
  border: 0; border-radius: 14px;
  font-size: 15px !important; font-weight: 700; letter-spacing: 0;
}
.tp-modal .btn-secondary, .tp-modal .btn-secondary:hover, .tp-modal .btn-secondary:focus { background: var(--tp-red); color: #fff; box-shadow: none; }
.tp-modal .btn-secondary:hover { background: var(--tp-red-600); }
.tp-modal .btn-default { background: var(--tp-soft) !important; color: var(--tp-ink-2); font-weight: 600 !important; }
.tp #mailValidCode {
  height: 64px; min-height: 0; padding: 0 12px;
  background: var(--tp-soft); border: 1.5px solid transparent; border-radius: 14px; box-shadow: none;
  font: 700 30px/1 var(--tp-display); letter-spacing: .3em; text-align: center; color: var(--tp-ink);
}
.tp #mailValidCode:focus { background: #fff; border-color: var(--tp-red); box-shadow: 0 0 0 4px rgba(255, 0, 19, .12); }

/* Mapa de confirmación de dirección */
.tp-map { position: relative; overflow: hidden; margin: 0 -28px; }
.tp .tp-map .divMsjOverMapMain { top: 12px; z-index: 2; pointer-events: none; }
.tp .divMsjOverMapTxt { padding: 7px 12px; border-radius: 999px; background: var(--tp-ink); font-weight: 600; box-shadow: var(--tp-shadow-sm); }
.tp .direccionCompletaCnt { margin: 18px 0 0; padding: 14px; background: var(--tp-soft); border-radius: var(--tp-r-sm); box-shadow: none; }
.tp .direccionCompletaCnt .title { font-size: 14px; color: var(--tp-muted); text-align: center; }
.tp .formEntreCallesCnt { margin: 16px 0 0; gap: 12px; align-items: flex-start; }
.tp .formEntreCallesCnt .form-group { margin: 0; }
.tp .formEntreCallesCnt .form-group label { margin: 0; }
.tp .formEntreCallesCnt .form-group label span {
  display: block; margin: 0 0 6px 2px; font-size: 13px; font-weight: 600; color: var(--tp-ink-2);
}
.tp .formEntreCallesCnt .form-group label input {
  height: 50px; min-height: 0; padding: 0 14px;
  background: var(--tp-soft); border: 1.5px solid transparent; border-radius: var(--tp-r-sm); box-shadow: none;
  font: 500 16px/1.2 var(--tp-font); color: var(--tp-ink);
}
.tp .formEntreCallesCnt .form-group label input:focus { background: #fff; border-color: var(--tp-red); box-shadow: 0 0 0 4px rgba(255, 0, 19, .12); }

@media (max-width: 520px) {
  .tp-modal .modal-dialog { margin: 10px auto; padding: 0 10px; }
  .tp-modal .modal-content { border-radius: 24px; }
  .tp-modal__head { padding: 22px 68px 0 20px; }
  .tp-modal .tituloModalTxt { font-size: 25px; }
  .tp-modal .modal-body { padding: 18px 20px 22px; }
  .tp-map { margin: 0 -20px; }
}

/* ---------- Avisos (toasts) ---------------------------------------------- */

.tp #msjConsole, .tp-toasts {
  position: fixed; left: 50%; bottom: 20px; z-index: 2000;
  width: min(92vw, 440px); min-width: 0;
  transform: translateX(-50%);
  display: grid; gap: 8px;
}
.tp .msjConsoleItem, .tp-toast {
  display: flex; align-items: center; gap: 10px;
  width: 100%; margin: 0; padding: 14px 16px;
  border-radius: 14px;
  color: #fff; font-size: 15px; font-weight: 600; line-height: 1.3;
  box-shadow: var(--tp-shadow);
}
.tp .msjConsoleIcon { margin: 0; }
.tp .msjConsoleClose { order: 9; float: none; margin: 0 0 0 auto; padding: 4px; }
.tp-toast { background: var(--tp-ink); animation: tp-toast-in .28s cubic-bezier(.2, .8, .2, 1); }
.tp-toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease; }
.tp-toast--ok i { color: #4ade9b; }
.tp-toast--error i { color: #ff7482; }
.tp-toast--warn i { color: #ffc15e; }
@keyframes tp-toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Mi perfil ----------------------------------------------------- */

body.tp-account { background: var(--tp-soft); }
.tp-account__main { max-width: 920px; margin: 0 auto; padding: 12px 16px 72px; }

.tp-profile-hero {
  position: relative; overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px 24px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--tp-red); color: #fff; border-radius: var(--tp-r-xl);
}
.tp-profile-hero::after {
  content: ""; position: absolute; right: -110px; top: -150px;
  width: 400px; height: 400px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .22);
  box-shadow: 0 0 0 70px rgba(255, 255, 255, .06);
  pointer-events: none;
}
.tp-profile-hero :focus-visible { outline-color: #fff; }
.tp-profile-hero > * { position: relative; z-index: 1; }

.tp-avatar {
  position: relative; flex: none;
  width: 104px; height: 104px; padding: 0; border: 4px solid #fff; border-radius: 50%;
  background: #fff; cursor: pointer;
  box-shadow: 0 16px 32px -14px rgba(70, 0, 6, .7);
  transition: transform .18s ease;
}
.tp-avatar:hover { transform: scale(1.04); }
.tp-avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.tp-avatar__edit {
  position: absolute; right: -6px; bottom: -4px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tp-ink); color: #fff; font-size: 13px; border: 3px solid var(--tp-red);
}
.tp-profile-hero__text { flex: 1 1 240px; min-width: 0; }
.tp-profile-hero h1 {
  font: 800 clamp(1.9rem, 3vw + .6rem, 2.9rem)/1.02 var(--tp-display); letter-spacing: -.015em; color: #fff;
  overflow-wrap: anywhere;
}
.tp-profile-hero__mail { margin-top: 8px !important; font-size: 19px; font-weight: 700; color: #fff; overflow-wrap: anywhere; }

.tp-tabs {
  display: flex; gap: 6px; margin: 16px 0; padding: 6px;
  background: #fff; border: 1px solid var(--tp-line); border-radius: 18px;
  overflow-x: auto; scrollbar-width: none;
}
.tp-tabs::-webkit-scrollbar { display: none; }
.tp-tabs a {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 16px; border-radius: 13px;
  font-size: 15px; font-weight: 600; color: var(--tp-ink-2); white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.tp-tabs a:hover { background: var(--tp-soft); color: var(--tp-ink); }
.tp-tabs a.is-active, .tp-tabs a.is-active:hover { background: var(--tp-ink); color: #fff; }
.tp-tabs i { font-size: 14px; }

.tp-card { padding: clamp(20px, 3.5vw, 36px); background: #fff; border: 1px solid var(--tp-line); border-radius: 28px; }
.tp-card__title { font: 800 24px/1.1 var(--tp-display); letter-spacing: -.02em; }
.tp-card__sub { margin: 6px 0 24px !important; font-size: 15px; color: var(--tp-muted); }
.tp-card__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 18px;
  margin-top: 12px; padding-top: 22px; border-top: 1px solid var(--tp-line);
}
.tp-card__status { margin-right: auto; font-size: 14px; color: var(--tp-muted); }

.tp-input-icon { position: relative; }
.tp-input-icon > i { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 13px; color: #a39b95; }
.tp-input-icon .tp-input { padding-right: 42px; }

.tp-avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 12px; }
.tp-avatars button {
  aspect-ratio: 1; padding: 0; border: 3px solid transparent; border-radius: 50%;
  background: var(--tp-soft); cursor: pointer; overflow: hidden;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.tp-avatars button:hover { transform: scale(1.06); }
.tp-avatars button[aria-pressed="true"] { border-color: var(--tp-red); box-shadow: 0 0 0 4px rgba(255, 0, 19, .16); }
.tp-avatars img { display: block; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 600px) {
  .tp-account__main { padding: 8px 10px 56px; }
  .tp-profile-hero { border-radius: 26px; }
  .tp-avatar { width: 88px; height: 88px; }
  .tp-profile-hero .tp-btn { width: 100%; }
  .tp-card { border-radius: 24px; }
  .tp-card__foot .tp-btn { width: 100%; }
  .tp-card__status { width: 100%; }
}
@media (max-width: 480px) {
  .tp-tabs { gap: 4px; }
  .tp-tabs a { flex: 1 1 0; flex-direction: column; gap: 6px; min-width: 0; padding: 10px 4px; font-size: 13px; line-height: 1.15; text-align: center; white-space: normal; }
}

/* ---------- Mi cuenta: direcciones y pedidos ------------------------------ */

.tp-profile-hero--compact { padding: clamp(18px, 3vw, 28px); gap: 14px 18px; }
.tp-profile-hero--compact .tp-avatar { width: 72px; height: 72px; border-width: 3px; }
.tp-profile-hero--compact h1 { font-size: clamp(1.5rem, 2vw + .7rem, 2.1rem); }
.tp-profile-hero--compact .tp-profile-hero__mail { margin-top: 4px !important; }
a.tp-avatar { display: block; cursor: pointer; }

.tp-card__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 22px; }
.tp-card__head .tp-card__sub { margin-bottom: 0 !important; }

.tp-btn--soft { background: var(--tp-soft); color: var(--tp-ink); }
.tp-btn--soft:hover:not(:disabled) { background: #ece7e2; color: var(--tp-ink); }
.tp-pedido .tp-btn--soft, .tp-address .tp-btn--soft { background: #fff; box-shadow: var(--tp-shadow-sm); }
.tp-pedido .tp-btn--soft:hover:not(:disabled) { background: #fff; box-shadow: var(--tp-shadow); }

.tp-iconbtn {
  flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent; color: var(--tp-muted); font-size: 15px; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.tp-iconbtn:hover { background: var(--tp-red-100); color: var(--tp-red-700); }

.tp-loading { display: grid; justify-items: center; gap: 12px; padding: 48px 16px; font-size: 15px; color: var(--tp-muted); }
.tp-loading .tp-spinner { width: 28px; height: 28px; border-width: 3px; color: var(--tp-red); }

.tp-empty { display: grid; justify-items: center; gap: 8px; padding: 40px 16px; text-align: center; }
.tp-empty__icon {
  width: 72px; height: 72px; margin-bottom: 8px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tp-red-50); color: var(--tp-red); font-size: 26px;
}
.tp-empty h3 { font: 800 22px/1.15 var(--tp-display); letter-spacing: -.01em; }
.tp-empty p { max-width: 40ch; font-size: 15px; color: var(--tp-muted); }
.tp-empty .tp-btn { margin-top: 12px; }

/* Direcciones */
.tp-list { display: grid; gap: 10px; }
.tp-address { display: flex; align-items: center; gap: 14px; padding: 14px 12px 14px 14px; background: var(--tp-soft); border-radius: var(--tp-r); }
.tp-address__icon {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--tp-red); font-size: 17px; box-shadow: var(--tp-shadow-sm);
}
.tp-address__body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.tp-address__body strong { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.tp-address__body span { font-size: 14.5px; color: var(--tp-ink-2); overflow-wrap: anywhere; }
.tp-address__alias {
  justify-self: start; margin-bottom: 3px; padding: 2px 9px; border-radius: 999px;
  background: #fff; font-size: 12px !important; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tp-ink-2) !important;
}

/* Pedidos */
.tp-orders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tp-pedido { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 16px; background: var(--tp-soft); border-radius: 20px; }
.tp-pedido__head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tp-pedido__logo {
  flex: none; width: 56px; height: 56px; border-radius: 14px;
  background: #fff center/contain no-repeat; border: 1px solid var(--tp-line);
}
.tp-pedido__info { min-width: 0; }
.tp-pedido__title { font: 700 18px/1.15 var(--tp-display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.tp-pedido__date { margin-top: 3px; font-size: 13.5px; color: var(--tp-muted); }
.tp-pedido__note { font-size: 14px; color: var(--tp-ink-2); }
.tp-pedido__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.tp-pedido__actions .tp-btn { flex: 1 1 auto; }

.tp-status {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px;
  background: #fff; color: var(--tp-ink-2); font-size: 13.5px; font-weight: 600; line-height: 1.25;
}
.tp-status--ok { background: #e3f6ed; color: #0a6b49; }
.tp-status--warn { background: #fff0d6; color: #8a4b00; }
.tp-status--error { background: #ffe3e6; color: #a30b1f; }

@media (max-width: 720px) { .tp-orders { grid-template-columns: minmax(0, 1fr); } }

/* Detalle del pedido */
.tp-detail__head { display: flex; align-items: center; gap: 14px; padding-right: 0; }
.tp-items { margin: 0; padding: 0; list-style: none; }
.tp-items li { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--tp-line); font-size: 15.5px; }
.tp-items li:last-child { border-bottom: 0; }
.tp-items span { overflow-wrap: anywhere; }
.tp-items b { flex: none; min-width: 38px; padding: 3px 10px; border-radius: 999px; background: var(--tp-soft); font-size: 14px; text-align: center; }

/* Calificación */
.tp-rate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 10px; padding: 12px 12px 12px 16px; background: var(--tp-soft); border-radius: 14px; }
.tp-rate__label { font-size: 16px; font-weight: 700; line-height: 1.2; }
.tp-rate__label small { display: block; font-size: 12.5px; font-weight: 500; color: var(--tp-muted); }
.tp-stars { display: flex; }
.tp-stars button { padding: 4px 3px; border: 0; background: transparent; color: #d3cbc4; font-size: 27px; line-height: 1; cursor: pointer; transition: transform .12s ease, color .12s ease; }
.tp-stars button:hover { transform: scale(1.15); }
.tp-stars button.is-on { color: #ffb400; }
.tp-rate-total { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0; font-size: 15px; color: var(--tp-ink-2); }
.tp-rate-total b { min-width: 46px; padding: 4px 10px; border-radius: 999px; background: var(--tp-ink); color: #fff; font-size: 15px; text-align: center; }

/* ---------- Entrada suave al hacer scroll --------------------------------- */

.tp-js .tp-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.tp-js .tp-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tp *, .tp *::before, .tp *::after { animation: none !important; transition: none !important; }
  .tp-js .tp-reveal { opacity: 1; transform: none; }
}

