/* Buyer screens (buyer/index.html). Loaded after app.css; colours only via tokens. */

/* ── Screens: each one fills the phone and scrolls on its own ── */
.buyer .screen { height: 100dvh; overflow-y: auto; }
.screen-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 60px 32px;
  text-align: center;
}
.screen-empty .title-display { font-size: 30px; }
.screen-empty p { margin: 0; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* Menu button + cart dot (all screens) */
.menu-btn { position: relative; }
.menu-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rose-dot);
  border: 1.5px solid var(--white);
}

/* ── Feed ── */
.feed-screen { position: relative; overflow: hidden; background: var(--ink); }
.feed-list {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.feed-list::-webkit-scrollbar { display: none; }
.feed-post {
  position: relative;
  height: 100dvh;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: var(--ink);
}
/* Keep the 9:16 frame (dots are % of it) and let it cover the screen, cropped at the sides */
.feed-post .media-frame {
  position: absolute;
  top: 0;
  left: 50%;
  width: auto;
  height: 100%;
  min-width: 100%;
  transform: translateX(-50%);
}
/* the scrim sits inside the frame, under the dots (z-index 2) */
.feed-overlay {
  position: absolute;
  left: 18px;
  right: 76px;
  bottom: 28px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--white);
  pointer-events: none;
}
.feed-overlay__row { display: flex; align-items: center; gap: 10px; }
.feed-overlay__seller { font-size: 16px; font-weight: 700; text-shadow: var(--shadow-sm); }
.feed-overlay__tags { margin: 0; font-size: 14px; font-weight: 500; white-space: pre-wrap; text-shadow: var(--shadow-sm); }
.feed-follow {
  pointer-events: auto;
  min-height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--white);
  background: var(--white);
  color: var(--rose);
  font-size: 13px;
  font-weight: 700;
  position: relative;
}
.feed-follow::after { content: ''; position: absolute; inset: -6px; } /* 44px tap target */
.feed-follow.is-following { background: transparent; color: var(--white); }

.feed-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.feed-badge__label {
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--sage-deep);
  font-size: 11px;
  font-weight: 700;
}
.recycle-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--sage-bg);
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
  color: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.recycle-icon svg { width: 28px; height: 28px; }
.recycle-icon--sm { width: 34px; height: 34px; border: 0; box-shadow: none; background: var(--white); }
.recycle-icon--sm svg { width: 20px; height: 20px; }
.recycle-icon--xs { width: 30px; height: 30px; border: 0; box-shadow: none; }
.recycle-icon--xs svg { width: 17px; height: 17px; }

.feed-topbar {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
}
.feed-mode-pill {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--glass);
  font-size: 13px;
  font-weight: 700;
}
.feed-empty {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 36px;
  text-align: center;
  background: var(--blush);
}
.feed-empty p { margin: 0; }

/* ── Tag bubble (centred modal) ── */
.bubble { padding: 0; border-radius: 22px; }
.bubble__body { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 14px; }
.bubble__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--blush);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.bubble__close svg { width: 16px; height: 16px; }
.bubble__top { display: flex; gap: 12px; align-items: flex-start; }
.bubble__thumb {
  width: 112px;
  height: 140px;
  flex: none;
  border-radius: 14px;
  object-fit: cover;
  background: var(--petal);
}
.bubble__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-right: 30px; }
.bubble__title-row { display: flex; align-items: center; gap: 2px; margin-left: -8px; }
.bubble__name { margin: 0; font-family: var(--font-display); font-size: 23px; font-weight: 600; line-height: 1.05; }
.bubble__brand { margin: 0; font-size: 13px; }
.bubble__details { margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); line-height: 1.5; }
.heart-btn {
  width: 40px;
  height: 40px;
  flex: none;
  border: 0;
  background: transparent;
  color: var(--rose-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.heart-btn svg { width: 22px; height: 22px; fill: none; }
.heart-btn[aria-pressed="true"] svg { fill: currentColor; }
.bubble__condition {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--sage-bg);
  color: var(--sage-deep);
  font-size: 14px;
}
.bubble__condition div { display: flex; flex-direction: column; }
.bubble__note { font-size: 12px; }
.bubble__sizes { display: flex; flex-direction: column; gap: 8px; }
.bubble__sizes-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; }
.bubble__sizes .chip { min-height: 40px; min-width: 46px; font-size: 14px; }
.bubble__sizes .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.bubble__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.bubble__price { display: flex; flex-direction: column; font-size: 12px; }
.bubble__price strong { font-size: 22px; }

