:root {
  --bg: #fff4f8;
  --surface: #ffffff;
  --surface-soft: #fff8fb;
  --text: #24151f;
  --muted: #775d6c;
  --primary: #ef3f97;
  --primary-dark: #d92d82;
  --gold: #f2cf74;
  --top: #38a169;
  --border: #f1d7e5;
  --shadow: 0 10px 20px rgba(197, 82, 137, 0.12);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;

  --menu-bg: #0a0a0a;
  --menu-fg: #ffffff;
  --menu-shadow: rgba(0, 0, 0, 0.35);
  --menu-width: 250px;

  --header-height: 72px;
}

/* RESET */
html,
body {
  margin: 0;
  padding: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg, #fff8fb 0%, #fdeef6 100%);
  color: var(--text);
}

/* HEADER */
header {
  display: grid;
  grid-template-columns: 48px 1fr 140px;
  align-items: center;
  background-color: #000;
  padding: 10px 14px;
  border-bottom: 1px solid #222;
  border-top: 1px solid #ccc;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
}

.menu-toggle {
  position: static;
  font-size: 24px;
  cursor: pointer;
  z-index: 1001;
  color: #fff;
  background: none;
  border: none;
  padding: 0;
  width: 40px;
  height: 40px;
}

.logo {
  justify-self: center;
}

.logo img,
.logo-img {
  height: 44px;
  display: block;
  object-fit: contain;
}

.subscribe-btn {
  background-color: #ff3f81;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  justify-self: end;
  font-weight: 700;
  font-size: 14px;
}

.subscribe-btn:hover {
  background-color: #e83674;
}

/* MENÚ DESPLEGABLE */
.menu-dropdown {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--menu-width);
  height: 100%;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--menu-bg);
  color: var(--menu-fg);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.6);
  padding: 20px 25px;
}

.menu-dropdown.hidden {
  display: flex;
}

.menu-dropdown.visible {
  transform: translateX(0);
}

