/* ============================================================
   DocuSoft – styles.css
   Minimalist B&W · Semantic · Performance-first
   ============================================================ */

/* ---------- CSS Variables / Theme ---------- */
:root {
  --brand-bg: #ffffff;
  --brand-ink: #000000;
  --brand-muted: #717171;
  --brand-border: #e5e7eb;
  --brand-surface: #f9fafb;
  --brand-accent: #2563eb;
  --font-serif: "Cormorant Garamond", serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.06);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --transition: 200ms cubic-bezier(0.4,0,0.2,1);
  --max-width: 80rem;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--brand-bg);
  color: var(--brand-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
ul, ol { list-style: none; }

/* ---------- Utility ---------- */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 768px) {
  .container { padding-inline: 2rem; }
}

.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.mobile-only { display: flex; }
@media (min-width: 768px) { .mobile-only { display: none !important; } }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  background: var(--brand-ink); color: #fff;
  border-radius: var(--radius-xl);
  padding: 0.5rem 1rem;
  font-size: 0.875rem; font-weight: 700;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-primary:hover { background: #1a1a1a; }
.btn-primary:active { transform: scale(0.95); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  background: #fff; color: var(--brand-ink);
  border: 1.5px solid var(--brand-border);
  border-radius: var(--radius-xl);
  padding: 1rem 3rem;
  font-size: 0.875rem; font-weight: 700;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.btn-secondary:hover {
  border-color: var(--brand-ink);
  background: var(--brand-ink);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.btn-secondary:active { transform: scale(0.95); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--brand-border);
  background: #fff;
  color: var(--brand-ink);
  transition: border-color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--brand-ink); background: var(--brand-surface); }

/* ---------- BW Components ---------- */
.bw-card {
  background: #fff;
  border: 1.5px solid var(--brand-border);
  border-radius: var(--radius-2xl);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.bw-card:hover { border-color: var(--brand-ink); box-shadow: var(--shadow-sm); }

.bw-input {
  width: 100%;
  background: var(--brand-surface);
  border: 1.5px solid var(--brand-border);
  border-radius: var(--radius-xl);
  padding: 0.6875rem 1rem;
  outline: none;
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  color: var(--brand-ink);
  transition: border-color var(--transition), background var(--transition);
}
.bw-input:focus { border-color: var(--brand-ink); background: #fff; }
textarea.bw-input { resize: vertical; line-height: 1.6; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--brand-border);
  padding: 0.75rem 1rem;
}

.nav-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-inline: 0;
}

@media (min-width: 768px) {
  .navbar { padding: 1rem 2rem; }
}

.nav-logo {
  display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
}
.logo-icon {
  width: 2.5rem; height: 2.5rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xl);
  font-weight: 700; font-size: 1.1rem;
  overflow: hidden; flex-shrink: 0;
}
.logo-icon img { width: 100%; height: 100%; object-fit: cover; }
.logo-text {
  display: none;
  font-size: 1.125rem; font-weight: 800; letter-spacing: -0.02em;
  color: var(--brand-ink);
}
@media (min-width: 768px) { .logo-text { display: block; } }

