/* ═══════════════════════════════════════════════════════════════
   CATCH E-MART — Mobile CSS (Light Theme + Welcome Popup)
   Letakkan fail ini sebagai: mobile.css
   Import SELEPAS style.css utama
═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   LIGHT THEME OVERRIDES
   Override warna gelap kepada cerah
───────────────────────────────────────── */

/* Showcase section — tukar gelap ke cerah */
.showcase {
  background: #FFF8F3;
}

.showcase__text-wrap {
  color: var(--gray-900);
}

.showcase__text-eyebrow {
  color: var(--orange);
}

.showcase__text-headline {
  color: var(--gray-900);
}

.showcase__text-body {
  color: var(--gray-500);
}

/* Stats section — tukar gelap ke cerah */
.stats-section {
  background: linear-gradient(135deg, #FFF3E8 0%, #FFF8F3 50%, #FFF0E0 100%);
}

.stats-section__bg {
  background: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(255,107,0,0.08) 0%, transparent 70%);
}

.stat__number {
  background: linear-gradient(135deg, var(--orange-dark), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat__suffix {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat__label {
  color: var(--gray-500);
}

/* ─────────────────────────────────────────
   WELCOME POPUP — OVERLAY
───────────────────────────────────────── */
.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end; /* Slide up dari bawah pada mobile */
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.welcome-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

.welcome-overlay--out {
  opacity: 0;
  pointer-events: none;
}

/* ─────────────────────────────────────────
   WELCOME POPUP — CARD
───────────────────────────────────────── */
.welcome-popup {
  background: #FFFFFF;
  width: 100%;
  max-width: 480px;
  border-radius: 28px 28px 0 0;
  overflow: hidden;
  position: relative;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -8px 48px rgba(0,0,0,0.15);
}

.welcome-overlay--visible .welcome-popup {
  transform: translateY(0);
}

.welcome-overlay--out .welcome-popup {
  transform: translateY(100%);
}

/* Decorative top strip */
.welcome-popup__deco {
  height: 5px;
  width: 40px;
  background: var(--gray-200);
  border-radius: 3px;
  margin: 14px auto 0;
}

/* ─────────────────────────────────────────
   WELCOME POPUP — CONTENT
───────────────────────────────────────── */
.welcome-popup__content {
  padding: 20px 24px 32px;
  text-align: center;
}

.welcome-popup__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFF3E8;
  color: var(--orange);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,107,0,0.2);
}

.welcome-popup__logo-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(255,107,0,0.2);
  border: 3px solid #FFF3E8;
}

.welcome-popup__logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.welcome-popup__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--gray-900);
  margin-bottom: 10px;
}

.welcome-popup__title span {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-popup__body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--gray-500);
  margin-bottom: 20px;
  max-width: 32ch;
  margin-left: auto;
  margin-right: auto;
}

/* Perks row */
.welcome-popup__perks {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.welcome-popup__perk {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-700);
  white-space: nowrap;
}

.perk__icon {
  font-size: 1rem;
  line-height: 1;
}

/* CTA button */
.welcome-popup__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 24px;
  background: var(--orange);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(255,107,0,0.35);
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  margin-bottom: 10px;
}

.welcome-popup__btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.welcome-popup__btn:hover,
.welcome-popup__btn:focus-visible {
  background: var(--orange-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(255,107,0,0.45);
}

.welcome-popup__btn:hover svg {
  transform: translateX(3px);
}

.welcome-popup__btn:active {
  transform: scale(0.98);
}

/* Skip link */
.welcome-popup__skip {
  display: block;
  width: 100%;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--gray-300);
  cursor: pointer;
  padding: 6px;
  transition: color 0.2s;
}

.welcome-popup__skip:hover {
  color: var(--gray-500);
}

