:root {
  --blue: #2563EB;
  --blue-dark: #1d4ed8;
  --blue-light: #3b82f6;
  --blue-pale: #eff6ff;
  --blue-mid: #dbeafe;
  --gray-bg: #f5f6fa;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --white: #ffffff;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(37,99,235,0.06), 0 1px 3px rgba(0,0,0,0.07);
  --shadow: 0 4px 20px rgba(37,99,235,0.1), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(37,99,235,0.15), 0 4px 16px rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--gray-bg);
  color: var(--gray-900);
  line-height: 1.65;
  overflow-x: hidden;
}
h1, h2, h3, h4, .nav-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
}
img { max-width: 100%; height: auto; display: block; }

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 clamp(20px, 5vw, 80px);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.03em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav-logo .nav-logo-text { color: var(--blue); }
.nav-logo .nav-logo-text span { color: var(--gray-900); }
.nav-logo-img {
  height: 32px;
  width: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.footer-logo-img { object-fit: cover; }
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--gray-500);
  font-weight: 500;
  font-size: 0.92rem;
  transition: color 0.2s;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.nav-links a:hover, .nav-links a.active { color: var(--blue); }
.nav-cta {
  background: var(--blue);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  transition: background 0.2s, transform 0.15s !important;
}
.nav-cta:hover { background: var(--blue-dark) !important; transform: translateY(-1px); }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ─── HERO ─── */
#home {
  min-height: 100vh;
  padding-top: 68px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #f0f5ff 0%, #e8f0fe 40%, #f5f6fa 100%);
}
#page-header {
  padding-top: 68px;
  background: linear-gradient(145deg, #f0f5ff 0%, #e8f0fe 40%, #f5f6fa 100%);
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
}
.hero-blob-1 { width: 600px; height: 600px; background: #93c5fd; top: -150px; right: -100px; }
.hero-blob-2 { width: 400px; height: 400px; background: #bfdbfe; bottom: -100px; left: -80px; }
.hero-blob-3 { width: 250px; height: 250px; background: #c7d2fe; top: 40%; right: 30%; }
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px clamp(20px, 5vw, 80px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--blue-mid);
  color: var(--blue);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--blue);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
.hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--gray-900);
  margin-bottom: 20px;
}
.hero-title .accent { color: var(--blue); }
.hero-sub {
  font-size: 1.05rem;
  color: var(--gray-500);
  margin-bottom: 36px;
  max-width: 480px;
  line-height: 1.7;
}
.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
  background: var(--blue);
  color: #fff;
  padding: 14px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(37,99,235,0.35);
  display: inline-block;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 6px 22px rgba(37,99,235,0.45); }
.btn-secondary {
  background: var(--white);
  color: var(--blue);
  padding: 14px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  border: 1.5px solid var(--blue-mid);
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  display: inline-block;
  cursor: pointer;
}
.btn-secondary:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* Hero illustration */
.hero-illus { display: flex; align-items: center; justify-content: center; }
.illus-wrap { position: relative; width: 100%; max-width: 460px; }
.illus-card-main {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
.illus-browser-bar {
  background: var(--gray-100);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--gray-200);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #fc5c65; }
.dot-y { background: #fed330; }
.dot-g { background: #26de81; }
.illus-browser-bar .url-bar {
  flex: 1;
  background: var(--white);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.72rem;
  color: var(--gray-400);
  font-family: 'DM Sans', monospace;
  margin-left: 10px;
}
.illus-content {
  padding: 20px;
  min-height: 260px;
  background: var(--white);
}
.illus-svg-area { width: 100%; height: 240px; }
.float-card {
  position: absolute;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  animation: float 4s ease-in-out infinite;
}
.float-card-1 { bottom: -16px; left: -20px; animation-delay: 0s; }
.float-card-2 { top: -16px; right: -20px; animation-delay: 1.5s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.float-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.float-icon-blue { background: var(--blue-pale); }
.float-icon-green { background: #f0fdf4; }
.float-label { font-size: 0.78rem; font-weight: 700; color: var(--gray-900); }
.float-sub { font-size: 0.68rem; color: var(--gray-400); }

/* ─── SECTION SHARED ─── */
section { scroll-margin-top: 68px; }
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) clamp(20px, 5vw, 80px);
}
.section-tag {
  display: inline-block;
  background: var(--blue-pale);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 1rem;
  color: var(--gray-500);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 48px;
}

/* What we do */
#what { background: var(--white); }
.what-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.what-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: box-shadow 0.2s, transform 0.2s;
}
.what-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.what-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--blue-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  color: var(--blue);
}
.what-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}
.what-item p { font-size: 0.88rem; color: var(--gray-500); }