.nav-search {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}
.search-wrap {
  display: flex; align-items: center; gap: 0.5rem;
  width: 100%; max-width: 28rem;
  background: var(--brand-surface);
  border: 1.5px solid var(--brand-border);
  border-radius: var(--radius-full);
  padding: 0.5rem 1rem;
  transition: border-color var(--transition), background var(--transition);
}
.search-wrap:focus-within { border-color: var(--brand-ink); background: #fff; }
.search-icon { color: var(--brand-muted); flex-shrink: 0; }
.search-wrap input {
  border: none; background: transparent; outline: none;
  width: 100%; font-size: 0.875rem; color: var(--brand-ink);
}
.search-wrap input::placeholder { color: var(--brand-muted); }

.search-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 28rem;
  background: #fff;
  border: 1.5px solid var(--brand-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-height: 20rem;
  overflow-y: auto;
  z-index: 100;
}
.search-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--brand-border);
  text-decoration: none; color: var(--brand-ink);
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--brand-surface); }
.search-item img {
  width: 2.5rem; height: 2rem;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.search-item-info { flex: 1; min-width: 0; }
.search-item-title { font-size: 0.8125rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-cat { font-size: 0.6875rem; color: var(--brand-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-top: 0.1rem; }
.search-item-price { font-size: 0.8125rem; font-weight: 800; flex-shrink: 0; }

.nav-actions {
  display: flex; align-items: center; gap: 0.5rem;
}
@media (min-width: 768px) { .nav-actions { gap: 0.75rem; } }

.social-links {
  display: none; align-items: center; gap: 0.75rem;
}
@media (min-width: 768px) { .social-links { display: flex; } }
.social-links a {
  display: flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--brand-border);
  background: #fff;
  transition: border-color var(--transition), transform var(--transition);
}
.social-links a:hover { border-color: var(--brand-ink); transform: scale(1.1); }

/* Mobile social menu */
.mobile-social {
  position: absolute;
  right: 1rem; top: 5rem;
  z-index: 200;
  width: 12rem;
  background: #fff;
  border: 1.5px solid var(--brand-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
}
.mobile-social a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem; font-weight: 700;
  border-radius: var(--radius-xl);
  transition: background var(--transition);
}
.mobile-social a:hover { background: var(--brand-surface); }

/* ---------- Category Bar ---------- */
.category-bar {
  background: #fff;
  padding: 1.5rem 0;
}
.category-scroll {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 1rem 1rem;
  justify-content: flex-start;
  scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .category-scroll { justify-content: center; } }

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  text-decoration: none;
  scroll-snap-align: start;
  width: 28%;
  transition: all var(--transition);
}
@media (min-width: 640px) { .cat-item { width: auto; min-width: 6.25rem; } }
.cat-item:hover { transform: scale(1.05); }
.cat-item.active { transform: scale(0.95); }

.cat-icon {
  /* React: h-16 w-16 = 4rem × 4rem, rounded-2xl */
  width: 4rem !important;
  height: 4rem !important;
  min-width: 4rem; max-width: 4rem;
  min-height: 4rem; max-height: 4rem;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  border-radius: 1rem;       /* rounded-2xl */
  border: 1px solid var(--brand-border);
  background: #fff;
  color: var(--brand-accent);
  transition: all var(--transition);
  overflow: hidden;
  flex-shrink: 0;
}
.cat-icon:hover { border-color: var(--brand-ink); }

/* Upload image: cùng kích thước với svg icon — centered 1.5rem inside box */
.cat-icon img {
  display: block !important;
  width: 2.5rem !important;
  height: 2.5rem !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 0.25rem;
  /* Không position:absolute — giữ trong flex center giống svg */
  flex-shrink: 0;
}
/* SVG icon: React h-6 w-6 = 1.5rem */
.cat-icon svg {
  width: 1.5rem; height: 1.5rem;
  pointer-events: none; flex-shrink: 0;
}

/* ── Active state: React = bg-brand-ink text-white (dark bg, white icon) ── */
.cat-item.active .cat-icon {
  background: var(--brand-ink);
  border-color: var(--brand-ink);
  color: #fff;
}
.cat-item.active .cat-icon svg { color: #fff; }
.cat-item.active .cat-icon img { filter: none; }

.cat-label {
  font-size: 0.75rem; font-weight: 700;
  color: var(--brand-muted);
  text-align: center;
}
.cat-item.active .cat-label { color: var(--brand-ink); }

/* ---------- Main Content ---------- */
.main-content { padding-top: 2rem; padding-bottom: 4rem; }

/* ---------- Section Headers ---------- */
.section-header {
  display: flex; align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.section-header.center {
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 3rem;
}

/* ---------- Section Headers (React: text-center, 4xl, black) ---------- */
.sec-hd {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  margin-bottom: 3rem;
}
.sec-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--brand-ink);
  line-height: 1.1;
}
.sec-desc {
  margin-top: 1rem;
  max-width: 40rem;
  font-size: 1.0625rem;
  color: var(--brand-muted);
  line-height: 1.7;
}
.slider-btns {
  display: flex; gap: 1rem; margin-top: 2rem;
}
.sl-btn {
  display: flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--brand-border);
  background: #fff; cursor: pointer;
  transition: all var(--transition);
}
.sl-btn:hover { border-color: var(--brand-ink); }

