:root {
  --pink: #ff3f7d;
  --pink-dark: #ec2d69;
  --pink-soft: #ffe8ef;
  --ink: #171417;
  --muted: #716a6d;
  --line: #ebe6e8;
  --white: #ffffff;
  --page: #faf9fa;
  --green-bg: #e7f6d9;
  --green-text: #2d6e31;
  --amber-bg: #fff0bd;
  --amber-text: #7d5d00;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #efefef;
  font-family: "Inter", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  width: min(100%, 430px);
  height: 74px;
  margin: 0 auto;
  padding: 9px 16px;

  display: flex;
  align-items: center;
  justify-content: flex-start;

  position: sticky;
  top: 0;
  z-index: 30;

  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;

  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 47px;
  height: 47px;
}

.brand span,
.brand strong {
  display: block;
  line-height: 0.9;
}

.brand span {
  font-size: 13px;
  font-weight: 700;
}

.brand strong {
  color: var(--pink);
  font-family: "Manrope", sans-serif;
  font-size: 27px;
  font-weight: 800;
}

.admin-button {
  display: none !important;
}

main {
  width: min(100%, 430px);
  min-height: calc(100dvh - 74px);
  margin: 0 auto;

  background: var(--page);
}

.view {
  display: none;
  padding: 14px 14px 92px;
}

.view.active {
  display: block;
}

/* ==============================
   INICIO SIN DESPLAZAMIENTO
============================== */

html.home-active,
body.home-active {
  height: 100%;
  overflow: hidden;
}

#inicio.view.active {
  height: calc(100dvh - 74px - 70px);
  padding: 10px 14px 8px;

  overflow: hidden;
}

.home-layout {
  height: 100%;

  display: grid;
  grid-template-rows:
    minmax(0, 1fr)
    auto
    minmax(90px, 15vh)
    auto;

  gap: 8px;
}

