:root {
  --cafe: #d5cdbd;
  --rosa: #ebbdab;
  --verde: #c4cf92;
  --amarillo: #eaca6b;
  --dark: #1f1f1f;
  --container-max: 1120px;
  --container-pad: 1.4rem;
}

* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  margin: 0;
  background: #f6f4ef;
  /* café MUY suave */
  color: var(--dark);
}

/* HERO */
.hero {
  text-align: center;
  padding: 2rem 1.5rem 0.8rem;
}

.logo {
  width: 90px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.hero p {
  opacity: 0.8;
}

.hero-note {
  font-size: 0.85rem;
  opacity: 0.65;
  margin-top: 0.5rem;
}

.btn-primary {
  background: var(--dark);
  color: white;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

/* APPS */
.apps {
  padding: 0.6rem 0 0;
}

.apps h2 {
  margin-bottom: 1rem;
}

.subscriptions-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
  text-align: center;
}

.app-card {
  background: #fbfaf7;
  /* blanco cálido */
  border-radius: 18px;
  padding: 1.2rem 1.3rem;
  margin-bottom: 1rem;   
  height: 130px;

  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.05),
    0 1px 3px rgba(0, 0, 0, 0.04);

  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.08),
    0 4px 6px rgba(0, 0, 0, 0.06);
}

.app-card select {
  margin-top: 0.8rem;
}


.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.app-name {
  font-weight: 600;
  font-size: 1.1rem;
}

select {
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.6rem;
  border-radius: 8px;
  border: none;
}

.price {
  margin-top: 0.8rem;
  font-weight: 600;
}

/* TOGGLE SWITCH */
.switch {
  position: relative;
  width: 48px;
  height: 26px;
}

.switch input {
  display: none;
}

.slider {
  background: #ccc;
  border-radius: 999px;
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.slider::before {
  content: "";
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: 0.3s;
}

.switch input:checked+.slider {
  background: var(--dark);
}

.switch input:checked+.slider::before {
  transform: translateX(22px);
}

/* TOTAL */

/* SECTIONS */
section {
  padding: 1.8rem 1.5rem;
  text-align: center;
}

.share {
  padding: 0;
}

.btn-secondary {
  background: var(--dark);
  color: white;
  border: none;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  margin-top: 1rem;
}

.email-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.email-form input {
  flex: 1;
  padding: 0.7rem;
  border-radius: 8px;
  border: none;
}

.email-form button {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: none;
  background: var(--dark);
  color: white;
}

.suggest textarea {
  width: 100%;
  height: 80px;
  margin-top: 1rem;
  border-radius: 10px;
  padding: 0.7rem;
  border: none;
}

.suggest button {
  margin-top: 1rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: var(--dark);
  color: white;
}

/* FOOTER */
footer {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

.app-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.app-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  background: white;
  padding: 2px;
}
.platform-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.75;
  transition: filter 0.25s ease, opacity 0.25s ease;
}
.app-card:hover .platform-logo {
  filter: none;
  opacity: 1;
}
.app-card.is-active .platform-logo {
  filter: none;
  opacity: 1;
}
.app-card.is-active:hover .platform-logo {
  filter: none;
  opacity: 1;
}

.search-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: white;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.2rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.search-wrapper:focus-within {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 2px var(--verde);
}

.search-icon {
  font-size: 1.1rem;
  opacity: 0.6;
  margin-left: 0.2rem;
}

.search-input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 0.95rem;
  color: var(--dark);
}

.search-input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  opacity: 0.6;
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.clear-search {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  opacity: 0.4;
  cursor: pointer;
  display: none;
}

.clear-search:hover {
  opacity: 0.8;
}

.view-toggle {
  display: inline-flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
  flex-wrap: wrap;
}

.category-chips {
  display: inline-flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.search-hint {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #6b7280;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  display: inline-block;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.search-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.chip {
  background: #f3f4f6;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #374151;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  cursor: pointer;
}

.chip:hover {
  background: #e7eaee;
}

.chip.is-active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.toggle-btn {
  background: #f3f4f6;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #374151;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
}

.toggle-btn:hover {
  background: #e7eaee;
}

.toggle-btn.is-active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.total-bar {
  position: fixed;
  bottom: 1rem;
  left: max(var(--container-pad), calc((100vw - var(--container-max)) / 2 + var(--container-pad)));
  right: max(var(--container-pad), calc((100vw - var(--container-max)) / 2 + var(--container-pad)));
  z-index: 50;
  backdrop-filter: none;
}

.total-bar-inner {
  width: 100%;
  margin: 0 auto;
  max-width: 680px;

  background: #ebe7dd;
  border-radius: 18px;
  padding: 1.4rem 1.6rem 0.4rem;
  min-height: 180px;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.total-bar .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  /* gris medio */
  margin-bottom: 0.4rem;
}

.total-bar .amount {
  font-size: 2.1rem;
  font-weight: 700;
  color: #111827;
  /* casi negro */
}

.total-bar .annual {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.total-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 999px;
}


.total-content {
  max-width: 720px;
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
}

.total-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.6);
  margin-bottom: 0.3rem;
}