/* React: mb-8, text-2xl black, text-sm muted */
.sec-hd2 { margin-bottom: 2rem; }
.sec-title2 {
  font-size: 1.5rem; font-weight: 900;
  letter-spacing: -0.025em; color: var(--brand-ink);
}
.sec-desc2 {
  font-size: 0.875rem; color: var(--brand-muted);
}

/* ---------- Featured Slider ---------- */
.featured-section { margin-bottom: 4rem; }

.slider {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  padding-top: 1rem;       /* đủ chỗ cho translateY(-5px) hover */
  scrollbar-width: none;
}
.slider::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .slider { gap: 2rem; } }

.slider-item {
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 75%;
  min-width: 0;
  /* KHÔNG overflow:hidden — cho phép card hover shadow hiện ra */
}
@media (min-width: 768px) {
  .slider-item { width: calc(33.333% - 1.33rem); }
}

/* ---------- Product Grid ---------- */
/* React: grid grid-cols-2 gap-4 sm:gap-8 lg:grid-cols-4 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  min-width: 0;
}
@media (min-width: 640px) { .product-grid { gap: 2rem; } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Product Card ---------- */
.product-card {
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  background: #fff;
  border: 1.5px solid var(--brand-border);
  border-radius: var(--radius-2xl);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
  /* Giữ card trong grid column, không cho tràn */
  min-width: 0;
  overflow: hidden;
}
@media (min-width: 640px) { .product-card { padding: 1rem; } }
.product-card:hover {
  border-color: var(--brand-ink);
  box-shadow: var(--shadow-sm);
  transform: translateY(-5px);
}

.product-card-img {
  /* React: relative aspect-[4/3] overflow-hidden rounded-lg sm:rounded-xl */
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--brand-surface);
}
@media (min-width: 640px) { .product-card-img { border-radius: var(--radius-xl); } }

/* React: h-full w-full object-cover (NO position:absolute) */
.product-card-img img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  transition: transform 500ms cubic-bezier(0.4,0,0.2,1);
}
.product-card:hover .product-card-img img { transform: scale(1.1); }

.badge {
  position: absolute;
  display: flex; align-items: center; gap: 0.25rem;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.5rem;
  font-size: 0.625rem; font-weight: 700;
  color: var(--brand-ink);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 640px) {
  .badge { padding: 0.25rem 0.5rem; font-size: 0.6875rem; }
}
.badge-downloads { top: 0.5rem; left: 0.5rem; }
.badge-rating { top: 0.5rem; right: 0.5rem; }
@media (min-width: 640px) {
  .badge-downloads, .badge-rating { top: 0.75rem; }
  .badge-downloads { left: 0.75rem; }
  .badge-rating { right: 0.75rem; }
}
.badge svg { color: var(--brand-accent); }
.badge-rating svg { fill: var(--brand-accent); color: var(--brand-accent); }

.product-card-body {
  margin-top: 0.75rem;
  display: flex; flex-direction: column; gap: 0.25rem;
  padding-inline: 0.125rem;
}
@media (min-width: 640px) {
  .product-card-body { margin-top: 1rem; padding-inline: 0.25rem; }
}

