/* ============================================
   iSegigit Indonesia — Main CSS Design System
   Apple-inspired Premium Dark E-Commerce
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- CSS Variables / Design Tokens --- */
:root {
  --bg-primary: #000000;
  --bg-secondary: #111111;
  --bg-card: #1c1c1e;
  --bg-elevated: #2c2c2e;
  --bg-glass: rgba(28, 28, 30, 0.72);

  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-muted: #636366;

  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-light: rgba(0, 113, 227, 0.15);
  --accent-green: #34c759;
  --accent-orange: #ff9f0a;
  --accent-red: #ff3b30;
  --accent-purple: #bf5af2;

  --border: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.06);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.6);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-height: 56px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--font); }
ul { list-style: none; }

/* --- Typography --- */
h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 600; letter-spacing: -0.02em; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { color: var(--text-secondary); line-height: 1.7; }

/* --- Layout Utilities --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 32px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.text-center { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, #f5f5f7 0%, #a1a1a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-blue { color: var(--accent); }
.text-green { color: var(--accent-green); }
.text-orange { color: var(--accent-orange); }

.hidden { display: none !important; }
.show { display: block !important; }

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}
.navbar.scrolled { background: rgba(0, 0, 0, 0.88); }
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 40px;
  max-width: 1400px;
  margin: 0 auto;
}
.navbar-logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-logo svg { width: 24px; height: 24px; fill: var(--text-primary); }
.navbar-nav { display: flex; align-items: center; gap: 4px; }
.navbar-nav a {
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.navbar-nav a:hover { color: var(--text-primary); }
.navbar-nav a.active { color: var(--text-primary); }
.navbar-actions { display: flex; align-items: center; gap: 12px; }
.navbar-actions a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}
.navbar-actions a:hover { color: var(--text-primary); }
.navbar-actions .cart-btn {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-md);
}
.cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; cursor: pointer; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  padding: 24px;
  gap: 8px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 14px 16px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}

/* Main content offset */
.main-content { padding-top: var(--nav-height); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 100px;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
}
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); box-shadow: 0 4px 20px rgba(0,113,227,0.4); }
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-secondary:hover { background: var(--accent-light); }
.btn-ghost {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-elevated); border-color: var(--border); }
.btn-white {
  background: #fff;
  color: #000;
  border: 1px solid transparent;
}
.btn-white:hover { background: #e8e8ed; transform: scale(1.02); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-tokopedia {
  background: linear-gradient(135deg, #42b549, #3a9e40);
  color: #fff;
  border: none;
}
.btn-tokopedia:hover { filter: brightness(1.1); transform: scale(1.02); }
.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #1ebe5b);
  color: #fff;
  border: none;
}
.btn-whatsapp:hover { filter: brightness(1.1); transform: scale(1.02); }

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { border-color: rgba(255,255,255,0.18); box-shadow: var(--shadow-md); }

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.product-card:hover { border-color: rgba(255,255,255,0.2); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card-img {
  aspect-ratio: 4/3;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-img .product-placeholder {
  width: 60%;
  height: 60%;
  object-fit: contain;
  padding: 16px;
}
.product-card-body { padding: 20px; }
.product-card-name { font-weight: 600; font-size: 1rem; margin-bottom: 4px; color: var(--text-primary); }
.product-card-subtitle { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px; }
.product-card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.product-card-price-old {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 6px;
}

/* Badge */
.badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 100px;
  color: #fff;
  z-index: 2;
}

/* --- Forms --- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; }
.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,0.2); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { appearance: none; cursor: pointer; }

/* --- Toast Notification --- */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  min-width: 260px;
}
.toast.success { border-left: 3px solid var(--accent-green); }
.toast.error { border-left: 3px solid var(--accent-red); }
.toast.info { border-left: 3px solid var(--accent); }

@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; pointer-events: none; }
}

/* --- Section Headers --- */
.section-header { margin-bottom: 48px; }
.section-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}
.section-title { color: var(--text-primary); margin-bottom: 16px; }
.section-desc { font-size: 1.05rem; color: var(--text-secondary); max-width: 560px; line-height: 1.7; }

/* --- Divider --- */
.divider { height: 1px; background: var(--border-light); margin: 48px 0; }

/* --- Scroll Reveal --- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* --- Loading Skeleton --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; margin-top: 12px; max-width: 280px; }
.footer-col h5 { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 0.85rem; color: var(--text-muted); transition: var(--transition); }
.footer-col ul li a:hover { color: var(--text-primary); }
.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.82rem; color: var(--text-muted); }
.payment-icons { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.payment-icon {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .container-wide { padding: 0 16px; }
  .section { padding: 56px 0; }
  .navbar-nav { display: none; }
  .hamburger { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .navbar-inner { padding: 0 16px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .section-header { margin-bottom: 32px; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