.home-hero {
  min-height: 0;
  padding: 17px;

  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 10px;
  align-items: stretch;

  overflow: hidden;

  border: 1px solid #f1d8e0;
  border-radius: 23px;

  background:
    radial-gradient(
      circle at 95% 10%,
      rgba(255, 255, 255, 0.9),
      transparent 110px
    ),
    linear-gradient(145deg, #fff 0%, #ffe8ef 100%);
}

.hero-text {
  min-width: 0;
  align-self: center;
}

.eyebrow {
  display: block;

  color: var(--pink);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-text h1 {
  margin: 8px 0 8px;

  font-family: "Manrope", sans-serif;
  font-size: clamp(22px, 6.7vw, 30px);
  line-height: 1;
}

.hero-text p {
  margin: 0 0 11px;

  color: var(--muted);
  font-size: clamp(10px, 2.9vw, 13px);
  line-height: 1.35;
}

.primary-button {
  min-height: 40px;
  padding: 9px 13px;

  border: 0;
  border-radius: 12px;

  color: white;
  background: linear-gradient(90deg, var(--pink), var(--pink-dark));

  font-size: 12px;
  font-weight: 800;
}

.hero-product {
  min-width: 0;
  min-height: 0;

  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;

  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 17px;

  background: white;
}

.hero-photo {
  min-height: 0;
  overflow: hidden;
  background: #f3f3f3;
}

.hero-photo img {
  width: 100%;
  height: 135%;

  object-fit: cover;
  object-position: center top;

  transform: translateY(-1%);
}

.hero-product-data {
  padding: 7px 9px 8px;
  background: white;
}

.hero-product-data small,
.hero-product-data strong,
.hero-product-data span {
  display: block;
}

.hero-product-data small {
  color: var(--pink);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-product-data strong {
  margin: 2px 0;

  overflow: hidden;

  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-product-data span {
  color: var(--pink);
  font-size: 16px;
  font-weight: 800;
}

.home-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.home-section-title small {
  color: var(--pink);
  font-size: 8px;
  font-weight: 700;
}

.home-section-title h2 {
  margin: 0;

  font-family: "Manrope", sans-serif;
  font-size: 18px;
}

.home-section-title button {
  border: 0;
  background: none;

  color: var(--pink);
  font-size: 10px;
  font-weight: 700;
}

.home-featured-list {
  display: flex;
  gap: 8px;

  overflow-x: auto;
  scrollbar-width: none;
}

.home-featured-list::-webkit-scrollbar {
  display: none;
}

.home-featured-card {
  flex: 0 0 calc(88% - 4px);

  min-height: 0;
  padding: 8px;

  display: grid;
  grid-template-columns: 83px 1fr;
  gap: 10px;
  align-items: center;

  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: 17px;

  background: white;
}

.home-featured-photo {
  width: 83px;
  height: 100%;

  overflow: hidden;

  border-radius: 12px;

  background: #f3f3f3;
}

.home-featured-photo img {
  width: 100%;
  height: 145%;

  object-fit: cover;
  object-position: center top;
}

.home-featured-card h3 {
  margin: 0 0 3px;

  overflow: hidden;

  font-size: 12px;
  line-height: 1.15;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-featured-card strong {
  display: block;

  margin-bottom: 4px;

  color: var(--pink);
  font-size: 18px;
}

.home-categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.home-categories button {
  min-height: 47px;
  padding: 5px 2px;

  border: 1px solid var(--line);
  border-radius: 13px;

  color: var(--ink);
  background: white;

  font-size: 8px;
  font-weight: 600;
}

.home-categories span {
  display: block;
  margin-bottom: 2px;
  font-size: 15px;
}

@media (max-height: 700px) {
  .home-layout {
    grid-template-rows:
      minmax(0, 1fr)
      auto
      minmax(78px, 13vh)
      auto;

    gap: 6px;
  }

  .home-hero {
    padding: 13px;
  }

  .hero-text h1 {
    margin-top: 5px;
    font-size: clamp(20px, 6vw, 26px);
  }

  .hero-text p {
    margin-bottom: 7px;
    font-size: 10px;
  }

  .primary-button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 10px;
  }

  .home-section-title small {
    display: none;
  }

  .home-featured-card {
    grid-template-columns: 72px 1fr;
  }

  .home-featured-photo {
    width: 72px;
  }

  .home-categories button {
    min-height: 40px;
  }
}

/* ==============================
   ENCABEZADOS INTERNOS
============================== */

.page-header {
  height: 65px;
  margin: -14px -14px 15px;

  display: flex;
  align-items: center;
  justify-content: center;

  position: relative;

  color: white;
  background: linear-gradient(90deg, var(--pink), #ff648f);
}

.page-header button {
  position: absolute;
  left: 13px;

  border: 0;
  background: none;

  color: white;
  font-size: 24px;
}

.page-header h2 {
  margin: 0;
  font-size: 19px;
}

/* ==============================
   PRODUCTOS
============================== */

.search-box {
  padding: 0 13px;

  display: flex;
  align-items: center;

  border: 1px solid var(--line);
  border-radius: 15px;

  background: white;
}

.search-box input {
  width: 100%;
  height: 47px;

  border: 0;
  outline: 0;
}

.search-box span {
  font-size: 23px;
}

.filters {
  display: flex;
  gap: 7px;

  margin: 11px 0 12px;

  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filters button {
  flex: 0 0 auto;
  padding: 8px 13px;

  border: 1px solid var(--line);
  border-radius: 999px;

  background: white;

  font-size: 11px;
}

.filters button.active {
  color: white;
  border-color: var(--pink);
  background: var(--pink);
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.product-card {
  padding: 9px;

  border: 1px solid var(--line);
  border-radius: 17px;

  background: white;
}

.product-photo {
  aspect-ratio: 1 / 1;

  overflow: hidden;

  border-radius: 12px;

  background: #f2f2f2;
}

.product-photo img {
  width: 100%;
  height: 145%;

  object-fit: cover;
  object-position: center top;
}

.product-card h3 {
  min-height: 34px;
  margin: 8px 0 3px;

  font-size: 13px;
  line-height: 1.2;
}

.product-card > strong {
  color: var(--pink);
  font-size: 20px;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;

  margin-top: 6px;
}

.stock,
.tacc {
  padding: 5px 7px;

  border-radius: 999px;

  font-size: 9px;
}

.disponible {
  color: var(--green-text);
  background: var(--green-bg);
}

.poco-stock {
  color: var(--amber-text);
  background: var(--amber-bg);
}

.sin-stock {
  color: #666;
  background: #eeeeee;
}

.tacc {
  color: white;
  background: var(--pink);
}

/* ==============================
   PROMOCIONES
============================== */

.promo-carousel {
  display: flex;
  gap: 11px;

  margin: 0 -14px;
  padding: 0 14px;

  overflow-x: auto;

  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.promo-carousel::-webkit-scrollbar {
  display: none;
}

.promo-card {
  flex: 0 0 92%;

  overflow: hidden;

  scroll-snap-align: center;

  border: 1px solid var(--line);
  border-radius: 21px;

  background: white;
}

.promo-photo {
  height: 180px;
  overflow: hidden;
  background: #f1f1f1;
}

.promo-photo img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.promo-content {
  padding: 14px;
}

.promo-content > span {
  color: var(--pink);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.promo-content h3 {
  margin: 5px 0;
  font-size: 20px;
}

.promo-content p {
  margin: 0 0 8px;

  color: var(--muted);
  font-size: 12px;
}

.promo-content strong {
  color: var(--pink);
  font-size: 26px;
}

.promo-dots {
  display: flex;
  justify-content: center;
  gap: 5px;

  margin: 10px 0 15px;
}

.promo-dots button {
  width: 7px;
  height: 7px;
  padding: 0;

  border: 0;
  border-radius: 50%;

  background: #dddddd;
}

.promo-dots button.active {
  width: 20px;
  border-radius: 999px;
  background: var(--pink);
}

.info-card {
  margin-top: 11px;
  padding: 15px;

  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 11px;
  align-items: center;

  border-radius: 18px;
}

.sin-tacc-card {
  background: #eef8dc;
}

.copies-card {
  background: #eaf3ff;
}

.info-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.info-card h3 {
  margin: 4px 0;
  font-size: 18px;
}

.info-card p {
  margin: 0 0 9px;

  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.info-card button {
  padding: 9px 12px;

  border: 0;
  border-radius: 11px;

  color: white;
  background: var(--pink);

  font-size: 11px;
  font-weight: 700;
}

.round-icon,
.copy-icon {
  width: 78px;
  height: 78px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  color: white;
  background: var(--pink);

  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.copy-icon {
  color: #4b83ba;
  background: white;
  font-size: 34px;
}

/* ==============================
   FOTOCOPIAS
============================== */

.copy-price-list {
  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: 17px;

  background: white;
}

.copy-price-list div {
  padding: 15px;

  display: flex;
  justify-content: space-between;
  gap: 12px;

  border-bottom: 1px solid var(--line);
}

.copy-price-list div:last-child {
  border-bottom: 0;
}

.copy-price-list span {
  font-size: 13px;
}

.copy-price-list strong {
  color: var(--pink);
}

.copy-contact {
  margin-top: 16px;
  padding: 15px;

  border: 1px solid var(--line);
  border-radius: 17px;

  background: white;
}

.copy-contact h3 {
  margin-top: 0;
}

.copy-contact label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
}

.copy-contact input {
  width: 100%;
  height: 47px;
  padding: 0 12px;

  border: 1px solid var(--line);
  border-radius: 12px;
}

.contact-button {
  height: 47px;
  margin-top: 9px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.whatsapp {
  background: #22bd56;
}

.email {
  background: var(--pink);
}

.copy-contact p {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

/* ==============================
   MENÚ INFERIOR
============================== */

.bottom-nav {
  width: min(100%, 430px);
  height: 70px;

  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;

  display: grid;
  grid-template-columns: repeat(4, 1fr);

  transform: translateX(-50%);

  border-top: 1px solid var(--line);

  background: rgba(255, 255, 255, 0.98);
}

.bottom-nav button {
  border: 0;
  background: none;

  color: #6f686b;
  font-size: 9px;
}

.bottom-nav span {
  display: block;
  margin-bottom: 2px;
  font-size: 19px;
}

.bottom-nav button.active {
  color: var(--pink);
}