.product-card-top {
  display: flex;
  flex-direction: column; gap: 0.125rem;
}
@media (min-width: 640px) {
  .product-card-top { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
}

.product-card-title {
  font-size: 0.8125rem; font-weight: 700;
  color: var(--brand-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2rem;
  line-height: 1.35;
  transition: color var(--transition);
}
@media (min-width: 640px) { .product-card-title { font-size: 0.875rem; min-height: 2.5rem; } }
.product-card:hover .product-card-title { color: var(--brand-accent); }

.product-card-price {
  font-size: 0.75rem; font-weight: 900;
  color: var(--brand-ink);
  white-space: nowrap;
}
@media (min-width: 640px) { .product-card-price { font-size: 0.8125rem; } }

.product-card-desc {
  display: none;
  font-size: 0.6875rem; color: var(--brand-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (min-width: 640px) { .product-card-desc { display: -webkit-box; } }

.product-card-footer {
  margin-top: 0.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
@media (min-width: 640px) { .product-card-footer { margin-top: 1rem; } }

.product-card-cat {
  font-size: 0.5625rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--brand-muted);
}
@media (min-width: 640px) { .product-card-cat { font-size: 0.625rem; } }

.product-card-btn {
  display: flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem;
  background: var(--brand-ink); color: #fff;
  border-radius: var(--radius-full);
  transition: background var(--transition), transform var(--transition);
}
@media (min-width: 640px) {
  .product-card-btn { width: 2rem; height: 2rem; }
}
.product-card-btn:hover { background: #333; }
.product-card-btn:active { transform: scale(0.9); }

/* ---------- Load More ---------- */
.load-more-wrap {
  margin-top: 4rem;
  display: flex; justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--brand-border);
  background: #fff;
  padding: 4rem 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem 3rem;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }

.footer-brand { display: flex; flex-direction: column; gap: 1.5rem; }
.footer-brand-logo { display: flex; align-items: center; gap: 0.5rem; }
.footer-brand-name { font-size: 1.125rem; font-weight: 900; letter-spacing: -0.02em; }
.footer-brand-desc { font-size: 0.875rem; color: var(--brand-muted); line-height: 1.7; max-width: 18rem; }

.footer-col {}
.footer-col-title {
  font-size: 0.6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--brand-ink);
  margin-bottom: 2rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 1rem; }
.footer-col a {
  font-size: 0.875rem; font-weight: 500;
  color: var(--brand-muted);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--brand-ink); }

.footer-bottom {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--brand-border);
  text-align: center;
}
.copyright {
  font-size: 0.625rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--brand-muted);
  opacity: 0.6;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem; color: var(--brand-muted);
  margin-bottom: 1.5rem;
}
.breadcrumb a { transition: color var(--transition); }
.breadcrumb a:hover { color: var(--brand-ink); }
.breadcrumb span[aria-current] { color: var(--brand-ink); font-weight: 600; }

/* ---------- Related Section ---------- */
.related-section { margin-top: 4rem; }

/* ---------- Product Detail Page ---------- */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 768px) {
  .product-detail-grid { grid-template-columns: 1fr 1.2fr; align-items: start; }
}

.product-detail-gallery { position: sticky; top: 6rem; }
.product-detail-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  border: 1.5px solid var(--brand-border);
}
.product-detail-img img { width: 100%; height: 100%; object-fit: cover; }

.product-detail-info { display: flex; flex-direction: column; gap: 1.5rem; }

.product-detail-cat {
  font-size: 0.6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--brand-muted);
}
.product-detail-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--brand-ink);
}
.product-detail-meta {
  display: flex; align-items: center; gap: 1.5rem;
  flex-wrap: wrap;
}
.meta-item {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.875rem; color: var(--brand-muted);
}
.meta-item svg { color: var(--brand-accent); }
.meta-item .fill { fill: var(--brand-accent); }

