/* ============================================================
   OtakKiri - Product Catalog Styles
   Clean, Minimalis, App-like Mobile Experience
   ============================================================ */

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

:root {
  --white: #ffffff;
  --bg: #f8f9fa;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-soft: rgba(37, 99, 235, 0.08);
  --success: #10b981;
  --danger: #ef4444;
  --orange: #f59e0b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.1);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;
  --nav-height: 64px;
  --bottom-nav-height: 68px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: var(--radius-lg);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: all var(--transition-slow);
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
}

.logo-icon {
  font-size: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-search-btn {
  padding: 8px;
  color: var(--text-secondary);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.nav-search-btn:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-slow);
  z-index: 999;
}

.search-overlay.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.search-container {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 10px 16px;
}

.search-icon { color: var(--text-muted); flex-shrink: 0; }

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  outline: none;
  color: var(--text);
}

.search-input::placeholder { color: var(--text-muted); }

.search-close {
  padding: 4px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.search-close:hover {
  color: var(--text);
  background: var(--border-light);
}

/* ---- Hero ---- */
.hero {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 40px;
  background: linear-gradient(135deg, var(--white) 0%, var(--bg) 100%);
  overflow: hidden;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.hero-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

.hero-visual {
  display: none;
}

/* ---- Guarantee Banner ---- */
.guarantee {
  padding: 20px 0;
  background: var(--white);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.guarantee-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.guarantee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.guarantee-item svg {
  color: var(--success);
  flex-shrink: 0;
}

/* ---- Sections ---- */
.section {
  padding: 64px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-tag {
  display: inline-flex;
  padding: 4px 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
}

/* ---- Featured Grid ---- */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* ---- Filter Bar ---- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 4px;
  border: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.filter-tab {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-tab:hover {
  color: var(--text);
}

.filter-tab.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.sort-select {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

.sort-select:focus {
  border-color: var(--primary);
}

.catalog-info {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ---- Product Grid ---- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* ---- Product Card ---- */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all var(--transition-slow);
  cursor: pointer;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: transparent;
  transform: translateY(-2px);
}

.product-card:active {
  transform: scale(0.98);
}

.product-card-image {
  position: relative;
  padding: 0;
  background: linear-gradient(135deg, var(--bg) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  overflow: hidden;
}

.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card-img {
  transform: scale(1.05);
}

.product-card-icon {
  font-size: 48px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.badge-hot {
  background: #fef2f2;
  color: #dc2626;
}

.badge-new {
  background: #f0fdf4;
  color: #16a34a;
}

.badge-popular {
  background: #fffbeb;
  color: #d97706;
}

.product-discount {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  background: var(--primary);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.product-card-body {
  padding: 16px;
}

.product-card-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 6px;
}

.product-card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.stars {
  display: flex;
  gap: 1px;
  color: var(--orange);
}

.star.half { color: var(--orange); }

.rating-score {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.rating-count {
  font-size: 12px;
  color: var(--text-muted);
}

.product-card-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.price-current {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.price-original {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card-sold {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.product-card-actions {
  display: flex;
  gap: 8px;
}

.product-card-actions .btn {
  flex: 1;
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  margin: 0 auto 16px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 15px;
}

/* ---- Testimonials ---- */
.testimonials {
  background: var(--white);
}

.testimonial-slider {
  overflow: hidden;
  position: relative;
}

.testimonial-track {
  position: relative;
  min-height: 240px;
}

.testimonial-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border-light);
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.4s ease;
  pointer-events: none;
}

.testimonial-card.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.testimonial-quote {
  margin-bottom: 12px;
  color: var(--primary);
}

.testimonial-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 20px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.testimonial-info { flex: 1; }

.testimonial-name {
  font-size: 14px;
  font-weight: 600;
}

.testimonial-role {
  font-size: 12px;
  color: var(--text-muted);
}

.testimonial-stars {
  display: flex;
  gap: 1px;
  color: var(--orange);
}

.testimonial-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.testimonial-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.testimonial-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.testimonial-dots {
  display: flex;
  gap: 6px;
}

.testimonial-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border);
  transition: all var(--transition);
}

.testimonial-dot.active {
  background: var(--primary);
  width: 24px;
}

/* ---- FAQ ---- */
.faq { background: var(--white); }

.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
}

.faq-question {
  width: 100%;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: color var(--transition);
}

.faq-question:hover { color: var(--primary); }

.faq-chevron {
  flex-shrink: 0;
  transition: transform var(--transition-slow);
  color: var(--text-muted);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding-bottom: 20px;
}

.faq-answer p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ---- CTA Section ---- */
.cta-section {
  padding: 48px 0 80px;
  background: var(--white);
}

.cta-card {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  text-align: center;
  color: var(--white);
}

.cta-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-subtitle {
  font-size: 15px;
  opacity: 0.85;
  max-width: 480px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.cta-card .btn-primary {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.cta-card .btn-primary:hover {
  background: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* ---- Footer ---- */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 32px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.6;
}

.footer-links h4 {
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-links a {
  display: block;
  font-size: 14px;
  padding: 4px 0;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-slow);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s ease;
  position: relative;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  z-index: 10;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-body {
  padding: 0;
}

/* ---- Modal Gallery ---- */
.modal-gallery {
  width: 100%;
}

.modal-gallery-main {
  position: relative;
  background: var(--bg);
  height: 340px;
  overflow: hidden;
}

.modal-gallery-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.modal-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  z-index: 2;
}

.modal-gallery-nav:hover {
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.modal-gallery-nav.prev { left: 12px; }
.modal-gallery-nav.next { right: 12px; }

.modal-gallery-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--white);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}

.modal-gallery-thumbs {
  display: flex;
  gap: 6px;
  padding: 10px 20px;
  background: var(--white);
  border-top: 1px solid var(--border-light);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 42px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg);
  padding: 0;
}

.modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-thumb:hover {
  border-color: var(--border);
}

.modal-thumb.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* ---- Modal Product Info ---- */
.modal-product-info {
  padding: 20px 24px 28px;
}

.modal-category {
  display: inline-flex;
  padding: 4px 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.35;
}

.modal-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.modal-rating .stars { display: flex; gap: 1px; color: var(--orange); }
.modal-rating .rating-score { font-size: 14px; font-weight: 600; }
.modal-rating .rating-count { font-size: 13px; color: var(--text-muted); }
.modal-rating .rating-sold { font-size: 13px; color: var(--text-muted); margin-left: auto; }

.modal-description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.modal-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.modal-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}

.modal-feature svg {
  color: var(--success);
  flex-shrink: 0;
}

.modal-pricing {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.modal-price-current {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.modal-price-original {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.modal-discount {
  margin-left: auto;
  padding: 4px 10px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-wa-btn {
  width: 100%;
}

.modal-guarantee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.modal-guarantee svg {
  color: var(--success);
}

/* ---- Bottom Navigation (Mobile) ---- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 1000;
  padding-bottom: var(--safe-bottom);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item.active {
  color: var(--primary);
}

.bottom-nav-item svg {
  transition: transform var(--transition);
}

.bottom-nav-item.active svg {
  transform: scale(1.1);
}

/* ---- Floating WhatsApp ---- */
.fab-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: all var(--transition-slow);
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  pointer-events: none;
}

.fab-whatsapp.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.fab-whatsapp:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
}

/* ---- Scroll Animations ---- */
.animate-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-fade.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE: Tablet (641px - 1024px)
   ============================================================ */
@media (min-width: 641px) {
  .nav-links { display: flex; }

  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .modal {
    border-radius: var(--radius-xl);
    margin: auto;
    max-height: 85vh;
  }

  .modal-overlay {
    align-items: center;
    padding: 20px;
  }

  .modal-overlay.active .modal {
    transform: translateY(0);
  }

  .testimonial-card {
    padding: 36px;
  }

  .section-title { font-size: 30px; }

  .hero-visual {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 36px;
  }

  .hero-card {
    width: 120px;
    height: 140px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-slow);
  }

  .hero-card-icon { font-size: 32px; }
  .hero-card-text { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
}

/* ============================================================
   RESPONSIVE: Desktop (> 1024px)
   ============================================================ */
@media (min-width: 1025px) {
  .nav-links { display: flex; }
  .bottom-nav { display: none !important; }

  .container {
    max-width: 1200px;
    padding: 0 40px;
  }

  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 100px);
    padding-bottom: 80px;
    position: relative;
  }

  .hero-content {
    max-width: 800px;
    margin: 0 auto;
  }

  .hero-subtitle {
    max-width: 620px;
    font-size: 18px;
  }

  .hero-visual {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 48px;
  }

  .hero-card {
    width: 140px;
    height: 160px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-slow);
  }

  .hero-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
  }

  .hero-card-1 { animation: floatCard 3s ease-in-out infinite; }
  .hero-card-2 { animation: floatCard 3s ease-in-out 0.5s infinite; }
  .hero-card-3 { animation: floatCard 3s ease-in-out 1s infinite; }

  @keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }

  .hero-card-icon { font-size: 40px; }
  .hero-card-text { font-size: 14px; font-weight: 600; color: var(--text-secondary); }

  .hero-stats {
    gap: 48px;
  }

  .stat-number { font-size: 28px; }

  .guarantee-inner {
    gap: 48px;
  }

  .guarantee-item { font-size: 14px; }

  .section { padding: 80px 0; }
  .section-title { font-size: 36px; }
  .section-subtitle { font-size: 16px; }

  .filter-bar {
    margin-bottom: 20px;
  }

  .filter-tabs {
    overflow-x: visible;
  }

  .modal-overlay {
    align-items: center;
    padding: 24px;
  }

  .modal {
    border-radius: var(--radius-xl);
    max-height: 85vh;
  }

  .modal-gallery-main { height: 360px; }
  .modal-features {
    grid-template-columns: 1fr 1fr;
  }

  .testimonial-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
  }

  .cta-card {
    padding: 64px 48px;
    border-radius: var(--radius-xl);
  }

  .cta-title { font-size: 32px; }
  .cta-subtitle { font-size: 16px; max-width: 520px; }

  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
  }

  .fab-whatsapp {
    bottom: 32px;
    right: 32px;
    width: 60px;
    height: 60px;
  }
}

/* ============================================================
   RESPONSIVE: Mobile (< 640px) - App-Like Experience
   ============================================================ */
@media (max-width: 640px) {
  :root {
    --nav-height: 56px;
  }

  .nav-links { display: none; }
  .hero-visual { display: none; }

  /* Disable all scroll animations on mobile — prevents invisible content */
  .animate-fade {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* --- Hero --- */
  .hero {
    padding-top: calc(var(--nav-height) + 28px);
    padding-bottom: 24px;
  }

  .hero-badge {
    padding: 5px 12px;
    font-size: 11px;
    margin-bottom: 14px;
  }

  .hero-title { font-size: 24px; margin-bottom: 10px; }
  .hero-subtitle { font-size: 13px; margin-bottom: 20px; line-height: 1.6; }

  .hero-cta {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 28px;
  }

  .hero-cta .btn-lg {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }

  .hero-stats { gap: 0; justify-content: space-around; }
  .stat-number { font-size: 18px; }
  .stat-label { font-size: 11px; }
  .stat-divider { height: 24px; }

  /* --- Guarantee --- */
  .guarantee { padding: 14px 0; }

  .guarantee-inner {
    flex-direction: column;
    gap: 10px;
  }

  .guarantee-item {
    font-size: 12px;
    gap: 8px;
  }

  .guarantee-item svg { width: 18px; height: 18px; }

  /* --- Sections --- */
  .container { padding: 0 16px; }
  .section { padding: 32px 0; }
  .section-header { margin-bottom: 24px; }
  .section-tag { margin-bottom: 8px; }
  .section-title { font-size: 20px; margin-bottom: 4px; }
  .section-subtitle { font-size: 13px; }

  /* --- Filter Bar --- */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    gap: 8px;
    margin-bottom: 8px;
  }

  .filter-tabs {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-tabs::-webkit-scrollbar { display: none; }

  .filter-tab {
    padding: 7px 14px;
    font-size: 12px;
  }

  .sort-select {
    width: 100%;
    padding: 7px 12px;
    font-size: 12px;
  }

  .catalog-info {
    font-size: 12px;
    margin-bottom: 12px;
  }

  /* --- Product Grid --- */
  .product-grid { gap: 12px; }

  /* --- Product Card --- */
  .product-card-image { height: 160px; }

  .product-card-body { padding: 12px 14px 14px; }
  .product-card-category { font-size: 10px; margin-bottom: 4px; }
  .product-card-title { font-size: 14px; margin-bottom: 6px; line-height: 1.35; }
  .product-card-rating { margin-bottom: 6px; gap: 4px; }
  .product-card-rating .stars { gap: 0; }
  .product-card-rating .rating-score { font-size: 12px; }
  .product-card-rating .rating-count { font-size: 11px; }
  .product-card-price { gap: 6px; margin-bottom: 2px; }
  .price-current { font-size: 16px; }
  .price-original { font-size: 12px; }
  .product-card-sold { font-size: 11px; margin-bottom: 0; }
  .product-card-actions { display: none; }

  /* --- Featured --- */
  .featured-grid { gap: 12px; }

  /* --- Testimonials --- */
  .testimonial-track { min-height: 200px; }
  .testimonial-card {
    padding: 20px;
  }
  .testimonial-text { font-size: 14px; margin-bottom: 14px; }
  .testimonial-avatar { width: 36px; height: 36px; font-size: 12px; }
  .testimonial-name { font-size: 13px; }
  .testimonial-role { font-size: 11px; }
  .testimonial-stars { display: none; }
  .testimonial-nav { margin-top: 16px; gap: 12px; }
  .testimonial-btn { width: 32px; height: 32px; }

  /* --- FAQ --- */
  .faq-question {
    padding: 16px 0;
    font-size: 14px;
  }

  .faq-answer p { font-size: 13px; }

  /* --- CTA --- */
  .cta-section { padding: 32px 0 64px; }
  .cta-card { padding: 28px 20px; border-radius: var(--radius-lg); }
  .cta-title { font-size: 20px; margin-bottom: 8px; }
  .cta-subtitle { font-size: 13px; margin-bottom: 20px; }

  /* --- Footer --- */
  .footer { padding: 28px 0 0; }
  .footer-inner { gap: 24px; }
  .footer-bottom { padding: 16px 0; }

  /* --- Bottom Navigation --- */
  .bottom-nav {
    display: flex;
    align-items: stretch;
  }

  .bottom-nav-item { font-size: 10px; gap: 2px; }
  .bottom-nav-item svg { width: 20px; height: 20px; }

  body { padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom)); }

  /* --- Floating WhatsApp --- */
  .fab-whatsapp {
    bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 12px);
    right: 16px;
    width: 48px;
    height: 48px;
  }

  .fab-whatsapp svg { width: 22px; height: 22px; }

  /* --- Modal: card kecil, ada celah, navbar terlihat --- */
  .modal-overlay {
    padding: calc(var(--nav-height) + 10px) 16px 80px;
    align-items: flex-start;
    justify-content: center;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .modal {
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - var(--nav-height) - 90px);
    border-radius: var(--radius-xl);
    transform: translateY(20px);
  }

  .modal-overlay.active .modal {
    transform: translateY(0);
  }

  .modal-body { padding: 0; }
  .modal-gallery-main { height: 220px; }
  .modal-gallery-thumbs { padding: 8px 16px; gap: 5px; }
  .modal-thumb { width: 48px; height: 36px; border-radius: 4px; }
  .modal-product-info { padding: 14px 16px 20px; }
  .modal-category { margin-bottom: 6px; font-size: 11px; padding: 3px 10px; }
  .modal-title { font-size: 16px; margin-bottom: 8px; line-height: 1.3; }
  .modal-rating { margin-bottom: 12px; padding-bottom: 12px; gap: 4px; }
  .modal-rating .rating-score { font-size: 13px; }
  .modal-rating .rating-count { font-size: 12px; }
  .modal-rating .rating-sold { font-size: 12px; }
  .modal-description { font-size: 13px; margin-bottom: 14px; line-height: 1.6; }
  .modal-features { gap: 6px; margin-bottom: 14px; }
  .modal-feature { font-size: 13px; gap: 8px; }
  .modal-feature svg { width: 14px; height: 14px; }
  .modal-pricing { padding: 12px 14px; margin-bottom: 14px; gap: 8px; }
  .modal-price-current { font-size: 18px; }
  .modal-price-original { font-size: 13px; }
  .modal-discount { font-size: 11px; padding: 3px 8px; margin-left: auto; }
  .modal-actions { gap: 8px; }
  .modal-wa-btn { font-size: 14px; padding: 12px; }
  .modal-guarantee { font-size: 12px; }

  /* Close button stays fixed — always visible, doesn't scroll */
  .modal-close {
    position: fixed;
    top: calc(var(--nav-height) + 8px);
    right: 8px;
    width: 34px;
    height: 34px;
    z-index: 2001;
  }

  .modal-close svg { width: 18px; height: 18px; }

  .modal-gallery-nav { width: 32px; height: 32px; }
  .modal-gallery-nav svg { width: 16px; height: 16px; }
  .modal-gallery-nav.prev { left: 8px; }
  .modal-gallery-nav.next { right: 8px; }
  .modal-gallery-counter { font-size: 11px; bottom: 8px; right: 8px; padding: 3px 8px; }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---- Selection ---- */
::selection {
  background: var(--primary);
  color: var(--white);
}