/* Why us */
#why { background: var(--gray-bg); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.why-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: box-shadow 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}
.why-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  opacity: 0;
  transition: opacity 0.25s;
}
.why-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.why-card:hover::before { opacity: 1; }
.why-card h3 { font-size: 1rem; font-weight: 700; color: var(--gray-900); margin-bottom: 10px; }
.why-card p { font-size: 0.88rem; color: var(--gray-500); line-height: 1.65; }

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, transform 0.25s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.project-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.project-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.prod-1, .project-img.prod-1 { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.prod-2, .project-img.prod-2 { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.prod-3, .project-img.prod-3 { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.prod-4, .project-img.prod-4 { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.project-img-inner {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(4px);
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 2rem;
}
.project-body { padding: 24px; }
.project-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue);
  font-family: 'Plus Jakarta Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.project-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.project-body p { font-size: 0.87rem; color: var(--gray-500); margin-bottom: 18px; line-height: 1.6; }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.85rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  transition: gap 0.2s;
}
.btn-outline:hover { gap: 10px; }
.btn-outline svg { transition: transform 0.2s; }
.btn-outline:hover svg { transform: translateX(3px); }

/* Portfolio detail */
.project-hero-image {
  margin: 0 0 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.project-hero-image img { width: 100%; max-height: 480px; object-fit: cover; }
.project-detail .modal-section { margin-bottom: 28px; background: var(--white); padding: 24px; border-radius: var(--radius); border: 1px solid var(--gray-100); }
.modal-section h4 { font-size: 0.85rem; font-weight: 700; color: var(--blue); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.gallery { margin-top: 48px; }
.gallery-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.gallery-item {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--gray-100);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
  color: white; padding: 24px 12px 8px; font-size: 0.78rem;
}

/* About */
#about { background: var(--gray-bg); }
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.principles-list { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.principle-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: box-shadow 0.2s, transform 0.2s;
}
.principle-item:hover { box-shadow: var(--shadow); transform: translateX(4px); }
.principle-num {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  flex-shrink: 0;
}
.principle-item span { font-weight: 600; color: var(--gray-900); font-size: 0.95rem; }
.about-visual { position: relative; }
.about-card-big {
  background: var(--white);
  border-radius: 24px;
  padding: 36px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.about-card-big::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), #60a5fa, #a78bfa);
}
.stat-row { display: flex; gap: 24px; margin-top: 24px; }
.stat-box { flex: 1; text-align: center; background: var(--blue-pale); border-radius: 14px; padding: 20px 16px; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--blue); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.78rem; color: var(--gray-500); font-weight: 500; }
.about-desc { font-size: 0.95rem; color: var(--gray-500); line-height: 1.7; }

/* Products */
#products { background: var(--white); }
.products-list { display: flex; flex-direction: column; gap: 24px; margin-top: 48px; }
.product-row {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  transition: box-shadow 0.2s, transform 0.2s;
  box-shadow: var(--shadow-sm);
}
.product-row:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-icon-wrap {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.product-text h3 { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.product-text p { font-size: 0.9rem; color: var(--gray-500); line-height: 1.65; max-width: 480px; }

/* Contact */
#contact { background: var(--gray-bg); }
.contact-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; align-items: start; }
.contact-info h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: var(--gray-900); line-height: 1.25; margin-bottom: 16px; }
.contact-info p { color: var(--gray-500); font-size: 0.95rem; line-height: 1.7; margin-bottom: 32px; }
.contact-details { display: flex; flex-direction: column; gap: 16px; }
.contact-detail-item { display: flex; align-items: center; gap: 14px; color: var(--gray-700); font-size: 0.92rem; }
.contact-detail-item a { color: inherit; text-decoration: none; }
.contact-detail-item { align-items: baseline; }
.contact-detail-label {
  flex-shrink: 0;
  width: 56px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-400);
}
.contact-form {
  background: var(--white);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
}
.form-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 28px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.form-input,
.form-group input,
.form-group textarea,
.form-group select {
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.form-group textarea { min-height: 90px; resize: vertical; }
.form-input:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  background: var(--white);
}
.field-help { font-size: 0.78rem; color: var(--gray-500); line-height: 1.55; }
.field-error { font-size: 0.78rem; color: #dc2626; margin-top: 4px; }
.form-error {
  background: #fef2f2;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  border: 1px solid #fecaca;
}
.form-submit {
  width: 100%;
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 15px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
  margin-top: 6px;
}
.form-submit:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: 0 6px 22px rgba(37,99,235,0.4); }