.product-detail-price-box {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--brand-surface);
  border: 1.5px solid var(--brand-border);
  border-radius: var(--radius-2xl);
  padding: 1.25rem 1.5rem;
}
.price-amount { font-size: 2.25rem; font-weight: 900; letter-spacing: -0.03em; }
.price-label { font-size: 0.75rem; font-weight: 600; color: var(--brand-muted); text-transform: uppercase; letter-spacing: 0.1em; }

.product-buy-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  width: 100%;
  background: var(--brand-ink); color: #fff;
  border-radius: var(--radius-xl);
  padding: 1rem 2rem;
  font-size: 1rem; font-weight: 700;
  letter-spacing: -0.01em;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.product-buy-btn:hover { background: #111; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.product-buy-btn:active { transform: scale(0.98); }

.product-guarantees {
  display: flex; flex-direction: column; gap: 0.75rem;
}
.guarantee-item {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.875rem; color: var(--brand-muted);
}
.guarantee-item svg { color: var(--brand-ink); flex-shrink: 0; }

.product-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1.5px solid var(--brand-border);
  border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600;
  color: var(--brand-muted);
  background: #fff;
  transition: border-color var(--transition), color var(--transition);
}
.tag:hover { border-color: var(--brand-ink); color: var(--brand-ink); }

.product-detail-content {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--brand-border);
}
.product-detail-content h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem; font-weight: 300;
  color: var(--brand-ink);
  margin-bottom: 2rem;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
}
/* JS sets style.display='flex' to show; hidden attribute = none */
.modal-overlay[hidden] { display: none !important; }
.modal-box {
  position: relative;
  background: #fff;
  border-radius: var(--radius-2xl);
  border: 1.5px solid var(--brand-border);
  padding: 2.5rem;
  width: 100%; max-width: 28rem;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--brand-border);
  background: #fff;
  color: var(--brand-ink);
  transition: background var(--transition);
}
.modal-close:hover { background: var(--brand-surface); }

