/* ═══════════════════════════════════════════════════════
   TrustedServices — Modern Digital Store
   ═══════════════════════════════════════════════════════ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #f59e0b;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --green: #10b981;
  --purple: #8b5cf6;
  --rose: #f43f5e;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.15);
  --transition: 0.2s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── Navigation (HTML: .nav, .nav-inner, .nav-links, .nav-toggle) ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  transition: var(--transition);
}
.nav.scrolled { box-shadow: var(--shadow); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  color: var(--primary);
  font-size: 1.4rem;
}
.logo-text {
  font-weight: 700;
}
.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  text-decoration: none;
  color: var(--gray-700);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}
.nav-links a:hover { color: var(--primary); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* ─── Hero (HTML: .hero, .hero-bg, .hero-inner, .hero-badge, .hero-title, .hero-subtitle, .hero-actions, .hero-stats) ─── */
.hero {
  position: relative;
  padding: 140px 0 100px;
  overflow: hidden;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 40%, #fef3e2 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(37,99,235,.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(245,158,11,.06) 0%, transparent 50%);
}
.hero-inner {
  position: relative;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(37,99,235,.1);
  color: var(--primary);
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 24px;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--dark);
  margin-bottom: 20px;
}
.hero-title em {
  font-style: italic;
  color: var(--primary-dark);
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--gray-700);
  max-width: 600px;
  margin: 0 auto 32px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(0,0,0,.08);
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
}
.stat-label {
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(37,99,235,.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,.4);
}
.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--gray-300);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-full { width: 100%; }

/* ─── Sections (HTML: .section, .section-header, .section-badge) ─── */
.section {
  padding: 80px 0;
}
.section-products {
  background: var(--gray-100);
  padding: 80px 0 100px;
}
.section-about {
  background: var(--white);
}
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
}
.section-header p {
  color: var(--gray-500);
  font-size: 1.05rem;
}

/* ─── Categories (HTML: .category-grid, .category-card, .category-icon, .category-count) ─── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.category-card {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 24px;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  transition: var(--transition);
}
.category-card:hover {
  background: var(--white);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.category-card.active {
  background: var(--primary-light);
  border-color: var(--primary);
}
.category-icon { font-size: 2.4rem; margin-bottom: 12px; }
.category-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.category-card p { font-size: 0.85rem; color: var(--gray-500); line-height: 1.5; margin-bottom: 8px; }
.category-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 4px;
}

/* ─── Filters (HTML: .filters, .filter-btn, .filter-divider) ─── */
.filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-btn {
  all: unset;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  background: var(--white);
  border: 1px solid var(--gray-300);
  transition: var(--transition);
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.filter-divider {
  width: 1px;
  height: 24px;
  background: var(--gray-300);
  margin: 0 8px;
}

/* ─── Product Grid & Cards ─── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,.06);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}
.product-image {
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #f3f4f6;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.product-card:hover .product-image img {
  transform: scale(1.05);
}
.product-image .product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}
.badge-ebook { background: #dbeafe; color: #1d4ed8; }
.badge-course { background: #fce7f3; color: #be185d; }
.badge-audio { background: #d1fae5; color: #065f46; }
.product-info {
  padding: 20px;
}
.product-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--dark);
}
.product-info .product-desc {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
}
.product-buy {
  all: unset;
  cursor: pointer;
  padding: 8px 20px;
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.product-buy:hover {
  background: var(--primary-dark);
}

/* Color themes for product image backgrounds */
.modal-cover-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 16px;
}
/* Theme gradients kept as fallback for images */
.theme-health { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.theme-business { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.theme-children { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.theme-faith { background: linear-gradient(135deg, #ede9fe, #c4b5fd); }
.theme-marketing { background: linear-gradient(135deg, #fee2e2, #fca5a5); }
.theme-lifestyle { background: linear-gradient(135deg, #fce7f3, #f9a8d4); }

/* Product image fallback */
.product-image img[src=""] { display: none; }
.product-image { background: linear-gradient(135deg, #f3f4f6, #e5e7eb); }

@media (max-width: 480px) {
  .category-grid { grid-template-columns: 1fr !important; }
}

/* ─── About (HTML: .about-grid, .about-content, .about-features, .about-feature, .about-icon) ─── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  max-width: 700px;
  margin: 0 auto;
}
.about-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 16px;
}
.about-content p {
  color: var(--gray-700);
  margin-bottom: 24px;
  line-height: 1.7;
}
.about-features {
  display: grid;
  gap: 16px;
}
.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--gray-100);
  border-radius: var(--radius);
}
.about-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-feature strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
}
.about-feature p {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 0;
}

/* ─── Footer (HTML: .footer, .footer-inner, .footer-brand, .footer-links, .footer-bottom) ─── */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,.7);
  padding: 48px 0 32px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 32px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-brand .logo-icon { color: var(--accent); }
.footer-brand .logo-text { color: white; font-size: 1.1rem; }
.footer-brand p { font-weight: 400; font-size: 0.9rem; }
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
}

/* ─── Modal (HTML: .modal-overlay, .modal, .modal-close, .modal-body, .modal-badge, .modal-meta, .modal-price, .modal-secure) ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  position: relative;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  all: unset;
  cursor: pointer;
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 1.5rem;
  color: var(--gray-500);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}
.modal-close:hover { background: var(--gray-100); }
.modal-body { padding: 40px; }
.modal-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.modal-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}
.modal-body p {
  color: var(--gray-700);
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 0.95rem;
}
.modal-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.modal-meta span {
  padding: 6px 14px;
  background: var(--gray-100);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-700);
}
.modal-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 20px;
}
.modal-secure {
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 12px;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: white;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--gray-300);
  }
  .hero { padding: 120px 0 60px; }
  .hero-title { font-size: 2rem; }
  .hero-stats { gap: 24px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { flex-direction: column; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
  .category-grid { grid-template-columns: 1fr; gap: 12px; }
  .category-card { padding: 24px 16px; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; text-align: center; }
}

/* ─── Loading state ─── */
.product-card.loading {
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}
