/* ===== Reset & base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue: #2f5aff;
  --blue-dark: #1f43d6;
  --ink: #14161a;
  --ink-soft: #4b5563;
  --gray-50: #f7f8fa;
  --gray-100: #f1f2f5;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --white: #ffffff;
  --radius: 10px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-card-hover: 0 8px 20px rgba(16, 24, 40, 0.12);
  --container: 1240px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Buttons & links ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-weight: 600;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn--primary {
  background: var(--blue);
  color: var(--white);
}
.btn--primary:hover { background: var(--blue-dark); }
.btn--lg { padding: 14px 28px; font-size: 15px; }
.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn--outline {
  background: var(--white);
  color: var(--blue);
  border-color: var(--blue);
}
.btn--outline:hover { background: var(--blue); color: var(--white); }

.link-arrow {
  color: var(--blue);
  font-weight: 600;
  font-size: 14px;
}
.link-arrow:hover { text-decoration: underline; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--white);
}
.icon-btn--dark { color: var(--ink); }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); }

.utility-bar {
  background: var(--ink);
  color: var(--gray-300);
}
.utility-bar__inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  height: 34px;
  font-size: 13px;
}
.utility-links { display: flex; gap: 20px; }
.utility-links a:hover { color: var(--white); }

.main-nav { border-bottom: 1px solid var(--gray-200); }
.main-nav__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--blue);
  border-radius: 8px;
}
.logo__text { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}
.primary-nav a:hover { color: var(--blue); }

.nav-item { position: relative; display: flex; align-items: center; }
.nav-item__trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 4px 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.nav-item__trigger:hover { color: var(--blue); }
.nav-item--dropdown .nav-item__trigger::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -4px;
  opacity: 0.6;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 18px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  padding: 20px;
  z-index: 200;
}
.nav-dropdown::before {
  /* Invisible bridge over the visual gap above the panel, so moving the mouse
     from the trigger down into the dropdown never leaves a hoverable element. */
  content: "";
  position: absolute;
  top: -18px;
  left: 0;
  right: 0;
  height: 18px;
}
.nav-item--dropdown:hover .nav-dropdown,
.nav-item--dropdown:focus-within .nav-dropdown,
.nav-item--dropdown.is-open .nav-dropdown {
  display: block;
}
.nav-dropdown__columns { display: flex; gap: 32px; }
.nav-dropdown__col { display: flex; flex-direction: column; gap: 10px; min-width: 190px; }
.nav-dropdown__col a { font-size: 14px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.nav-dropdown__col a:hover { color: var(--blue); }
.nav-dropdown--page-types .nav-dropdown__col { min-width: 210px; }
.nav-dropdown__viewall {
  display: block;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
}

.main-nav__actions { display: flex; align-items: center; gap: 14px; }

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 8px 12px;
  width: 240px;
}
.search-form__icon { color: var(--gray-500); flex-shrink: 0; }
.search-form input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  width: 100%;
  font-family: inherit;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 6px;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ===== Hero ===== */
.hero { background: var(--gray-50); }
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 64px 24px 56px;
}