.modal-title {
  font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.modal-form { display: flex; flex-direction: column; gap: 1rem; }
.modal-label { font-size: 0.8125rem; font-weight: 600; display: block; margin-bottom: 0.35rem; }
.modal-submit {
  width: 100%;
  background: var(--brand-ink); color: #fff;
  border-radius: var(--radius-xl);
  padding: 0.875rem;
  font-size: 0.9375rem; font-weight: 700;
  margin-top: 0.5rem;
  transition: background var(--transition);
}
.modal-submit:hover { background: #111; }

.success-box {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding: 1rem 0;
}
.success-icon { width: 4rem; height: 4rem; color: #16a34a; }
.success-title { font-size: 1.25rem; font-weight: 800; }
.success-desc { font-size: 0.9375rem; color: var(--brand-muted); }

.download-links { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5rem; }
.download-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border: 1.5px solid var(--brand-border);
  border-radius: var(--radius-xl);
  background: var(--brand-surface);
  color: var(--brand-ink);
  font-size: 0.875rem; font-weight: 600;
  transition: border-color var(--transition), background var(--transition);
}
.download-link:hover { border-color: var(--brand-ink); background: #fff; }

/* ---------- Static Pages ---------- */
.static-page-main { padding-top: 5rem; padding-bottom: 5rem; }
.static-heading {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 900; letter-spacing: -0.04em;
  color: var(--brand-ink);
  margin-bottom: 3rem;
  line-height: 1;
}
.static-content-card { padding: 3rem; }
.prose { font-size: 1rem; line-height: 1.8; color: var(--brand-muted); font-weight: 300; }
.prose h3 { font-size: 1.125rem; font-weight: 700; color: var(--var(--brand-ink,#000)); margin-bottom: 1rem; }
.prose p { margin-bottom: 2rem; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 3rem;
}
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1.5fr; } }

.contact-info-title {
  font-size: 1.25rem; font-weight: 800;
  margin-bottom: 1.5rem;
}
.contact-detail {
  display: flex; align-items: flex-start; gap: 0.75rem;
  font-size: 0.9375rem; color: var(--brand-muted);
  margin-bottom: 1.25rem;
}
.contact-detail svg { color: var(--brand-ink); margin-top: 0.1rem; flex-shrink: 0; }
.contact-detail a:hover { color: var(--brand-ink); }

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-group label { font-size: 0.875rem; font-weight: 600; color: var(--brand-ink); }
.contact-success {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: var(--radius-xl);
  font-size: 0.9375rem; color: #166534; font-weight: 500;
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeUp 0.4s cubic-bezier(0.4,0,0.2,1) both;
}

/* Staggered grid items */
.product-grid .product-card { animation: fadeUp 0.4s cubic-bezier(0.4,0,0.2,1) both; }
.product-grid .product-card:nth-child(1) { animation-delay: 0ms; }
.product-grid .product-card:nth-child(2) { animation-delay: 50ms; }
.product-grid .product-card:nth-child(3) { animation-delay: 100ms; }
.product-grid .product-card:nth-child(4) { animation-delay: 150ms; }
.product-grid .product-card:nth-child(5) { animation-delay: 200ms; }
.product-grid .product-card:nth-child(6) { animation-delay: 250ms; }
.product-grid .product-card:nth-child(7) { animation-delay: 300ms; }
.product-grid .product-card:nth-child(8) { animation-delay: 350ms; }

/* ---------- Prose fix ---------- */
.prose img, .prose video, .prose iframe {
  max-width: 100%; height: auto; border-radius: var(--radius-xl);
}

/* ============================================================
   PRODUCT DETAIL — exact React replica
   ============================================================ */

/* ── Breadcrumb ── */
.pd-breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--brand-muted);
  margin-bottom: 3rem;
}
.pd-breadcrumb a { transition: color var(--transition); }
.pd-breadcrumb a:hover { color: var(--brand-ink); }
.pd-breadcrumb span[aria-current] { color: var(--brand-ink); }
.pd-breadcrumb span[aria-hidden] { opacity: .3; }

/* ── Hero 2-col grid ── */
.pd-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}
@media (min-width: 1024px) {
  .pd-hero { grid-template-columns: 1fr 1fr; align-items: stretch; }
}

/* ── Image card (left) ── */
.pd-img-card {
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem;
}
@media (min-width: 640px) { .pd-img-card { padding: 2.5rem; } }
.pd-img-inner {
  position: relative;
  aspect-ratio: 1/1;
  width: 100%;
  overflow: hidden;
  border-radius: 2rem;
  border: 1px solid var(--brand-border);
  background: var(--brand-surface);
  box-shadow: var(--shadow-sm);
}
.pd-img-inner img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 1000ms cubic-bezier(0.4,0,0.2,1);
}
.pd-img-inner:hover img { transform: scale(1.05); }
.pd-img-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to top right, rgba(0,0,0,.05), transparent);
  pointer-events: none;
}

/* ── Info card (right) ── */
.pd-info-card {
  display: flex; flex-direction: column; justify-content: center;
  padding: 2.5rem;
  gap: 2.5rem;
}
.pd-top-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.pd-cat-pill {
  display: inline-block;
  border: 1px solid rgba(0,0,0,.1);
  background: var(--brand-surface);
  border-radius: var(--radius-full);
  padding: 0.375rem 1rem;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--brand-ink);
}
.pd-rating {
  display: flex; align-items: center; gap: 0.375rem;
}
.pd-rating-value {
  font-size: 0.75rem; font-weight: 700; letter-spacing: -0.02em;
}
.pd-rating-label {
  font-size: 0.75rem; font-weight: 500; color: var(--brand-muted); margin-left: 0.25rem;
}

/* ── Title ── */
.pd-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--brand-ink);
}

/* ── Description ── */
.pd-desc {
  font-size: 1.125rem; line-height: 1.7;
  color: var(--brand-muted); font-weight: 300;
}

/* ── Lower section ── */
.pd-lower {
  border-top: 1px solid var(--brand-border);
  padding-top: 2.5rem;
  display: flex; flex-direction: column; gap: 2.5rem;
}

