/* ==========================================================
   Kaki Tabib - Landing Page
   ========================================================== */

:root {
  --green-dark: #1f3214;
  --green-mid: #3f5a34;
  --gold: #c79d56;
  --cream: #f2efe4;
  --page-bg: #eceef2;
  --text-dark: #262626;
  --text-muted: #55584f;
  --red: #e0201c;
  --orange-1: #ffc24a;
  --orange-2: #ff8a00;
  --radius: 14px;
  --max-width: 640px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--page-bg);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0,0,0,0.08);
}

/* ---------- Hero ---------- */
.hero {
  background: #eef1f6;
  padding: 28px 20px 22px;
  text-align: center;
}
.hero h1 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.35;
  font-weight: 700;
  color: #1a1a2e;
}
.hero .nowrap { white-space: nowrap; }

/* ---------- Card images ---------- */
.card-img-wrap {
  position: relative;
  line-height: 0;
}
.card-img-wrap--link { display: block; }
.card-img-wrap__hotspot {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  display: block;
}
.card-img-wrap__hotspot--bottom { height: 9%; }

/* ---------- Text sections ---------- */
.text-block {
  padding: 24px 20px;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-dark);
}
.text-block p { margin: 0 0 12px; }
.text-block p:last-child { margin-bottom: 0; }
.text-block--center { text-align: center; padding-bottom: 4px; }
.text-block p.justify {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.benefit-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.benefit-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.98rem;
  line-height: 1.5;
}
.benefit-list .emoji { flex: 0 0 auto; }

.testi-heading {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-dark);
  margin: 0;
}

/* ---------- CTA button block (arrows + gif button) ---------- */
.cta-block {
  text-align: center;
  padding: 16px 20px 28px;
  background: #ffffff;
}
.cta-arrows {
  font-size: 1.6rem;
  margin-bottom: 10px;
  letter-spacing: 4px;
}
.cta-gif-link { display: inline-block; }
.cta-gif { max-width: 320px; width: 100%; margin: 0 auto; }

/* ---------- Testimonial carousel ---------- */
.testi-carousel {
  position: relative;
  overflow: hidden;
  background: #f2efe4;
  touch-action: pan-y;
}
.testi-carousel__track {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}
.testi-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
}
.testi-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
}
.testi-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.testi-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  color: var(--green-dark);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.testi-carousel__arrow--prev { left: 10px; }
.testi-carousel__arrow--next { right: 10px; }
.testi-carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 7px;
}
.testi-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.6);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
  cursor: pointer;
  padding: 0;
}
.testi-carousel__dot.is-active {
  background: var(--green-dark);
  width: 20px;
  border-radius: 4px;
}

/* ---------- Stock bar ---------- */
.stock-block {
  padding: 10px 20px 24px;
  border-top: 2px solid #1a1a1a;
  margin-top: 4px;
}
.stock-block__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.stock-block__sisa { color: var(--red); font-size: 0.9rem; }
.stock-block__bar {
  background: #fbe0e0;
  border-radius: 999px;
  height: 34px;
  overflow: hidden;
  position: relative;
}
.stock-block__fill {
  background: linear-gradient(90deg, #f38585, #e0201c);
  height: 100%;
  width: 96%;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* ---------- Price block ---------- */
.price-block {
  text-align: center;
  padding: 10px 20px 8px;
}
.price-block__label {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 4px 0;
}
.price-block__normal {
  color: var(--red);
  text-decoration: line-through;
  font-weight: 600;
  margin: 4px 0;
}
.price-block__promo-label {
  font-weight: 700;
  margin: 10px 0 2px;
}
.price-block__price {
  color: var(--red);
  font-size: 2.1rem;
  font-weight: 800;
  margin: 2px 0;
}
.price-block__note {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 10px;
}

/* ---------- Order form ---------- */
.order-form {
  background: var(--cream);
  margin: 10px 16px 24px;
  padding: 22px 18px;
  border-radius: 18px;
  border: 1px solid #e3ddc7;
}
.order-form h2 {
  text-align: center;
  margin: 0 0 6px;
  font-size: 1.4rem;
  color: var(--green-dark);
  letter-spacing: 0.5px;
}
.order-form__sub {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 18px;
}
.order-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 12px 0 6px;
  color: var(--green-dark);
}
.order-form input,
.order-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid #d8d2ba;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  resize: vertical;
}
.order-form input:focus,
.order-form textarea:focus {
  outline: none;
  border-color: var(--green-mid);
}
.order-form__error {
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 1.2em;
  margin: 10px 0 0;
}
.order-form__submit {
  width: 100%;
  margin-top: 16px;
  border: none;
  cursor: pointer;
  padding: 16px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--orange-1), var(--orange-2));
  box-shadow: 0 6px 0 #c96e00, 0 10px 18px rgba(255,138,0,0.35);
  font-family: inherit;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  transition: transform 0.08s ease;
}
.order-form__submit:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #c96e00, 0 4px 10px rgba(255,138,0,0.3);
}
.order-form__submit span {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
}
.order-form__submit small {
  font-weight: 600;
  font-size: 0.75rem;
  opacity: 0.75;
}
.order-form__submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.order-form__success {
  text-align: center;
  padding: 20px 10px;
}
.order-form__success-icon {
  font-size: 2.6rem;
  margin-bottom: 8px;
}
.order-form__success h2 {
  color: var(--green-dark);
  font-size: 1.3rem;
  margin: 0 0 10px;
}
.order-form__success p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 0.78rem;
  color: #9a9a9a;
}
.footer p { margin: 2px 0; }

/* ---------- Buy toast (social proof) ---------- */
.buy-toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 78px;
  z-index: 50;
  max-width: 320px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  padding: 12px 30px 12px 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transform: translateY(140%);
  opacity: 0;
  transition: transform 0.45s ease, opacity 0.45s ease;
  pointer-events: none;
}
.buy-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.buy-toast__icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.buy-toast__text {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-dark);
}
.buy-toast__product { color: var(--green-mid); font-weight: 600; }
.buy-toast__time { color: #999; font-size: 0.7rem; margin-top: 2px; }
.buy-toast__close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: none;
  font-size: 1rem;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  padding: 2px;
}

/* ---------- Floating CTA ---------- */
.floating-cta {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 13px 18px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(224,32,28,0.45);
}

@media (min-width: 560px) {
  .buy-toast { left: 20px; right: auto; bottom: 20px; }
  .floating-cta { right: 20px; bottom: 20px; }
}

@media (min-width: 641px) {
  body { padding: 24px 0; }
}