.menu-dropdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-dropdown ul li {
  margin: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-dropdown ul li:first-child {
  color: #ff4f8b;
  font-weight: bold;
  margin-bottom: 15px;
}

.menu-dropdown ul button {
  background: none;
  border: none;
  color: #ccc;
  font-size: 16px;
  cursor: pointer;
  text-align: left;
  padding: 12px 0;
  width: 100%;
  transition: all 0.2s ease;
}

.menu-dropdown ul button:hover {
  color: #ff4f8b;
  transform: translateX(6px);
}

/* LAYOUT LISTADO */
.page-listing .listing-page {
  padding-top: calc(var(--header-height) + 8px);
  padding-bottom: 24px;
}

/* HERO */
/* HERO */
.listing-hero {
  background: linear-gradient(180deg, #ff5ba7 0%, #f58dc2 100%);
}

.listing-hero.compact-hero {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 8px;
  padding: 10px 14px;
  align-items: center;
}

.search-pill {
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #3b2430;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 8px 14px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.search-main {
  font-size: 14px;
  font-weight: 800;
  color: #5a2945;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-sub {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  color: #a35a82;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-btn,
.compact-filter {
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #8f2d62;
  font-size: 14px;
  font-weight: 800;
  padding: 0 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.compact-filter {
  width: 92px;
}

/* ajuste móvil pequeño */
@media (max-width: 390px) {
  .listing-hero.compact-hero {
    grid-template-columns: 1fr 84px;
    gap: 6px;
    padding: 8px 12px;
  }

  .search-pill {
    min-height: 46px;
    padding: 7px 12px;
  }

  .search-main {
    font-size: 13px;
  }

  .search-sub {
    font-size: 11px;
  }

  .compact-filter {
    width: 84px;
    min-height: 46px;
    font-size: 13px;
    padding: 0 10px;
  }
}

/* PREMIUM SUPERIOR */
.premium-top {
  padding: 14px;
}

.premium-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: linear-gradient(180deg, #fff6fb 0%, #fff1f7 100%);
  padding: 10px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid #f4d7e6;
}

.premium-top-main {
  grid-column: span 2;
  min-height: 270px;
}

.premium-top-side {
  min-height: 130px;
}

.premium-top-main,
.premium-top-side {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fffef8 0%, #fff8fc 100%);
  border: 2px solid #f0d58d;
}

.premium-top-main .card-photo {
  height: 160px;
}

.premium-top-side .card-photo {
  height: 78px;
}

.premium-top-side .card-info.compact h3 {
  font-size: 16px;
}

.premium-top-side .price {
  margin-top: 8px;
  font-size: 12px;
  min-height: 30px;
  padding: 0 10px;
}

/* FEED */
.feed-section {
  padding: 0 14px;
}

.feed-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 8px 0 12px;
}

.feed-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.feed-header span {
  color: #b63879;
  font-size: 14px;
  font-weight: 600;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

/* CARDS */
.card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card-name {
  margin: 0;
  font-size: 15px;
  line-height: 1.1;
  font-weight: 800;
  color: var(--text);
}

.card-headline {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.50;
  font-weight: 600;
  color: #7b2f58;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.premium-headline {
  font-size: 13px;
}

.card-meta {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.2;
}

.card:active {
  transform: scale(0.99);
}

.card-photo {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f6dce9;
}

.card-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.card-info {
  padding: 10px;
}

.card-info.compact {
  padding: 8px;
}

.card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
}

.card-info.compact h3 {
  font-size: 15px;
}

.card p {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.25;
}

.card-info.compact p {
  font-size: 12px;
  margin-top: 4px;
}

.card-meta-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* PRECIOS */
.price {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 6px;
  border-radius: 999px;
  margin-top: 2px;
  background: linear-gradient(135deg, #ff4fa8 0%, #df2d84 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

/* BADGES */
.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

.badge-premium {
  background: linear-gradient(135deg, #f6df9a 0%, #e2b84a 100%);
  color: #6a4b00;
}

.badge-top {
  background: linear-gradient(135deg, #5cc17c 0%, #359f5e 100%);
  color: white;
}

/* FEED ITEMS */
.card-feed {
  grid-column: span 1;
}

.card-feed .card-photo {
  aspect-ratio: 1 / 0.85;
}

.premium-feed {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 170px;
  border: 2px solid #f3d67f;
  background: linear-gradient(180deg, #fffaf0 0%, #fff7fb 100%);
}

.premium-feed .card-photo {
  height: 100%;
}

.premium-feed .card-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.top {
  border-color: #d8eadf;
}

.normal {
  border-color: var(--border);
}

/* FOOTER SOLO PERFIL */
footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-top: 1px solid #ddd;
  z-index: 1000;
}

.page-listing footer {
  display: none;
}

.page-profile footer {
  display: flex;
}

/* WHATSAPP PERFIL */
.whatsapp-container {
  display: flex;
  align-items: center;
  background-color: #25D366;
  padding: 5px 10px;
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.whatsapp-icon {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: white;
}

.whatsapp-icon img {
  width: 30px;
  height: 30px;
  margin-right: 10px;
  object-fit: contain;
}

.whatsapp-text {
  font-size: 14px;
  color: white;
  font-weight: bold;
}

/* TABS PERFIL */
.tabs {
  display: flex;
  flex-grow: 1;
  justify-content: space-around;
  margin-left: 10px;
}

.tab {
  padding: 10px 15px;
  border: none;
  background-color: transparent;
  cursor: pointer;
  font-size: 14px;
  flex-grow: 1;
  text-align: center;
  color: #888;
  font-weight: bold;
}

.tab.active {
  color: #ff3f81;
  border-bottom: 2px solid #ff3f81;
}

/* PREVIEW / BOTTOM SHEET */
.hidden {
  display: none !important;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 18, 0.55);
  z-index: 1200;
}

.preview-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1300;
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18);
  max-height: 88vh;
  overflow-y: auto;
  padding: 14px 14px 18px;
  animation: sheetUp 0.22s ease;
}

@keyframes sheetUp {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sheet-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 18px;
  cursor: pointer;
  z-index: 2;
}

.sheet-main-photo {
  overflow: hidden;
  border-radius: 18px;
  background: #f6dce9;
}

.sheet-main-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.sheet-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.sheet-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #f0d6e3;
  flex: 0 0 auto;
  cursor: pointer;
  background: #f6dce9;
  padding: 0;
}

.sheet-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sheet-content {
  margin-top: 14px;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.sheet-head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.05;
}

.sheet-head p {
  margin: 6px 0 0;
  color: #775d6c;
  font-size: 14px;
}

.sheet-description {
  margin: 12px 0 0;
  color: #4e3b46;
  font-size: 14px;
  line-height: 1.45;
}

.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.sheet-btn {
  flex: 1;
  min-height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
}

.sheet-btn.primary {
  background: linear-gradient(135deg, #ff4fa8 0%, #df2d84 100%);
  color: #fff;
}

.sheet-btn.secondary {
  background: #f7e1ec;
  color: #a32d69;
}

body.sheet-open {
  overflow: hidden;
}

/* BLOQUES HEREDADOS DE PERFIL */
.banner-wrapper {
  position: relative;
  text-align: center;
}

.username-overlay {
  position: absolute;
  position: fixed;
  top: 75px;
  left: 0;
  width: 100%;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
}

.username {
  color: white;
  font-size: 18px;
  font-weight: bold;
  text-transform: capitalize;
}

.banner-photo {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.lob {
  font-family: 'Lobster', cursive;
  font-size: 18px;
  text-align: center;
  background-color: #ff3f81;
  padding: 25px;
  color: white;
}

.lobi {
  font-family: 'Lobster', cursive;
  font-size: 22px;
}

.profile-photo-container {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  width: 100px;
  height: 100px;
  background-color: #fff;
  z-index: 2;
  margin-bottom: 10px;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 15px;
  padding-bottom: 80px;
}

.photo-container {
  position: relative;
}

.photo-container img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-container img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#photo-viewer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow: hidden;
}

#photo-viewer.hidden {
  display: none;
}

#current-photo {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 10px 20px;
  cursor: pointer;
  z-index: 1001;
  transition: background 0.3s ease;
}

#prev-button {
  left: 20px;
}

#next-button {
  right: 20px;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.6);
  color: #000;
}