.total-annual {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.55);
}

.total-amount {
  font-size: 2rem;
  font-weight: 700;
  color: #1f1f1f;
}

@keyframes total-bounce {
  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.08);
  }

  60% {
    transform: scale(0.97);
  }

  100% {
    transform: scale(1);
  }
}

.total-amount.bounce {
  animation: total-bounce 220ms ease-out;
}

.active-count {
  font-size: 0.8rem;
  opacity: 0.65;
  min-height: 1em;
}

.reset-btn {
  margin-top: 0.6rem;
  background: transparent;
  border: none;
  font-size: 0.8rem;
  opacity: 0.5;
  cursor: pointer;
}

.reset-btn:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.footer-inline {
  margin-top: 0.35rem;
  font-size: 0.62rem;
  color: rgba(0, 0, 0, 0.55);
}

.yearly-total {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 0.2rem;
  min-height: 1em;
}

.active-count:empty::before,
.yearly-total:empty::before {
  content: "—";
}

.container {
  width: 100%;
  max-width: var(--container-max);
  /* 👈 clave */
  margin: 0 auto;
  padding: 0 var(--container-pad);
  /* espacio para el total fijo */
}

@media (min-width: 768px) {
  .container {
    padding-left: 0;
    padding-right: 0;
  }
}

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


.card-highlight {
  background: #f7f3e9;
  /* amarillo MUY suave */
  border-radius: 20px;
  padding: 1.6rem 1.4rem;
  text-align: center;

  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.05),
    0 1px 3px rgba(0, 0, 0, 0.04);
}

.share .card-highlight {
  max-width: 640px;
  margin: 0 auto;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 1.2rem;
  gap: 0.5rem;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.2);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-outline:hover {
  background: rgba(0, 0, 0, 0.05);
}

.icon-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.icon.whatsapp {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%2325D366' d='M16 3C9.4 3 4 8.1 4 14.5c0 2.5.8 4.9 2.3 6.9L4 29l7.8-2.3c2 .6 4.1.9 6.2.9 6.6 0 12-5.1 12-11.5S22.6 3 16 3zm6.5 16.6c-.3.8-1.6 1.6-2.3 1.7-.7.1-1.6.2-4.5-.9-3.5-1.3-5.8-4.9-6-5.2-.2-.3-1.4-1.9-1.4-3.6s.9-2.6 1.2-3c.3-.3.6-.4.8-.4h.6c.2 0 .5-.1.8.6.3.8 1 2.6 1.1 2.8.1.2.1.4 0 .6-.1.2-.2.4-.3.6-.2.2-.4.4-.5.5-.2.2-.4.4-.2.8.2.4 1 1.6 2.1 2.6 1.4 1.2 2.6 1.6 3 1.8.4.2.6.2.8-.1.2-.3.9-1 1.1-1.3.3-.3.5-.3.9-.2.4.1 2.5 1.2 2.9 1.4.4.2.6.3.7.5.1.2.1.9-.2 1.7z'/%3E%3C/svg%3E");
}

.icon.x {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000000' d='M18.3 2H21l-6.6 7.5L22 22h-6.7l-5.2-6.8L4.6 22H2l7.1-8.1L2 2h6.8l4.7 6.2L18.3 2z'/%3E%3C/svg%3E");
}

.icon.copy {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000000' d='M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 18H8V7h11v16z'/%3E%3C/svg%3E");
}

.icon.share {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000000' d='M18 16.1c-.8 0-1.5.3-2 .8L8.9 12.7c.1-.2.1-.5.1-.7s0-.5-.1-.7l7-4.1c.5.5 1.2.8 2 .8 1.7 0 3-1.3 3-3S19.7 2 18 2s-3 1.3-3 3c0 .2 0 .5.1.7l-7 4.1C7.6 9.3 6.9 9 6.1 9c-1.7 0-3 1.3-3 3s1.3 3 3 3c.8 0 1.5-.3 2-.8l7.1 4.2c-.1.2-.1.4-.1.6 0 1.6 1.3 2.9 3 2.9s3-1.3 3-2.9-1.3-2.9-3-2.9z'/%3E%3C/svg%3E");
}