/* ── Price row ── */
.pd-price-row {
  display: flex; align-items: flex-end; justify-content: space-between;
}
.pd-price-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--brand-muted); margin-bottom: 0.25rem;
}
.pd-price-amount { display: flex; align-items: baseline; gap: 0.25rem; }
.pd-price-number {
  font-size: clamp(3rem, 7vw, 3.75rem);
  font-weight: 300;
  letter-spacing: -0.05em;
  color: var(--brand-ink);
  line-height: 1;
}
.pd-price-currency {
  font-size: 0.875rem; font-weight: 500; color: var(--brand-muted);
}
.pd-downloads-pill {
  display: flex; align-items: center; gap: 0.5rem;
  border-radius: var(--radius-full);
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  padding: 0.375rem 1rem;
  font-size: 10px; font-weight: 700;
  color: var(--brand-ink);
}

/* ── Buy button (big full-width) ── */
.pd-buy-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  width: 100%;
  background: var(--brand-ink); color: #fff;
  border: none; border-radius: 1rem;
  padding: 1.5rem;
  font-size: 1.25rem; font-weight: 700;
  cursor: pointer; letter-spacing: -0.01em;
  transition: background var(--transition), transform var(--transition);
}
.pd-buy-btn:hover { background: #111; }
.pd-buy-btn:active { transform: scale(0.98); }
.pd-buy-icon { transition: transform var(--transition); }
.pd-buy-btn:hover .pd-buy-icon { transform: translateY(-3px); }

/* ── 3 trust badges ── */
.pd-badges {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  border-top: 1px solid var(--brand-border);
  padding-top: 2.5rem;
}
.pd-badge {
  display: flex; flex-direction: column;
  align-items: center; gap: 0.75rem; text-align: center;
}
.pd-badge-icon {
  width: 2.5rem; height: 2.5rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  background: var(--brand-surface);
}
.pd-badge span {
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--brand-muted);
}

/* ── Bento: content card ── */
.pd-bento { margin-top: 5rem; }
.pd-content-card { padding: 2rem; }
.pd-content-card:hover { transform: translateY(-5px); }
.pd-prose {
  font-size: 1.125rem; line-height: 1.8;
}
.pd-prose h2 {
  font-family: var(--font-serif);
  font-size: 2rem; font-weight: 300;
  color: var(--brand-ink);
  margin-bottom: 1rem; letter-spacing: -0.02em;
}
.pd-prose p { margin-bottom: 1rem; }
.pd-prose p:last-child { margin-bottom: 0; }
.pd-tags { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 3rem; }
.pd-tag {
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-full);
  padding: 0.375rem 1rem;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--brand-muted);
}
.pd-prose ol {
    list-style: decimal;
    padding-left: 5%;
}
.pd-prose ol li span {
    font-size: 1.125rem !important;
    line-height: 1.8;
}
.pd-prose span {
    font-size: 1.125rem !important;
    line-height: 1.8;
}
.pd-prose ul {
    list-style: disc;
    padding-left: 5%;
}
.pd-prose ul li span {
    font-size: 1.125rem !important;
    line-height: 1.8;
}

/* ── Serif heading (used in related + most downloaded) ── */
.pd-serif-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--brand-ink);
}

/* ── Most Downloaded grid ── */
.most-dl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 640px)  { .most-dl-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px)  { .most-dl-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .most-dl-grid { grid-template-columns: repeat(5, 1fr); gap: 1.5rem; } }