/* ── Menu drawer ── */
dialog.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: max(0px, calc((100vw - var(--phone-w)) / 2));
  right: auto;
  margin: 0;
  width: min(290px, 80vw);
  height: 100dvh;
  max-height: 100dvh;
  padding: 0;
  border: 0;
  background: var(--blush);
  box-shadow: var(--shadow-lg);
}
dialog.drawer[open] { animation: drawer-in 0.22s ease-out; }
@keyframes drawer-in { from { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { dialog.drawer[open] { animation: none; } }
.drawer__nav { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 18px 24px; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.drawer__title { font-family: var(--font-display); font-style: italic; font-size: 26px; font-weight: 500; color: var(--rose); }
.drawer__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  text-align: left;
}
.drawer__item[aria-current="page"] { background: var(--petal); color: var(--rose-deep); }
.drawer__count {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--petal);
  color: var(--rose-deep);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer__reset { margin-top: auto; align-self: flex-start; font-size: 14px; min-height: var(--tap); }

/* ── Me gusta ── */
.likes-screen { background: var(--likes-bg); }
.like-card { background: var(--white); border-radius: var(--radius-sm); overflow: hidden; display: flex; flex-direction: column; }
.like-card__media { position: relative; height: 200px; background: var(--petal); }
.like-card__img { width: 100%; height: 100%; object-fit: cover; }
.like-card__heart, .like-card__bag {
  position: absolute;
  right: 6px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rose);
}
.like-card__heart { top: 6px; background: var(--glass); }
.like-card__bag { bottom: 8px; background: var(--petal); }
.like-card__heart svg, .like-card__bag svg { width: 18px; height: 18px; }
.like-card__used { position: absolute; left: 8px; bottom: 8px; }
.like-card__body { padding: 10px 12px 8px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.like-card__name { font-size: 15px; font-weight: 500; line-height: 1.25; }
.like-card__detail { align-self: flex-start; font-size: 14px; min-height: 36px; }

/* ── Carrito ── */
.cart-screen { display: flex; flex-direction: column; }
.cart-list { flex: 1; overflow-y: auto; padding: 10px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.cart-line { display: flex; gap: 12px; flex: none; }
.cart-line__thumb { width: 76px; height: 96px; flex: none; border-radius: 12px; object-fit: cover; background: var(--petal); }
.cart-line__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cart-line__top { display: flex; justify-content: space-between; gap: 8px; line-height: 1.25; }
.cart-line__price { white-space: nowrap; }
.cart-line__seller { font-size: 13px; }
.cart-line__chosen { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.cart-line__change {
  border: 0;
  background: transparent;
  padding: 10px 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
}
.cart-line__missing { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.cart-line__warn { font-size: 13px; font-weight: 700; color: var(--rose-deep); }
.cart-line__remove {
  align-self: flex-start;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  border: 0;
  background: var(--blush);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.cart-line__remove svg { width: 18px; height: 18px; }
.cart-footer {
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 14px 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cart-footer__row { display: flex; justify-content: space-between; font-size: 15px; }
.cart-footer__row.muted { font-size: 13px; }
.cart-checkout { min-height: 52px; font-size: 16px; margin-top: 4px; }
.cart-checkout:disabled { opacity: 1; background: var(--petal); color: var(--muted); }

/* ── Pedidos ── */
.orders-list { display: flex; flex-direction: column; gap: 12px; padding: 10px 16px 28px; }
.order-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.order-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.order-card__title { font-size: 16px; }
.order-card__meta { font-size: 13px; }
.order-card__note { margin: 0; font-size: 13px; }
.order-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.order-step { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.order-step__bar { height: 4px; border-radius: 2px; background: var(--line); }
.order-step.is-done { color: var(--ink); }
.order-step.is-done .order-step__bar { background: var(--rose-2); }
.order-card__lines { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.order-line { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.order-line__thumb { width: 44px; height: 54px; flex: none; border-radius: 8px; object-fit: cover; background: var(--petal); }
.order-line__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.order-line__info .muted { font-size: 12px; }
.order-card__row { display: flex; justify-content: space-between; font-size: 14px; }