.new-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #ff3f81;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.photo-footer {
  padding: 8px;
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
  text-align: left;
}

.description {
  font-size: 14px;
  color: #333;
  margin: 4px 0;
}

.reactions {
  display: flex;
  gap: 4px;
}

.reaction {
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.reaction:hover {
  transform: scale(1.2);
}

.photo-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.photo-modal.hidden {
  display: none;
}

#modal-photo {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
}

.reaction-bar {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ddd;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  gap: 10px;
  z-index: 1000;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.reaction-bar.visible {
  opacity: 1;
  transform: scale(1);
}

.reaction-bar.hidden {
  opacity: 0;
  transform: scale(0.9);
}

.reaction-option {
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.3s ease;
}

.reaction-option:hover {
  transform: scale(1.2);
  color: #007BFF;
}

.reactions-container {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.reaction.selected {
  color: #007BFF;
}

.reaction.bounce {
  animation: bounce 0.5s ease forwards;
}

.reaction.user-reacted {
  background-color: #007BFF;
  color: #fff;
  border-radius: 5px;
  padding: 3px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

@keyframes bounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.8);
  }
}

/* RESPONSIVE */
@media (max-width: 560px) {
  header {
    grid-template-columns: 42px 1fr 120px;
    padding: 10px 12px;
  }

  .logo img,
  .logo-img {
    height: 38px;
  }

  .subscribe-btn {
    padding: 9px 12px;
    font-size: 13px;
  }

  .listing-hero h1 {
    font-size: 24px;
  }

  .premium-box {
    grid-template-columns: 2fr 1fr;
  }

  .premium-top-main {
    grid-column: 1 / 2;
    grid-row: span 2;
    min-height: 250px;
  }

  .premium-top-side {
    min-height: 120px;
  }

  .feed-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-feed {
    grid-column: span 1;
  }

  .premium-feed {
    grid-column: span 2;
  }
}

@media (max-width: 390px) {
  header {
    grid-template-columns: 40px 1fr 110px;
  }

  .subscribe-btn {
    padding: 8px 10px;
    font-size: 12px;
  }

  .premium-box {
    grid-template-columns: 1fr 1fr;
  }

  .premium-top-main {
    grid-column: span 2;
    grid-row: auto;
  }

  .premium-top-side {
    min-height: 120px;
  }

  .card h3 {
    font-size: 18px;
  }

  .card-info.compact h3 {
    font-size: 14px;
  }

  .sheet-actions {
    flex-direction: column;
  }
}