/* ── Purchase Modal (exact React) ── */
.pd-modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
}
.pd-modal-overlay[hidden] { display: none !important; }
.pd-modal-box {
  position: relative;
  width: 100%; max-width: 28rem;
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(0,0,0,.15);
  animation: pdModalIn .2s cubic-bezier(.34,1.56,.64,1);
  max-height: 90vh; overflow-y: auto;
}
@keyframes pdModalIn {
  from { opacity:0; transform: scale(.9) translateY(20px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}

/* close X (top-right absolute) */
.m-close-btn {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: none; border: none; cursor: pointer;
  color: var(--brand-muted); transition: color var(--transition);
  display: flex; align-items: center; padding: 0;
}
.m-close-btn:hover { color: var(--brand-ink); }

/* heading */
.m-heading-wrap { text-align: center; margin-bottom: 2rem; margin-top: .5rem; }
.m-title { font-size: 1.875rem; font-weight: 900; color: var(--brand-ink); letter-spacing: -0.03em; }
.m-subtitle { margin-top: 0.5rem; font-size: 0.875rem; color: var(--brand-muted); }

/* fields */
.m-fields { display: flex; flex-direction: column; gap: 1rem; }
.m-field-row {
  display: flex; align-items: center; gap: 0.75rem;
  border: 1.5px solid var(--brand-border);
  border-radius: var(--radius-xl);
  padding: 1rem;
  background: var(--brand-surface);
  transition: border-color var(--transition), background var(--transition);
}
.m-field-row:focus-within { border-color: var(--brand-ink); background: #fff; }
.m-field-input {
  flex: 1; border: none; background: transparent;
  outline: none; font-size: 0.875rem;
  color: var(--brand-ink); font-family: var(--font-sans);
}
.m-field-input::placeholder { color: var(--brand-muted); }

/* price row */
.m-price-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem;
}
.m-price-left {
  display: flex; align-items: center; gap: 0.75rem;
}
.m-price-label-text { font-size: 0.875rem; font-weight: 700; color: var(--brand-ink); }
.m-price-value { font-size: 1.25rem; font-weight: 900; color: var(--brand-ink); }

/* paypal button */
.m-paypal-wrap { margin-top: 2rem; }
.m-paypal-btn {
  width: 100%;
  background: var(--brand-ink); color: #fff;
  border: none; border-radius: 1rem;
  padding: 1.25rem;
  font-size: 1.125rem; font-weight: 700;
  cursor: pointer; font-family: var(--font-sans);
  transition: background var(--transition), transform var(--transition);
}
.m-paypal-btn:hover { background: #111; }
.m-paypal-btn:active { transform: scale(.98); }

/* success state */
.m-success-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 1.5rem; text-align: center; padding: 0.5rem 0;
  margin-top: 2rem;
}
.m-success-icon-ring {
  width: 4rem; height: 4rem;
  border: 4px solid var(--brand-accent);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  background: #fff;
}
.m-success-title { font-size: 1.5rem; font-weight: 900; color: var(--brand-ink); }
.m-success-text { margin-top: 0.5rem; font-size: 0.75rem; color: var(--brand-muted); line-height: 1.6; }

/* download items */
.m-dl-list { width: 100%; display: flex; flex-direction: column; gap: 0.75rem; }
.m-dl-item {
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 1rem;
  border: 1.5px solid var(--brand-border);
  background: var(--brand-surface);
  padding: 1rem;
  text-decoration: none; color: inherit;
  transition: border-color var(--transition), background var(--transition);
}
.m-dl-item:hover { border-color: var(--brand-ink); background: #fff; }
.m-dl-icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: 0.75rem;
  background: #fff; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.m-dl-info { flex: 1; text-align: left; margin: 0 0.75rem; }
.m-dl-name { font-size: 0.875rem; font-weight: 700; color: var(--brand-ink); }
.m-dl-size { font-size: 10px; color: var(--brand-muted); margin-top: 2px; }

/* ── Category icon: active state — accent border only, không phủ màu đen lên icon ── */

/* ── prod-grid: alias for product-grid ── */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  min-width: 0;
}
@media (min-width: 640px) { .prod-grid { gap: 2rem; } }
@media (min-width: 1024px) { .prod-grid { grid-template-columns: repeat(4, 1fr); } }
