/* =========================================================
   PINO FACU · Reventa (reventa.html)
   Reemplaza los tres bloques de estilos anteriores, que se
   pisaban entre sí con !important, por una sola hoja.
   ========================================================= */

:root {
  --whatsapp: #25d366;
  --bar-height: 78px;
}

body {
  padding-bottom: var(--bar-height); /* deja ver el pie detrás de la barra fija */
}

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

.rv-hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0 95px;
  background: radial-gradient(ellipse at 80% 20%, #f6d85d 0%, #ffae71 32%, #fc5d5c 85%);
}

.rv-hero::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 38px;
  background: #fff;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.rv-hero .pf-wrap {
  position: relative;
  z-index: 1;
}

.rv-hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(50px, 7vw, 95px);
  line-height: 0.95;
  color: #fff;
}

.rv-hero h1 span {
  color: var(--ink);
}

.rv-lead {
  max-width: 660px;
  margin: 0;
  font-size: clamp(16px, 2vw, 21px);
  font-weight: 700;
  line-height: 1.5;
}

.rv-follow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 7px 16px 7px 7px;
  border-radius: 100px;
  background: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 8px 24px #25252512;
  transition: transform 0.2s;
}

.rv-follow:hover {
  transform: translateY(-2px);
}

.rv-follow .ig-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-size: 15px;
}

.rv-follow .ig-handle {
  color: var(--coral);
  font-weight: 900;
}

.rv-notice {
  max-width: 800px;
  margin-top: 25px;
  padding: 22px 24px;
  border-radius: 22px;
  background: #fff;
  line-height: 1.55;
  box-shadow: 0 15px 40px #b9404020;
}

.rv-notice ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.rv-notice li {
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff4f3;
  font-size: 14px;
}

.rv-notice p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Catálogo ---------- */

.rv-catalog {
  padding: 55px 0 40px;
}

.rv-catalog h2 {
  margin: 10px 0 8px;
  font-size: clamp(33px, 4.2vw, 60px);
}

.rv-catalog > .pf-wrap > p {
  margin: 0;
  color: var(--muted);
}

.categories {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 28px;
}

.category {
  overflow: hidden;
  border: 1px solid #ededed;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 26px #00000009;
}

.category-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 20px 22px;
  border: 0;
  background: #fff;
  color: var(--ink);
  font:
    900 21px Outfit,
    sans-serif;
  letter-spacing: -0.02em;
  text-align: left;
  cursor: pointer;
}

.category-toggle:hover {
  background: #fff8f8;
}

.category-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-count {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff3ed;
  color: var(--coral);
  font:
    800 12px "DM Sans",
    sans-serif;
  letter-spacing: 0;
}

.category-arrow {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff3ed;
  color: var(--coral);
  font-size: 20px;
  transition: transform 0.2s ease;
}

.category.open .category-arrow {
  transform: rotate(180deg);
}

.category-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.category.open .category-content {
  grid-template-rows: 1fr;
}

.category-inner {
  overflow: hidden;
}

.category-pad {
  padding: 0 20px 20px;
}

/* ---------- Tarjetas ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #ededed;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 26px #00000009;
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px #00000012;
}

.card.in-order {
  border-color: #f6b1b0;
}

.pic {
  position: relative;
  aspect-ratio: 4 / 4.2;
  background: #f6f6f6;
}

.pic img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 18px;
  object-fit: contain; /* los PNG del catálogo tienen fondo transparente */
}

.pic .in-order-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
}

.cat {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral);
}

.name {
  margin: 0;
  font:
    900 22px Outfit,
    sans-serif;
  letter-spacing: -0.02em;
}

.price {
  font:
    900 30px Outfit,
    sans-serif;
  letter-spacing: -0.03em;
}

.price small,
.rule {
  font:
    500 13px "DM Sans",
    sans-serif;
  letter-spacing: 0;
  color: #666;
}

.controls {
  display: flex;
  gap: 9px;
  margin-top: auto;
  padding-top: 8px;
}

.qty {
  display: flex;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 999px;
}

.qty button {
  width: 40px;
  min-height: 46px;
  border: 0;
  background: #f6f6f6;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.qty button:hover {
  background: #ffe9e8;
}

.qty input {
  width: 46px;
  border: 0;
  font-weight: 900;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty input::-webkit-inner-spin-button,
.qty input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.add {
  flex: 1;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.2s;
  touch-action: manipulation;
}

.add.is-done {
  background: #1d7a3e;
}

/* ---------- Barra inferior ---------- */

.bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border-top: 1px solid #eee;
  box-shadow: 0 -10px 35px #0000000d;
  padding-bottom: env(safe-area-inset-bottom);
}

.barin {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: var(--bar-height);
  padding: 11px 0;
}

.summary {
  flex: 1;
  min-width: 0;
}

.summary b {
  display: block;
  font:
    900 20px Outfit,
    sans-serif;
}

.summary small {
  color: #666;
}

.bar.bump .summary b {
  animation: bump 0.4s ease;
}

@keyframes bump {
  40% {
    transform: scale(1.06);
    color: var(--coral);
  }
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.2s;
}

.cta:hover {
  background: var(--coral-dark);
}

.cta-count {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--coral);
  font-size: 12px;
}

/* ---------- Panel del pedido ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: #0008;
}

.overlay.on {
  display: flex;
}

body.no-scroll {
  overflow: hidden;
}

.sheet {
  width: min(680px, 100%);
  max-height: 88vh;
  overflow: auto;
  padding: 24px;
  border-radius: 27px 27px 0 0;
  background: #fff;
  animation: sheet-in 0.25s ease;
}

@keyframes sheet-in {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}

.head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.head h2 {
  margin: 4px 0 8px;
  font:
    900 28px Outfit,
    sans-serif;
  letter-spacing: -0.03em;
}

.close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #f4f4f4;
  font-size: 22px;
  cursor: pointer;
}

.close:hover {
  background: #ffe9e8;
}

.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.remove {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #b42318;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.remove:hover {
  text-decoration: underline;
}

.empty {
  padding: 18px 0;
  color: #666;
}

.total {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  font:
    900 22px Outfit,
    sans-serif;
}

.fine {
  font-size: 12px;
  line-height: 1.5;
  color: #666;
}

.cta.full {
  display: flex;
  width: 100%;
  background: var(--whatsapp);
  color: #0b2e17;
}

.cta.full:hover {
  background: #1fbf5b;
}

/* ---------- Responsive ---------- */

@media (hover: hover) {
  .add:hover {
    background: var(--coral);
  }
}

@media (max-width: 850px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .rv-hero {
    padding: 50px 0 75px;
  }

  .rv-hero h1 {
    font-size: clamp(43px, 12vw, 70px);
  }

  .rv-follow {
    font-size: 14px;
  }

  .categories {
    gap: 12px;
  }

  .category-toggle {
    padding: 17px 16px;
    font-size: 18px;
  }

  .category-pad {
    padding: 0 12px 12px;
  }

  .qty button {
    width: 44px;
    min-height: 48px;
  }

  .add {
    min-height: 48px;
  }

  .barin {
    gap: 9px;
  }

  .summary b {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .summary small {
    display: none;
  }

  .sheet {
    max-height: 92dvh;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .controls {
    gap: 6px;
  }

  .add {
    font-size: 13px;
  }

  .cta {
    padding-inline: 13px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .category-content,
  .category-arrow,
  .sheet,
  .bar.bump .summary b {
    transition: none;
    animation: none;
  }
}