/* Website type chooser */
.website-type-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
.website-type-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  background: var(--gray-50);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  position: relative;
}
.website-type-option input[type="radio"] { position: absolute; opacity: 0; }
.website-type-option .option-title { font-weight: 700; color: var(--gray-900); font-family: 'Plus Jakarta Sans', sans-serif; }
.website-type-option .option-range { font-size: 0.78rem; color: var(--gray-500); }
.website-type-option:hover { border-color: var(--blue); }
.website-type-option.is-active,
.website-type-option:has(input[type="radio"]:checked) {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 6px 18px rgba(37,99,235,0.35);
}
.website-type-option.is-active .option-title,
.website-type-option:has(input[type="radio"]:checked) .option-title { color: #fff; }
.website-type-option.is-active .option-range,
.website-type-option:has(input[type="radio"]:checked) .option-range { color: rgba(255,255,255,0.85); }

/* Flash messages */
.flash-wrap {
  position: fixed;
  top: 80px; left: 50%;
  transform: translateX(-50%);
  z-index: 1500;
  display: flex; flex-direction: column; gap: 8px;
  width: 90%;
  max-width: 480px;
}
.flash {
  background: var(--white);
  border-left: 4px solid var(--blue);
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}
.flash-success { border-color: #10b981; }
.flash-error { border-color: #dc2626; }

/* Rich text */
.rich-text { font-size: 1rem; color: var(--gray-700); line-height: 1.8; }
.rich-text h2 { font-size: 1.4rem; font-weight: 800; color: var(--gray-900); margin: 24px 0 12px; }
.rich-text h3 { font-size: 1.15rem; font-weight: 700; color: var(--gray-900); margin: 20px 0 10px; }
.rich-text p { margin-bottom: 14px; }
.rich-text ul, .rich-text ol { margin: 14px 0 14px 28px; }
.rich-text a { color: var(--blue); }

/* ─── FOOTER ─── */
footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.8);
}
.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px clamp(20px, 5vw, 80px) 40px;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.4fr;
  gap: 48px;
}
.footer-brand .nav-logo {
  color: #fff;
  font-size: 1.3rem;
  display: inline-flex;
  margin-bottom: 14px;
}
.footer-brand .nav-logo .nav-logo-text { color: #fff; }
.footer-brand .nav-logo .nav-logo-text span { color: rgba(255,255,255,0.5); }
.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}
.social-icons { display: flex; gap: 10px; }
.social-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
}
.social-icon:hover { background: var(--blue); color: #fff; }
.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li, .footer-col ul li a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: rgba(255,255,255,0.9); }
.newsletter-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.newsletter-btn:hover { background: var(--blue-dark); color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px clamp(20px, 5vw, 80px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

/* Animations */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s, transform 0.6s;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }
.fade-up:nth-child(5) { transition-delay: 0.4s; }
.fade-up:nth-child(6) { transition-delay: 0.5s; }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-illus { display: none; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .what-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 20px clamp(20px, 5vw, 40px);
    gap: 20px;
    box-shadow: var(--shadow);
    z-index: 999;
  }
  .nav-links.open a { font-size: 1.05rem; }
  .nav-hamburger { display: flex; }
  .projects-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .product-row { grid-template-columns: auto 1fr; }
  .product-row .btn-outline { grid-column: 1/-1; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 20px; }
  .website-type-options { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   STORE COMPONENTS (LaptopProgram)
   ═══════════════════════════════════════════════════════════════ */

/* Nav cart */
.nav-cart { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.nav-cart-count {
  background: var(--blue); color: #fff; font-size: 0.72rem; font-weight: 700;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-account { display: inline-flex; align-items: center; gap: 10px; }
.nav-user { font-weight: 600; color: var(--gray-700); font-size: 0.9rem; }
.nav-logout-btn {
  background: none; border: 1px solid var(--gray-200); color: var(--gray-700);
  padding: 6px 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.nav-logout-btn:hover { border-color: #ef4444; color: #ef4444; }

/* Hero emoji card (replaces web-dev illustration) */
.hero-emoji-card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 40px; text-align: center;
}
.hero-emoji-big { font-size: 6rem; line-height: 1; margin-bottom: 20px; }
.hero-emoji-row { display: flex; justify-content: center; gap: 18px; font-size: 2rem; }

/* Category grid */
.category-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px; margin-top: 32px;
}
.category-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 28px 22px; text-align: center; text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.category-icon { font-size: 2.6rem; margin-bottom: 12px; }
.category-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.category-card p { font-size: 0.85rem; color: var(--gray-500); }

/* Product grid + cards */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px; margin-top: 32px;
}
.product-card {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-card-img {
  position: relative; display: block; aspect-ratio: 4/3; overflow: hidden;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-emoji {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 3.4rem;
}
.product-badge {
  position: absolute; top: 10px; font-size: 0.72rem; font-weight: 700;
  padding: 4px 9px; border-radius: 999px; color: #fff;
}
.product-badge-sale { left: 10px; background: #ef4444; }
.product-badge-out { right: 10px; background: var(--gray-700); }
.product-card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.product-card-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--blue); font-weight: 700; margin-bottom: 4px; }
.product-card-body h3 { font-size: 1rem; font-weight: 700; line-height: 1.35; margin-bottom: 6px; }
.product-card-body h3 a { color: var(--gray-900); text-decoration: none; }
.product-card-body h3 a:hover { color: var(--blue); }
.product-card-body p { font-size: 0.84rem; color: var(--gray-500); margin-bottom: 14px; flex: 1; }
.product-card-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.price-now { font-size: 1.15rem; font-weight: 800; color: var(--gray-900); }
.price-old { font-size: 0.85rem; color: var(--gray-400); text-decoration: line-through; }
.btn-add { width: 100%; justify-content: center; }
.btn-primary:disabled, .btn-secondary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Catalog filters / search */
.catalog-search { display: flex; gap: 10px; margin-bottom: 22px; max-width: 520px; }
.catalog-search .form-input { flex: 1; }
.catalog-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.catalog-pill {
  padding: 8px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--gray-200);
  font-size: 0.85rem; font-weight: 600; color: var(--gray-700); text-decoration: none; transition: all .15s;
}
.catalog-pill:hover { border-color: var(--blue); color: var(--blue); }
.catalog-pill.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Catalog layout (market.mn style: top pills + left sidebar + grid) */
.catalog-wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
#catalog-head { padding: 104px 0 16px; background: var(--white); border-bottom: 1px solid var(--gray-200); }
.catalog-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.catalog-title-row h1 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; color: var(--gray-900); }
.admin-add-btn { background: #16a34a; color: #fff; text-decoration: none; padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: 0.88rem; }
.admin-add-btn:hover { background: #15803d; }
.catalog-pills { display: flex; flex-wrap: wrap; gap: 10px; }
#catalog { padding: 28px 0 70px; }
.catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.filter-toggle { display: none; }

.catalog-sidebar { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 20px; position: sticky; top: 84px; }
.sidebar-block { margin-bottom: 22px; }
.sidebar-block:last-child { margin-bottom: 0; }
.sidebar-block h3 { font-size: 0.95rem; font-weight: 800; color: var(--gray-900); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--blue-pale); }
.sidebar-search { display: flex; flex-direction: column; gap: 8px; }
.sidebar-cats { list-style: none; }
.sidebar-cats > li { margin-bottom: 4px; }
.sidebar-cats a { display: block; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--gray-700); font-size: 0.9rem; font-weight: 600; transition: background .12s; }
.sidebar-cats a:hover { background: var(--gray-100); color: var(--blue); }
.sidebar-cats a.is-active { background: var(--blue); color: #fff; }
.sidebar-subcats { list-style: none; margin: 2px 0 6px 14px; border-left: 2px solid var(--gray-200); }
.sidebar-subcats a { font-weight: 500; font-size: 0.85rem; color: var(--gray-500); padding: 5px 10px; }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range input { padding: 8px 10px; }
.clear-filters { display: inline-block; margin-top: 6px; color: #ef4444; font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.catalog-resultbar { margin-bottom: 16px; color: var(--gray-500); font-size: 0.9rem; }
.catalog-main { min-width: 0; }
.catalog-main .product-grid { margin-top: 0; }

/* Admin quick-edit pencil on product cards */
.product-card { position: relative; }
.card-edit-btn { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(255,255,255,0.95); border: 1px solid var(--gray-200); border-radius: 8px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 0.95rem; box-shadow: var(--shadow-sm); }
.card-edit-btn:hover { background: #fff; transform: scale(1.08); }

@media (max-width: 860px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .filter-toggle { display: inline-block; background: var(--white); border: 1px solid var(--gray-200); color: var(--gray-900); padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 0.9rem; cursor: pointer; margin-bottom: 14px; font-family: inherit; }
  .catalog-sidebar { display: none; position: static; margin-bottom: 18px; }
  .catalog-sidebar.open { display: block; }
}

/* Product detail */
#product-detail { padding-top: 120px; }
.back-link { display: inline-block; margin-bottom: 24px; color: var(--gray-500); text-decoration: none; font-size: 0.9rem; }
.back-link:hover { color: var(--blue); }
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.pd-main-img { aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pd-main-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-emoji { font-size: 6rem; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pd-thumb { width: 70px; height: 56px; border-radius: 8px; overflow: hidden; border: 2px solid var(--gray-200); background: none; padding: 0; cursor: pointer; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-cat { display: inline-block; color: var(--blue); font-weight: 700; font-size: 0.8rem; text-decoration: none; margin-bottom: 8px; }
.pd-title { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; color: var(--gray-900); line-height: 1.2; }
.pd-brand { color: var(--gray-500); font-size: 0.9rem; margin: 8px 0; }
.pd-price { display: flex; align-items: baseline; gap: 12px; margin: 18px 0 10px; }
.pd-price .price-now { font-size: 1.8rem; }
.pd-stock { font-size: 0.9rem; font-weight: 600; margin-bottom: 18px; }
.pd-stock.in { color: #16a34a; }
.pd-stock.out { color: #ef4444; }
.pd-summary { color: var(--gray-700); margin-bottom: 24px; }
.pd-buy { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 20px; }
.pd-qty { margin-bottom: 14px; }
.pd-qty label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--gray-500); margin-bottom: 6px; }
.pd-qty input { width: 100px; }
.pd-buy-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.pd-desc, .pd-related { margin-top: 56px; }
.pd-desc .rich-text { margin-top: 16px; }

/* Cart */
.cart-table { background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-200); overflow: hidden; }
.cart-row { display: grid; grid-template-columns: 80px 1fr 90px 120px 40px; gap: 16px; align-items: center; padding: 16px; border-bottom: 1px solid var(--gray-100); }
.cart-row:last-child { border-bottom: none; }
.cart-thumb { width: 80px; height: 64px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-name { font-weight: 700; color: var(--gray-900); text-decoration: none; display: block; }
.cart-name:hover { color: var(--blue); }
.cart-unit { font-size: 0.82rem; color: var(--gray-500); }
.cart-qty-form input { width: 70px; }
.cart-line-total { font-weight: 700; text-align: right; }
.cart-remove { background: none; border: none; color: var(--gray-400); font-size: 1.1rem; cursor: pointer; }
.cart-remove:hover { color: #ef4444; }
.cart-foot { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 24px; flex-wrap: wrap; }
.cart-summary { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.cart-total-row { font-size: 1.1rem; }
.cart-total-row strong { font-size: 1.4rem; color: var(--gray-900); }

/* Checkout */
.checkout-map { height: 320px; border-radius: var(--radius); border: 1px solid var(--gray-200); overflow: hidden; z-index: 0; }
.map-hint { margin-top: 8px; font-size: 0.85rem; color: var(--gray-500); }
.map-hint.is-set { color: #16a34a; font-weight: 600; }
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.checkout-summary { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 24px; position: sticky; top: 90px; }
.checkout-summary h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 16px; }
.checkout-items { list-style: none; }
.checkout-items li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: 0.9rem; }
.ci-qty { color: var(--gray-400); }
.ci-total { font-weight: 600; white-space: nowrap; }
.checkout-total { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 1.05rem; }
.checkout-total strong { font-size: 1.4rem; }

/* Admin inline editing */
.admin-edit-bar, .page-edit-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: #fffbeb; border: 1px dashed #f59e0b; border-radius: 10px;
  padding: 10px 14px; margin-bottom: 18px; font-size: 0.86rem; color: #92400e;
}
.page-edit-bar { margin: 0 0 12px; }
.admin-bar-btn {
  background: var(--white); border: 1px solid var(--gray-200); color: var(--gray-900);
  padding: 7px 14px; border-radius: 8px; font-size: 0.84rem; font-weight: 600;
  cursor: pointer; font-family: inherit; text-decoration: none; transition: all .15s;
}
.admin-bar-btn:hover { border-color: var(--blue); color: var(--blue); }
.admin-bar-btn.save { background: #16a34a; border-color: #16a34a; color: #fff; }
.admin-bar-btn.save:hover { background: #15803d; color: #fff; }
.inline-editing { outline: 2px dashed var(--blue); outline-offset: 4px; border-radius: 6px; background: var(--blue-pale); }
.inline-price { width: 160px; display: inline-block; }
.inline-stock { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

/* Auth pages */
.auth-section { padding: 130px clamp(20px,5vw,40px) 80px; min-height: 70vh; display: flex; align-items: flex-start; justify-content: center; background: var(--gray-bg); }
.auth-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 40px; width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 1.6rem; font-weight: 800; color: var(--gray-900); margin-bottom: 6px; }
.auth-sub { color: var(--gray-500); font-size: 0.92rem; margin-bottom: 24px; }
.auth-links { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 0.88rem; }
.auth-links a { color: var(--blue); text-decoration: none; font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }

/* My orders */
.myorder-list { display: flex; flex-direction: column; gap: 18px; }
.myorder-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 20px 22px; }
.myorder-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.myorder-items { list-style: none; border-top: 1px solid var(--gray-100); }
.myorder-items li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 0.9rem; border-bottom: 1px solid var(--gray-100); }
.myorder-foot { display: flex; justify-content: space-between; margin-top: 12px; font-size: 1.05rem; }
.myorder-foot strong { font-size: 1.2rem; }

/* Contact CTA card */
.contact-cta-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 36px; }
.contact-cta-card h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 12px; }
.contact-cta-card p { color: var(--gray-500); margin-bottom: 20px; }

@media (max-width: 860px) {
  .pd-grid { grid-template-columns: 1fr; gap: 28px; }
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
}
@media (max-width: 600px) {
  .cart-row { grid-template-columns: 64px 1fr auto; grid-auto-flow: row; }
  .cart-thumb { width: 64px; height: 52px; }
  .cart-line-total { grid-column: 2 / 4; text-align: left; }
  .cart-qty-form { grid-column: 1 / 2; }
}