.hero__eyebrow {
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero__title {
  font-size: 48px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.hero__subtitle {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 460px;
  margin-bottom: 28px;
  line-height: 1.55;
}
.hero__actions { display: flex; align-items: center; gap: 22px; margin-bottom: 30px; }
.hero__stats {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.hero__stats li + li::before { content: "\2022"; margin-right: 10px; color: var(--gray-300); }
.hero__stats li { display: flex; gap: 10px; align-items: center; }

.hero__showcase { display: flex; gap: 16px; }

.pick-card { flex: 1; }
.pick-card__meta { padding-top: 14px; }
.pick-card__label {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.pick-card__row { display: flex; justify-content: space-between; align-items: flex-end; }
.pick-card__name { font-weight: 700; font-size: 16px; }
.pick-card__cat { font-size: 13px; color: var(--gray-500); }
.pick-card__price-block { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pick-card__price-block .price { font-weight: 800; font-size: 16px; }

.showcase-thumbs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 160px;
  flex-shrink: 0;
}
.mini-thumb {
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-200);
}
.mini-thumb__label { font-size: 12px; font-weight: 700; margin-bottom: 10px; }
.mini-thumb__swatches { display: flex; gap: 6px; }
.swatch { display: block; width: 28px; height: 28px; border-radius: 5px; }
.swatch--a { background: #1e1e1e; }
.swatch--b { background: #8fa3b3; }
.swatch--c { background: #e9e2d8; }
.mini-thumb__lines { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.mini-thumb__lines span { display: block; height: 6px; border-radius: 3px; background: var(--gray-200); }
.mini-thumb__lines span:nth-child(1) { width: 90%; }
.mini-thumb__lines span:nth-child(2) { width: 70%; }
.mini-thumb__lines span:nth-child(3) { width: 50%; }

.mini-thumb--image { display: block; padding: 0; aspect-ratio: 4 / 3; overflow: hidden; }
.mini-thumb--image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb--gray { background: var(--white); }
.thumb--tan-light { background: var(--white); }
.thumb--tan-light::after {
  content: "";
  display: block;
  margin-top: 4px;
  height: 46px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e9e2d8, #c9b79c);
}

.quick-filters { border-top: 1px solid var(--gray-200); background: var(--white); }
.quick-filters__inner {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  overflow-x: auto;
}
.pill {
  border: 1px solid var(--gray-300);
  background: var(--white);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pill:hover { border-color: var(--ink); }
.pill.is-active { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ===== Template sections ===== */
.template-section { padding: 56px 0; }
.template-section--alt { background: var(--gray-50); }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-header h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.results-count { font-size: 14px; color: var(--gray-500); margin-top: 4px; }
.results-empty { color: var(--gray-500); font-size: 15px; grid-column: 1 / -1; }
.results-secondary__label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  margin: 40px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}
.pagination__nav {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}
.pagination__nav:hover { text-decoration: underline; }
.pagination__nav.is-disabled { color: var(--gray-300); pointer-events: none; }
.pagination__pages { display: flex; align-items: center; gap: 4px; }
.pagination__page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.pagination__page:hover { background: var(--gray-100); }
.pagination__page.is-current { background: var(--ink); color: var(--white); }
.pagination__ellipsis { color: var(--gray-300); padding: 0 4px; }

.card-grid { display: grid; gap: 20px; }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }
.card-grid--5 { grid-template-columns: repeat(5, 1fr); }

/* ===== Card ===== */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }

.card__meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 14px 0;
}
.card__name { font-weight: 700; font-size: 14px; }
.card__cat { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.rating { font-size: 13px; color: #d97706; font-weight: 600; white-space: nowrap; }

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 14px;
  margin-top: auto;
}
.card__footer .price { font-weight: 800; font-size: 15px; }

/* ===== Thumbnail mockups ===== */
.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--white);
  overflow: hidden;
}
.thumb--lg { aspect-ratio: 16 / 10; }

.thumb__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.9;
}
.thumb__nav-links { display: flex; gap: 6px; }
.thumb__nav-links i {
  display: block;
  width: 14px;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.55;
}

.thumb__body { max-width: 82%; }
.thumb__body h3 { font-size: 17px; line-height: 1.25; font-weight: 700; margin-bottom: 8px; }
.thumb__body p { font-size: 11.5px; line-height: 1.4; opacity: 0.85; margin-bottom: 10px; max-width: 95%; }
.thumb__body--dark-text, .thumb__body--dark-text ~ * { color: var(--ink); }

.thumb__cta, .thumb__cta--ghost {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 12px;
  border: 1px solid currentColor;
  background: var(--white);
  color: var(--ink);
  width: fit-content;
}
.thumb__cta--ghost { background: transparent; color: inherit; }
.thumb__cta-row { display: flex; gap: 8px; }

.thumb__body--dash { max-width: 100%; }
.dash-mock { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dash-mock__stat { font-size: 13px; font-weight: 700; }
.dash-mock__line {
  flex: 1;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.25));
}

/* thumbnail color themes */
.thumb--steel   { background: linear-gradient(135deg, #c9d6e3, #8fa3b3); color: #12181f; }
.thumb--tech-dark { background: radial-gradient(circle at 30% 30%, #1b3a63, #0a1424); }
.thumb--tan     { background: linear-gradient(135deg, #efe8de, #c9b79c); color: #2a2118; }
.thumb--green   { background: linear-gradient(135deg, #cfe3c7, #6f9a5c); color: #16240e; }
.thumb--photo-dark { background: linear-gradient(135deg, #4a4a4a, #161616); }
.thumb--food-dark { background: linear-gradient(135deg, #5a4028, #221009); }
.thumb--medical { background: linear-gradient(135deg, #eef5fb, #cfe3f2); color: #12283a; }
.thumb--travel  { background: linear-gradient(135deg, #8fc2cd, #2e5f6e); }
.thumb--corporate { background: linear-gradient(135deg, #a7b9c9, #536578); color: #12181f; }
.thumb--navy    { background: linear-gradient(135deg, #1a2333, #0c1220); }
.thumb--tan-light-full { background: linear-gradient(135deg, #efe8de, #c9b79c); }

.thumb--image { padding: 0; }
.thumb--image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: var(--gray-300); padding-top: 48px; }
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__brand .logo__text { color: var(--white); }
.footer__tagline { font-size: 13.5px; margin-top: 14px; max-width: 260px; line-height: 1.6; color: var(--gray-500); }
.footer__col { display: flex; flex-direction: column; gap: 12px; }
.footer__col h4 { color: var(--white); font-size: 13px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.footer__col a { font-size: 14px; }
.footer__col a:hover { color: var(--white); }
.footer__bottom { padding: 20px 24px; font-size: 13px; color: var(--gray-500); }

/* ===== Product / Template Detail page ===== */
.product-page { padding: 32px 0 64px; }

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 24px;
}
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span[aria-current] { color: var(--ink); font-weight: 600; }

.product-hero {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 56px;
}

.product-gallery__main {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-200);
}
.gallery-slide { position: absolute; inset: 0; display: none; }
.gallery-slide.is-active { display: block; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.product-gallery__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.gallery-thumb {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}
.gallery-thumb:hover { border-color: var(--gray-300); }
.gallery-thumb.is-active { border-color: var(--blue); color: var(--ink); }
.gallery-thumb__preview { display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 5px; object-fit: cover; }

.buy-box {
  position: sticky;
  top: 96px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
}
.buy-box__cat { font-size: 13px; color: var(--gray-500); font-weight: 600; margin-bottom: 6px; }
.buy-box__title { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 8px; }
.buy-box__rating { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.buy-box__reviews { font-size: 13px; color: var(--gray-500); }
.buy-box__desc { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 20px; }

.buy-box__price-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.price--lg { font-size: 30px; font-weight: 800; }
.buy-box__license { font-size: 13px; color: var(--gray-500); }

.buy-box__actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.btn--block { width: 100%; }

.buy-box__facts { border-top: 1px solid var(--gray-200); padding-top: 16px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.buy-box__facts li { display: flex; justify-content: space-between; font-size: 13.5px; }
.buy-box__facts li span { color: var(--gray-500); }

.buy-box__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  background: var(--gray-100);
  color: var(--ink-soft);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
}

.product-details { max-width: 760px; margin-bottom: 56px; }
.product-details h2 { font-size: 22px; font-weight: 800; margin-bottom: 14px; }
.product-details p { font-size: 15px; line-height: 1.7; color: var(--ink-soft); margin-bottom: 18px; }
.feature-list { display: flex; flex-direction: column; gap: 10px; }
.feature-list li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.feature-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--blue);
  font-weight: 700;
}

.template-section--related { padding: 0; }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .card-grid--5 { grid-template-columns: repeat(3, 1fr); }
  .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__showcase { max-width: 560px; }
}

@media (max-width: 860px) {
  .primary-nav, .search-form { display: none; }
  .nav-toggle { display: flex; }
  .utility-links { display: none; }
  .hero__title { font-size: 36px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .product-hero { grid-template-columns: 1fr; }

  .primary-nav.is-open {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 8px 24px 16px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .primary-nav.is-open > a,
  .primary-nav.is-open > .nav-item > .nav-item__trigger {
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    width: 100%;
    justify-content: space-between;
  }
  .main-nav { position: relative; }

  .nav-item { width: 100%; }
  .nav-item--dropdown { flex-direction: column; align-items: stretch; }
  .nav-dropdown {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    padding: 4px 0 8px 14px;
    min-width: 0;
  }
  .nav-dropdown::before { display: none; }
  .nav-item--dropdown:hover .nav-dropdown,
  .nav-item--dropdown:focus-within .nav-dropdown {
    display: none;
  }
  .nav-item--dropdown.is-open .nav-dropdown { display: block; }
  .nav-dropdown__columns { flex-direction: column; gap: 4px; }
  .nav-dropdown__col { min-width: 0; gap: 2px; }
  .nav-dropdown__col a { padding: 8px 0; border-bottom: 1px solid var(--gray-100); white-space: normal; }
  .nav-dropdown__viewall { padding: 8px 0; }
}

@media (max-width: 600px) {
  .card-grid--5, .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .hero__showcase { flex-direction: column; }
  .showcase-thumbs { flex-direction: row; width: 100%; }
  .footer__inner { grid-template-columns: 1fr; }

  .card__footer { flex-direction: column; align-items: stretch; gap: 8px; }
  .card__footer .btn { width: 100%; text-align: center; }
}
