/* ================================
   TEMPLATE PAGE
================================ */

.templates-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.06em;
  margin-bottom: 24px;
}

.templates-section {
  background: var(--cream);
}

.template-grid {
  display: grid;
  gap: 34px;
}

.template-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.template-preview {
  min-height: 420px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--navy);
  color: var(--white);
}

.browser-bar {
  width: 100%;
  height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  margin-bottom: 26px;
  position: relative;
}

.browser-bar::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 14px;
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 18px 0 rgba(255,255,255,0.35), 36px 0 rgba(255,255,255,0.35);
}

.mock-hero {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.05em;
  margin-bottom: 28px;
}

.mock-lines {
  width: 100%;
  height: 130px;
  border-radius: 22px;
  background:
    linear-gradient(to right, rgba(255,255,255,0.8) 0 55%, transparent 55%),
    linear-gradient(to right, rgba(255,255,255,0.45) 0 75%, transparent 75%),
    linear-gradient(to right, rgba(212,166,66,0.9) 0 35%, transparent 35%);
  background-size: 100% 18px;
  background-repeat: no-repeat;
  background-position: 0 10px, 0 48px, 0 95px;
}

.barber-preview {
  background: linear-gradient(135deg, #111827, #374151);
}

.plumber-preview {
  background: linear-gradient(135deg, #0F1A2A, #1D4ED8);
}

.salon-preview {
  background: linear-gradient(135deg, #3B1F2B, #B76E79);
}

.retail-preview {
  background: linear-gradient(135deg, #12372A, #4C8C56);
}

.template-content {
  padding: 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.template-tag {
  width: fit-content;
  background: rgba(212, 166, 66, 0.18);
  color: var(--gold-dark);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 8px 14px;
  margin-bottom: 18px;
}

.template-content h3 {
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.template-content p {
  color: var(--text-muted);
  margin-bottom: 22px;
}

.template-content ul {
  list-style: none;
  margin-bottom: 28px;
}

.template-content li {
  padding: 8px 0;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.template-content li::before {
  content: "✔";
  color: var(--gold-dark);
  font-weight: 900;
  margin-right: 8px;
}

.main-nav a[href="templates.html"] {
  color: var(--gold);
}

@media (max-width: 900px) {
  .template-card {
    grid-template-columns: 1fr;
  }

  .template-preview {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .template-content {
    padding: 32px 24px;
  }

  .mock-hero {
    font-size: 1.6rem;
  }
}

.website-preview {
  background: var(--white);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.preview-browser-bar {
  height: 42px;
  background: #101827;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
}

.preview-browser-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d4a642;
}

.preview-browser-bar span:nth-child(2) {
  background: rgba(255,255,255,0.45);
}

.preview-browser-bar span:nth-child(3) {
  background: rgba(255,255,255,0.25);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  background: #111827;
  color: white;
}

.preview-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 900;
}

.preview-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: white;
  border-radius: 50%;
  padding: 6px;
}

.preview-header nav {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
}

.preview-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  min-height: 430px;
  padding: 70px 44px;
  align-items: center;
  background: linear-gradient(135deg, #111827, #374151);
  color: white;
}

.preview-label {
  color: #d4a642;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  margin-bottom: 12px;
}

.preview-hero h1 {
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  max-width: 720px;
  margin-bottom: 20px;
}

.preview-hero p {
  max-width: 620px;
  color: rgba(255,255,255,0.78);
}

.preview-btn {
  display: inline-block;
  margin-top: 28px;
  background: #d4a642;
  color: #111827;
  font-weight: 900;
  padding: 14px 24px;
  border-radius: 999px;
}

.preview-hero-image {
  min-height: 260px;
  border-radius: 28px;
  background:
    linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)),
    radial-gradient(circle at top right, rgba(212,166,66,0.55), transparent 35%),
    rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.75);
  font-weight: 800;
}

.preview-about,
.preview-services,
.preview-contact {
  padding: 50px 44px;
}

.preview-about {
  background: #fffdf8;
}

.preview-about h2,
.preview-services h2,
.preview-contact h2 {
  font-size: 2rem;
  margin-bottom: 18px;
}

.preview-about p,
.preview-contact p {
  color: #6b7280;
  max-width: 680px;
}

.preview-service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.preview-service-grid div {
  background: #f7f3ec;
  padding: 26px;
  border-radius: 20px;
  border: 1px solid #e7dec8;
}

.preview-service-grid h3 {
  margin-bottom: 10px;
}

.preview-service-grid p {
  color: #6b7280;
}

.preview-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #111827;
  color: white;
}

.preview-proof div {
  padding: 30px;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.preview-proof p {
  color: rgba(255,255,255,0.7);
  margin-top: 6px;
}

.preview-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}

/* Logo colour generated theme */
.website-preview.custom-logo-theme .preview-header,
.website-preview.custom-logo-theme .preview-proof {
  background: var(--preview-secondary);
}

.website-preview.custom-logo-theme .preview-hero {
  background: linear-gradient(
    135deg,
    var(--preview-secondary),
    var(--preview-primary)
  );
}

.website-preview.custom-logo-theme .preview-btn {
  background: var(--preview-accent);
  color: #111;
}

.website-preview.custom-logo-theme .preview-label {
  color: var(--preview-accent);
}

.website-preview.custom-logo-theme .preview-service-grid div {
  border-top: 4px solid var(--preview-primary);
}

@media (max-width: 980px) {
  .preview-hero {
    grid-template-columns: 1fr;
  }

  .preview-service-grid,
  .preview-proof {
    grid-template-columns: 1fr;
  }

  .preview-header {
    flex-direction: column;
    gap: 16px;
  }

  .preview-contact {
    flex-direction: column;
    align-items: flex-start;
  }
}