/* 🗺️ Layout & Grid Structures */

/* ============================================================
GLOBAL NAV
============================================================ */
.global-nav {
  background: var(--white);
  border-bottom: 1px solid var(--n200);
  position: relative;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.global-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s6);
  display: flex;
  align-items: center;
  gap: var(--s4);
  height: 56px;
  min-width: 0;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.brand-logo {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--n900);
}

.nav-sep {
  width: 1px;
  height: 20px;
  background: var(--n200);
  margin: 0 var(--s2);
}

.nav-title {
  font-size: 14px;
  color: var(--n600);
}

.nav-badge {
  padding: 2px 10px;
  border-radius: var(--r-full);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
}



/* ============================================================
PAGE WRAPPER
============================================================ */
.page {
  display: none;
  min-height: calc(100vh - 56px);
}

.page.active {
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s6);
}

.page-content {
  padding-top: var(--s8);
  padding-bottom: var(--s8);
}

/* ============================================================
SECTION HEADER (design system)
============================================================ */
.ds-section {
  margin-bottom: var(--s10);
}

.ds-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--n400);
  border-bottom: 1px solid var(--n200);
  padding-bottom: var(--s3);
  margin-bottom: var(--s6);
}

.ds-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  align-items: flex-start;
}

.ds-col {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.ds-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--ds-two-col-gap, var(--s6));
}

.ds-overflow-x {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.ds-overflow-x table {
  width: 100%;
  min-width: 640px;
}

.ds-label {
  font-size: 11px;
  color: var(--n400);
  margin-top: var(--s1);
  text-align: center;
}

/* ============================================================
PACKAGE GRIDS
============================================================ */
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: var(--s4);
}

/* ============================================================
PAYMENT METHODS GRID
============================================================ */
.pay-methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--s3);
}

/* ============================================================
COUPON INPUT ROW
============================================================ */
.coupon-row {
  display: flex;
  gap: var(--s2);
}

/* ============================================================
PRODUCT PAGE LAYOUT
============================================================ */
.product-hero {
  background: linear-gradient(135deg, var(--hero-bg-start) 0%, var(--hero-bg-mid) 60%, var(--hero-bg-end) 100%);
  padding: var(--s12) 0;
  text-align: center;
  color: white;
}

.hero-cta {
  display: flex;
  gap: var(--s3);
  justify-content: center;
  flex-wrap: wrap;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s4);
}

/* ============================================================
CHECKOUT PAGE LAYOUT
============================================================ */
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--s6);
  align-items: flex-start;
}

.checkout-grid > * {
  min-width: 0;
}

.checkout-sidebar {
  position: sticky;
  top: 72px;
}

.summary-header {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--n100);
  margin-bottom: var(--s4);
}

.summary-brand {
  font-size: 14px;
  font-weight: 700;
  color: var(--n900);
}

.form-section {
  margin-bottom: var(--s6);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
}

/* ============================================================
PAYMENT PAGE LAYOUT
============================================================ */
.payment-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--s6);
  align-items: flex-start;
}

.payment-status-header {
  background: linear-gradient(135deg, var(--surface-primary-soft) 0%, var(--status-waiting-bg) 100%);
  border: 1px solid var(--n200);
  border-radius: var(--r-xl);
  padding: var(--s8);
  text-align: center;
  margin-bottom: var(--s6);
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.step-inst {
  display: flex;
  gap: var(--s4);
}

/* ============================================================
DESIGN SYSTEM PAGE HEADER
============================================================ */
.ds-page-header {
  background: white;
  border-bottom: 1px solid var(--n200);
  padding: var(--s8) 0;
  margin-bottom: var(--s10);
}

.ds-header {
  background: white;
  border-bottom: 1px solid var(--n200);
  padding: 40px 0 32px;
}

/* ============================================================
TESTIMONIAL GRID
============================================================ */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s4);
}

/* ============================================================
FOOTER LAYOUT
============================================================ */
.page-footer {
  background: var(--n900);
  color: white;
  padding: var(--s8) 0;
  margin-top: var(--s12);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s4);
}

.footer-brand {
  font-size: 16px;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: var(--s6);
}

.footer-link {
  font-size: 13px;
  color: var(--n400);
  transition: color .15s;
}

.footer-link:hover {
  color: white;
}

.footer-copy {
  font-size: 12px;
  color: var(--n600);
}

/* ============================================================
STEPPER WRAPPERS
============================================================ */


.stepper-wrapper.checkout-stepper {
  padding: var(--s4) 0 var(--s2);
}

.step-list.checkout-steps {
  max-width: 560px;
  margin: 0 0 0 auto;
}

/* ============================================================
SPECIFICITY UPGRADES & GRID OVERRIDES
============================================================ */
#checkout-payment.pay-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.payment-actions {
  display: flex;
  gap: var(--s3);
}

.timer-status {
  text-align: right;
}

/* ============================================================
SPACING & FLEX UTILITIES
============================================================ */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: var(--s1);
}

.gap-2 {
  gap: var(--s2);
}

.gap-3 {
  gap: var(--s3);
}

.gap-4 {
  gap: var(--s4);
}

.gap-6 {
  gap: var(--s6);
}

.mt-2 {
  margin-top: var(--s2);
}

.mt-4 {
  margin-top: var(--s4);
}

.mt-6 {
  margin-top: var(--s6);
}

.mt-8 {
  margin-top: var(--s8);
}

.mb-2 {
  margin-bottom: var(--s2);
}

.mb-3 {
  margin-bottom: var(--s3);
}

.mb-4 {
  margin-bottom: var(--s4);
}

.mb-6 {
  margin-bottom: var(--s6);
}

.mb-8 {
  margin-bottom: var(--s8);
}

.p-4 {
  padding: var(--s4);
}

.p-6 {
  padding: var(--s6);
}

.w-full {
  width: 100%;
}

.ds-two-col.gap-s5 {
  --ds-two-col-gap: var(--s5);
}

/* ============================================================
RESPONSIVE LAYOUTS
============================================================ */
@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .checkout-sidebar {
    position: static;
    top: auto;
  }

  .payment-grid {
    grid-template-columns: 1fr;
  }
}

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

  .pay-methods,
  #checkout-payment.pay-methods {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Nav: sembunyikan semua elemen dekoratif */
  .nav-sep,
  .nav-title,
  .nav-badge {
    display: none;
  }

  .global-nav-inner {
    width: 100%;
    box-sizing: border-box;
    padding: 0 var(--s3);
    gap: var(--s2);
    position: relative;
  }

  .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand-name {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }



  .ds-two-col {
    grid-template-columns: minmax(0, 1fr);
  }

  .payment-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .payment-grid > * {
    min-width: 0;
  }

  .payment-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .timer-status {
    width: 100%;
    text-align: left;
  }

  .detail-row {
    flex-direction: column;
    gap: 4px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--s4);
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--s3) var(--s4);
  }
}

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