/* Amogha Trading - Quick Order
   Full-screen Shorts-style product feed. Plain CSS, no framework. */

:root {
  --bar-height: 68px;
  --brand-height: 44px;
  --fg: #ffffff;
  --accent: #25d366;          /* WhatsApp green */
  --accent-ink: #05391f;
  --overlay: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0) 70%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: #000;
  color: var(--fg);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Brand bar (top) ---------- */

.brand-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--brand-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px calc(env(safe-area-inset-top, 0px));
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 12;
}

.brand-bar__name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-bar__phone {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  padding: 6px 8px;
  border-radius: 8px;
}
.brand-bar__phone::before { content: "\260E\FE0E"; margin-right: 5px; opacity: 0.85; }
.brand-bar__phone:active { background: rgba(255, 255, 255, 0.1); }

/* ---------- Feed ---------- */

.feed {
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.slide {
  position: relative;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: #000;
}

/* ---------- Media layer ---------- */

.slide__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #18181b;
  overflow: hidden;
}

/* image / video fill the slide */
.slide__bg img,
.slide__bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* slideshow: stack images, crossfade */
.slide__bg img.slideshow-img {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.slide__bg img.slideshow-img.is-visible { opacity: 1; }

/* placeholder card when a slide has no media (or media unmounted) */
.slide__bg--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.slide__bg--placeholder .ph-name {
  font-size: clamp(28px, 8vw, 56px);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  opacity: 0.28;
  letter-spacing: -0.02em;
}

.slide__overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  z-index: 1;
  pointer-events: none;
}

/* ---------- Slide content ---------- */

.slide__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 18px calc(var(--bar-height) + 20px);
}

.slide__info { min-width: 0; }

.slide__cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
  margin-bottom: 6px;
}

.slide__name {
  margin: 0 0 6px;
  font-size: clamp(20px, 5.5vw, 28px);
  font-weight: 700;
  line-height: 1.2;
}

.slide__meta { margin: 0; font-size: 14px; opacity: 0.85; }
.slide__rate { font-weight: 700; opacity: 1; }

/* ---------- Quantity stepper ---------- */

.stepper {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 8px;
}

.stepper__btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: var(--fg);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stepper__btn:active { transform: scale(0.92); }
.stepper__btn:disabled { opacity: 0.35; cursor: default; }

.stepper__qty {
  min-width: 34px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stepper__qty--active { color: var(--accent); }

/* ---------- Order bar ---------- */

.order-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--bar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px calc(env(safe-area-inset-bottom, 0px));
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 10;
}

.order-bar__cart {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.3;
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}
.order-bar__cart:active { background: rgba(255, 255, 255, 0.08); }
.order-bar__cart span:first-child { font-size: 13px; opacity: 0.8; }
.order-bar__total { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.order-bar__note { font-size: 11px; color: #ffcf6b; opacity: 0.95; }

.order-bar__share {
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.order-bar__share:disabled { opacity: 0.4; cursor: default; }
.order-bar__share:active:not(:disabled) { transform: scale(0.97); }

/* ---------- State messages ---------- */

.state-msg {
  min-height: 40dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-size: 15px;
  opacity: 0.7;
}
.feed .state-msg { height: 100dvh; }