.icon.instagram {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23000000' d='M224 202.7c-30.9 0-56 25.1-56 56s25.1 56 56 56 56-25.1 56-56-25.1-56-56-56zm124.7-41c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zM398.8 80c-7.8-17.5-18.5-32.8-32-46.3S336.9 9 319.4 1.2C301.7-6.6 282.4-10 256-10H192C165.6-10 146.3-6.6 128.6 1.2c-17.5 7.8-32.8 18.5-46.3 32S57.8 62.5 50 80C42.2 97.7 38.8 117 38.8 143.4V368.6c0 26.4 3.4 45.7 11.2 63.4 7.8 17.5 18.5 32.8 32 46.3s28.8 24.2 46.3 32c17.7 7.8 37 11.2 63.4 11.2h64c26.4 0 45.7-3.4 63.4-11.2 17.5-7.8 32.8-18.5 46.3-32s24.2-28.8 32-46.3c7.8-17.7 11.2-37 11.2-63.4V143.4c0-26.4-3.4-45.7-11.2-63.4z'/%3E%3C/svg%3E");
}

.btn-outline:hover .icon {
  opacity: 0.85;
}

.share-actions button {
  min-height: 32px;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
}

.share-actions .btn-secondary:active {
  transform: scale(0.97);
}


.share-actions .btn-secondary:hover {
  background: #295f44;
}

.section-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .subscriptions-header {
    align-items: center;
  }

  .search-wrapper {
    max-width: 100%;
  }

  .section-title {
    text-align: center;
  }
}

.search-wrapper {
  max-width: 240px;
  margin: 0 auto;
  position: sticky;
  top: 0.6rem;
  z-index: 40;
  background: #ffffff;
  padding: 0.3rem 0;
}

.search-input {
  width: 100%;
}

.plan-selector {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.plan-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  /* gris suave */
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.plan-selector select {
  appearance: none;
  /* quita estilo default */
  background-color: #f8faf9;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%236b7280' d='M5.5 7l4.5 5 4.5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 14px;
}

.plan-selector select:hover {
  background-color: #f1f5f3;
}

.plan-selector select:focus {
  outline: none;
  border-color: #2f6f4e;
  /* verde Wabi */
  box-shadow: 0 0 0 2px rgba(47, 111, 78, 0.2);
}

.plan-hint {
  font-size: 0.7rem;
  color: #9ca3af;
}

.plan-selector.single-plan select {
  background-color: #f3f4f6;
  cursor: default;
}

.plan-selector.single-plan select:disabled {
  color: #374151;
}

.plan-selector.single-plan::after {
  content: "Sin opciones adicionales";
  font-size: 0.65rem;
  color: #9ca3af;
  margin-top: 0.2rem;
}




@media (min-width: 768px) {
  .app-card {
    padding: 1.4rem 1.6rem;
  }

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

  .tooltip-wrapper:hover .tooltip {
    opacity: 1;
  }
}

@media (min-width: 1024px) {
  .apps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 767px) {
  .tooltip {
    display: none;
  }
}

.share-actions button {
  height: 32px;
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;

  display: flex;
  align-items: center;
  gap: 0.45rem;

  border-radius: 999px;
}

#share-native {
  display: none;
}

@media (max-width: 640px) {
  #share-native {
    display: flex;
    font-weight: 600;
  }

  #share-instagram {
    display: flex;
  }
}

#share-instagram {
  display: none;
}

.tooltip-wrapper {
  position: relative;
}

.tooltip {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);

  background: #111;
  color: #fff;
  font-size: 0.7rem;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;

  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.feedback {
  padding: 1.8rem 0 9rem;
}

.feedback-card {
  max-width: 640px;
  /* igual que el share */
  margin: 0 auto;
  text-align: center;
  margin-bottom: 100px;
}

.feedback-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.feedback-form input {
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 0.85rem;
}

.feedback-note {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.7rem;
  color: #9ca3af;
}

.feedback-counter {
  align-self: flex-end;
  font-size: 0.7rem;
  color: #9ca3af;
}

.feedback-counter.is-warning {
  color: #b45309;
}

.feedback-counter.is-danger {
  color: #b91c1c;
  font-weight: 600;
}

.feedback-form textarea {
  resize: vertical;
  min-height: 70px;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 0.85rem;
  font-family: inherit;
}

.feedback-success {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: #374151;
  /* gris oscuro */
  text-align: center;
}

.feedback-success {
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.category-section {
  margin-bottom: 1.2rem;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.category-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.toggle-category {
  font-size: 0.75rem;
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
}

.category-content.collapsed {
  display: none;
}

.category-content.expanded {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.8rem;
}