/* ─────────────────────────────────────────
   MOBILE GLOBAL FIXES
   Max 480px — standard mobile viewport
───────────────────────────────────────── */
@media (max-width: 480px) {

  /* Navbar */
  .navbar {
    padding: 0 var(--space-4);
  }

  .navbar__inner {
    height: 60px;
  }

  .navbar__logo-img {
    height: 36px;
    width: 36px;
  }

  /* Hero — lebih compact */
  .hero {
    min-height: 100svh; /* safe viewport height untuk mobile */
  }

  .hero__content {
    padding: 0 var(--space-4);
  }

  .hero__headline {
    font-size: clamp(2.6rem, 11vw, 3.5rem);
    letter-spacing: -0.035em;
  }

  .hero__subline {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--space-8);
  }

  .hero__eyebrow-text {
    font-size: 0.65rem;
  }

  .hero__eyebrow-line {
    width: 28px;
  }

  .hero__cta-group {
    flex-direction: column;
    gap: var(--space-3);
    width: 100%;
  }

  .hero__cta-group .btn {
    width: 100%;
    max-width: 100%;
    padding: 0.85em 1.5em;
    font-size: 0.95rem;
  }

  /* Story section */
  .story__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    padding: var(--space-16) var(--space-4);
  }

  .story__headline {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .story__body {
    font-size: 0.93rem;
    margin-bottom: var(--space-6);
  }

  .story__float-badge--1 {
    bottom: -10px;
    right: -4px;
  }

  /* Showcase */
  .showcase__sticky {
    grid-template-columns: 1fr;
    padding: var(--space-6) var(--space-4);
    gap: var(--space-6);
    align-content: center;
    height: 100vh;
  }

  .showcase__screen {
    max-height: 35vh;
    border-radius: var(--radius-lg);
  }

  .showcase__text-headline {
    font-size: clamp(1.6rem, 7vw, 2rem);
  }

  .showcase__text-body {
    font-size: 0.88rem;
    line-height: 1.6;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .stat {
    padding: var(--space-4);
  }

  .stat__number {
    font-size: clamp(2.2rem, 9vw, 3.5rem);
  }

  .stat__suffix {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }

  /* Testimonials */
  .testimonial {
    width: 280px;
  }

  .testimonials__header {
    margin-bottom: var(--space-10);
  }

  .section-headline {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  /* Contact */
  .contact__inner {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .contact {
    padding: var(--space-16) var(--space-4);
  }

  .contact__form {
    padding: var(--space-6);
  }

  /* Footer */
  .footer {
    padding: var(--space-12) var(--space-4) var(--space-8);
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer__brand {
    grid-column: 1;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .footer__legal-links {
    gap: var(--space-4);
  }
}

/* ─────────────────────────────────────────
   WELCOME POPUP — TABLET & DESKTOP
   Atas 480px: popup jadi modal tengah
───────────────────────────────────────── */
@media (min-width: 481px) {
  .welcome-overlay {
    align-items: center;
    padding: var(--space-6);
  }

  .welcome-popup {
    border-radius: 28px;
    max-width: 440px;
    width: 100%;
    transform: scale(0.88) translateY(20px);
    opacity: 0;
    box-shadow: 0 24px 80px rgba(0,0,0,0.18);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.45s ease;
  }

  .welcome-overlay--visible .welcome-popup {
    transform: scale(1) translateY(0);
    opacity: 1;
  }

  .welcome-overlay--out .welcome-popup {
    transform: scale(0.9) translateY(10px);
    opacity: 0;
  }
}

/* ─────────────────────────────────────────
   NAVBAR — LIGHT MODE WHEN SCROLLED
───────────────────────────────────────── */
.navbar--scrolled {
  background: rgba(255, 255, 255, 0.95);
}

/* ─────────────────────────────────────────
   MENU BLUR OVERLAY
   Blur background bila menu dibuka
───────────────────────────────────────── */

.nav-blur-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.nav-blur-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Menu drawer MESTI atas overlay */
.navbar__links {
  z-index: 2000 !important;
}

/* Navbar (logo + hamburger) atas semua */
.navbar {
  z-index: 2100 !important;
}

/* Lock scroll bila menu buka */
body.menu-open {
  overflow: hidden;
  touch-action: none;
}

/* ─────────────────────────────────────────
   SMOOTH TOUCH SCROLLING
───────────────────────────────────────── */
html {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Elakkan overflow pada body */
body {
  overflow-x: hidden;
}

/* ─────────────────────────────────────────
   TAP HIGHLIGHT & FOCUS STATES
   UX lebih baik pada mobile
───────────────────────────────────────── */
* {
  -webkit-tap-highlight-color: rgba(255, 107, 0, 0.12);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─────────────────────────────────────────
   SAFE AREA INSETS (notch phones)
───────────────────────────────────────── */
.navbar {
  padding-top: env(safe-area-inset-top, 0px);
}

.welcome-overlay {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.welcome-popup__content {
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}

/* ─────────────────────────────────────────
   FIX: MOBILE MENU — FULL SCREEN DRAWER
   Override style.css navbar__links mobile
───────────────────────────────────────── */
@media (max-width: 768px) {

  /* Menu drawer jadi full screen dari atas */
  .navbar__links {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;           /* dynamic viewport height untuk mobile */
    background: rgba(10, 10, 15, 0.97) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    flex-direction: column !important;
    align-items: center !important;      /* tengah-tengah */
    justify-content: center !important;
    gap: 0 !important;
    padding: 0 !important;
    transform: translateX(100%) !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 2000 !important;
    overflow-y: auto !important;
  }

  .navbar__links.is-open {
    transform: translateX(0) !important;
  }

  /* Setiap item menu */
  .navbar__links li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .navbar__links li:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  /* Link text */
  .navbar__link {
    display: block !important;
    width: 100% !important;
    padding: 20px 32px !important;
    font-size: 1.25rem !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    letter-spacing: -0.01em !important;
    transition: background 0.2s, color 0.2s !important;
  }

  .navbar__link:hover,
  .navbar__link:active {
    background: rgba(255, 107, 0, 0.1) !important;
    color: var(--orange) !important;
  }

  /* CTA button dalam menu */
  .navbar__link--cta {
    display: inline-flex !important;
    width: auto !important;
    margin: 24px auto 0 !important;
    padding: 14px 36px !important;
    font-size: 1.1rem !important;
    background: var(--orange) !important;
    color: #fff !important;
    border-radius: 999px !important;
    box-shadow: 0 6px 24px rgba(255, 107, 0, 0.4) !important;
  }

  .navbar__links li:last-child {
    border-bottom: none !important;
    text-align: center !important;
    padding-bottom: 8px !important;
  }

  /* Hamburger toggle kena atas menu */
  .navbar__toggle {
    z-index: 2100 !important;
    position: relative !important;
  }

  /* Logo kena nampak atas menu */
  .navbar__logo {
    z-index: 2100 !important;
    position: relative !important;
  }

  /* Hamburger bar jadi putih bila menu terbuka */
  .navbar__toggle.is-open span {
    background: #fff !important;
  }
}