/* =============================================
   Tech Dads Life — Main Stylesheet
   Brand colours:
     Charcoal:  #333333
     Light grey:#CCCCCC
     Teal:      #0099CC
     Blue:      #2E9FFF
     Orange:    #FF6900
============================================= */

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

html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: #333333;
  background: #f5f5f5;
  line-height: 1.7;
  overflow-x: hidden;
  max-width: 100%;
}

a { color: #0099CC; text-decoration: none; }
a:hover { color: #FF6900; text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: #333333;
}

/* --- Layout --- */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

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

.content-area {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

@media (max-width: 900px) {
  .content-area { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
}

/* ─── Header ────────────────────────────────── */
.site-header {
  background: #000;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 3px solid #0099CC;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img { height: 40px; width: auto; display: block; }
.logo-text {
  display: none;
  color: #0099CC;
  font-size: 1.25rem;
  font-weight: 900;
  white-space: nowrap;
}

/* Nav fills centre */
.site-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}
.nav-menu li { display: flex; align-items: stretch; }
.nav-menu li a {
  display: flex;
  align-items: center;
  padding: 0 14px;
  height: 60px;
  color: #aaaaaa;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-menu li a:hover {
  color: #fff;
  border-bottom-color: #0099CC;
  text-decoration: none;
}

/* Right-side actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Search icon button */
.search-trigger {
  background: none;
  border: none;
  cursor: pointer;
  color: #aaaaaa;
  display: flex;
  align-items: center;
  padding: 6px;
  border-radius: 4px;
  transition: color 0.2s;
}
.search-trigger:hover { color: #fff; }

/* Newsletter button */
.header-newsletter-btn {
  background: #FF6900;
  color: #fff;
  padding: 7px 16px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}
.header-newsletter-btn:hover { background: #e55f00; color: #fff; text-decoration: none; }

/* Hamburger — mobile only */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 38px;
  height: 38px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #cccccc;
  border-radius: 2px;
  transition: 0.2s;
}

/* ─── Search Overlay ──────────────────────── */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 500;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.search-overlay.open { display: flex; }

.search-overlay-inner {
  width: 100%;
  max-width: 640px;
  padding: 0 24px;
  position: relative;
}

.search-overlay-close {
  position: absolute;
  top: -52px;
  right: 24px;
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.search-overlay-close:hover { color: #fff; }

.search-overlay-form {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1a1a1a;
  border: 2px solid #0099CC;
  border-radius: 8px;
  padding: 14px 20px;
}
.search-overlay-form svg { flex-shrink: 0; color: #666; }
.search-overlay-form input[type="search"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1.2rem;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
.search-overlay-form input[type="search"]::placeholder { color: #555; }
.search-overlay-form input[type="search"]::-webkit-search-cancel-button,
.search-overlay-form input[type="search"]::-webkit-search-decoration { display: none; }

.search-overlay-hint {
  text-align: center;
  color: #555;
  font-size: 0.82rem;
  margin-top: 14px;
}

/* ─── Tablet (900px) ───────────────────────── */
@media (max-width: 900px) {
  .header-newsletter-btn { display: none; }
}

/* ─── Mobile layout (<768px) ───────────────── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .site-logo img { height: 28px; }
  .site-logo { max-width: calc(100% - 96px); }

  /* Nav becomes full-width dropdown */
  .site-nav {
    display: none;
    position: absolute;
    top: 63px;
    left: 0;
    right: 0;
    background: #111;
    border-bottom: 3px solid #0099CC;
    z-index: 199;
    flex: unset;
    justify-content: flex-start;
  }
  .site-nav.open { display: block; }

  .nav-menu {
    flex-direction: column;
    overflow: visible;
    width: 100%;
  }
  .nav-menu li { display: block; width: 100%; }
  .nav-menu li a {
    height: auto;
    padding: 15px 24px;
    font-size: 0.85rem;
    border-bottom: 1px solid #1e1e1e;
    border-left: none;
    white-space: normal;
    width: 100%;
    box-sizing: border-box;
  }
  .nav-menu li a:hover {
    background: rgba(0,153,204,0.12);
    border-bottom-color: #1e1e1e;
    color: #fff;
  }

  .search-overlay { padding-top: 80px; }
}

/* --- Hero Banner (home) --- */
.hero {
  background: linear-gradient(135deg, #000 0%, #0099CC 100%);
  padding: 60px 20px;
  text-align: center;
  color: #fff;
}

.hero h1 {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 12px;
}

.hero p {
  font-size: 1.2rem;
  color: #CCCCCC;
  margin-bottom: 28px;
}

.hero-cta {
  display: inline-block;
  background: #FF6900;
  color: #fff;
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s;
}

.hero-cta:hover { background: #e55f00; color: #fff; text-decoration: none; }

/* --- Category Filter Bar --- */
.category-bar {
  background: #fff;
  border-bottom: 1px solid #CCCCCC;
  padding: 0;
  overflow-x: auto;
}

.category-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 0;
}

.category-bar a {
  display: block;
  padding: 12px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333333;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.category-bar a:hover,
.category-bar a.active {
  color: #0099CC;
  border-color: #0099CC;
  text-decoration: none;
}

/* --- Article Cards Grid --- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 28px;
}

/* Featured first post takes full width */
.posts-grid .post-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.posts-grid .post-card:first-child .card-image {
  border-radius: 8px 0 0 8px;
  height: 100%;
}

.posts-grid .post-card:first-child .card-image img {
  height: 100%;
  object-fit: cover;
  border-radius: 8px 0 0 8px;
}

.posts-grid .post-card:first-child .card-body {
  border-radius: 0 8px 8px 0;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.posts-grid .post-card:first-child .card-title {
  font-size: 1.6rem;
}

@media (max-width: 700px) {
  .posts-grid .post-card:first-child {
    grid-template-columns: 1fr;
  }
  .posts-grid .post-card:first-child .card-image,
  .posts-grid .post-card:first-child .card-image img {
    border-radius: 8px 8px 0 0;
    height: 220px;
  }
  .posts-grid .post-card:first-child .card-body {
    border-radius: 0 0 8px 8px;
  }
}

.post-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.14);
  transform: translateY(-3px);
}

.card-image {
  overflow: hidden;
  height: 200px;
  background: #1a1a1a;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .card-image img { transform: scale(1.03); }

.card-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0099CC, #333333);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image-placeholder span {
  font-size: 3rem;
  color: rgba(255,255,255,0.3);
}

.card-body { padding: 20px; }

.card-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: #0099CC;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 10px;
  text-decoration: none;
}

.card-category:hover { background: #FF6900; color: #fff; text-decoration: none; }

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
}

.card-title a { color: #333333; text-decoration: none; }
.card-title a:hover { color: #0099CC; }

.card-excerpt {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 14px;
  line-height: 1.6;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: #999;
}

.card-meta time { color: #999; }

.read-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #FF6900;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.read-more:hover { color: #0099CC; }

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 40px 0;
  flex-wrap: wrap;
  list-style: none;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #333333;
  text-decoration: none;
  background: none;
  border: none;
  transition: color 0.2s;
}

.pagination a:hover { color: #0099CC; text-decoration: none; }
.pagination .current {
  color: #fff;
  background: #0099CC;
  border-radius: 4px;
}

/* Hide any li wrappers if internal template bleeds through */
.pagination li { list-style: none; display: inline; }

/* --- Single Article --- */
.article-header {
  background: #000;
  padding: 50px 20px 40px;
  text-align: center;
  color: #fff;
}

.article-header .article-cats {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.article-header h1 {
  font-size: 2rem;
  color: #fff;
  max-width: 800px;
  margin: 0 auto 16px;
  line-height: 1.3;
}

.article-meta {
  font-size: 0.875rem;
  color: #CCCCCC;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.article-featured-image {
  max-height: 500px;
  overflow: hidden;
  background: #1a1a1a;
}

.article-featured-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .article-layout { padding: 0 12px; margin: 20px auto; }
  .article-content { padding: 20px; }
}

@media (max-width: 480px) {
  .article-layout { padding: 0; margin: 0; }
  .article-content { padding: 16px; border-radius: 0; }
  .article-header h1 { font-size: 1.5rem; }
  .article-header { padding: 32px 16px 28px; }
}

.article-content {
  background: #fff;
  border-radius: 6px;
  padding: 32px 36px;
  min-width: 0;
}

.article-content h1,
.article-content h2 {
  color: #333333;
  margin: 1.8em 0 0.6em;
  padding-bottom: 8px;
  border-bottom: 2px solid #0099CC;
}

.article-content h3,
.article-content h4 {
  color: #333333;
  margin: 1.4em 0 0.5em;
}

.article-content h1:first-child,
.article-content h2:first-child { margin-top: 0; }

.article-content p { margin-bottom: 1.3em; }

.article-content ul,
.article-content ol {
  margin: 0 0 1.3em 1.5em;
}

.article-content li { margin-bottom: 0.4em; }

.article-content blockquote {
  border-left: 4px solid #0099CC;
  padding: 12px 20px;
  margin: 1.5em 0;
  background: #f0f8fc;
  border-radius: 0 6px 6px 0;
  color: #555;
  font-style: italic;
}

.article-content table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.9rem;
  -webkit-overflow-scrolling: touch;
}

.article-content th {
  background: #333333;
  color: #fff;
  padding: 10px 14px;
  text-align: left;
}

.article-content td {
  padding: 10px 14px;
  border-bottom: 1px solid #CCCCCC;
}

.article-content tr:nth-child(even) td { background: #f9f9f9; }

.article-content img {
  border-radius: 6px;
  margin: 1.2em auto;
}

.article-content a { color: #0099CC; font-weight: 500; }
.article-content a:hover { color: #FF6900; }

/* Affiliate link styling */
.article-content a[href*="amzn.to"] {
  background: #FF6900;
  color: #fff;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 700;
}

.article-content a[href*="amzn.to"]:hover {
  background: #e55f00;
  color: #fff;
  text-decoration: none;
}

/* --- Article Share Bar --- */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  border-top: 1px solid #CCCCCC;
  margin-top: 30px;
  flex-wrap: wrap;
}

.share-label {
  font-weight: 700;
  font-size: 0.875rem;
  color: #666;
  margin-right: 4px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  color: #888;
  background: transparent;
  border: 1px solid #ddd;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: color 0.2s, border-color 0.2s;
  line-height: 1;
}

.share-btn:hover { text-decoration: none; transform: none; }
.share-btn:active { transform: none; }

.share-twitter:hover  { color: #000;     border-color: #000; }
.share-facebook:hover { color: #1877F2;  border-color: #1877F2; }
.share-linkedin:hover { color: #0A66C2;  border-color: #0A66C2; }
.share-whatsapp:hover { color: #25D366;  border-color: #25D366; }
.share-copy:hover     { color: #0099CC;  border-color: #0099CC; }

@media (max-width: 480px) {
  .share-bar { gap: 8px; }
  .share-btn { padding: 6px 10px; font-size: 0.75rem; }
}

/* --- Newsletter CTA Box --- */
.newsletter-cta {
  background: linear-gradient(135deg, #0099CC, #2E9FFF);
  color: #fff;
  padding: 36px 32px;
  border-radius: 8px;
  text-align: center;
  margin: 36px 0;
}

.newsletter-cta h3 {
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.newsletter-cta p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.newsletter-cta .btn-subscribe {
  display: inline-block;
  background: #FF6900;
  color: #fff;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s;
}

.newsletter-cta .btn-subscribe:hover {
  background: #e55f00;
  color: #fff;
  text-decoration: none;
}

/* --- Sidebar --- */
.sidebar { }

.sidebar-widget {
  background: #fff;
  border-radius: 6px;
  padding: 20px 24px;
  border-top: 3px solid #0099CC;
  margin-bottom: 24px;
}

.widget-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0099CC;
  border-bottom: 2px solid #0099CC;
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.recent-post-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.recent-post-item:last-child { border-bottom: none; }

.recent-post-thumb {
  width: 64px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #1a1a1a;
}

.recent-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post-info { flex: 1; }

.recent-post-info a {
  font-size: 0.82rem;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  text-decoration: none;
}

.recent-post-info a:hover { color: #0099CC; }

.recent-post-info time {
  display: block;
  font-size: 0.72rem;
  color: #999;
  margin-top: 3px;
}

.category-list { list-style: none; }

.category-list li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-list li:last-child { border-bottom: none; }

.category-list a {
  font-size: 0.875rem;
  color: #333;
  text-decoration: none;
  font-weight: 500;
}

.category-list a:hover { color: #0099CC; }

.category-list .cat-count {
  font-size: 0.75rem;
  background: #f0f0f0;
  color: #666;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Ad placeholder */
.ad-placeholder {
  background: #f5f5f5;
  border: 2px dashed #CCCCCC;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  color: #999;
  font-size: 0.8rem;
  text-align: center;
}

/* --- Category / Archive Pages --- */
.page-header {
  background: linear-gradient(135deg, #000, #0099CC);
  padding: 50px 20px;
  text-align: center;
  color: #fff;
  margin-bottom: 0;
}

.page-header h1 { color: #fff; font-size: 2rem; margin-bottom: 8px; }
.page-header p { color: rgba(255,255,255,0.8); }

/* --- About / Static Pages --- */
.page-content {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.page-content h1, .page-content h2 { color: #0099CC; margin-bottom: 16px; }
.page-content p { margin-bottom: 1.2em; }

/* --- Footer --- */
.site-footer {
  background: #111;
  color: #CCCCCC;
  padding: 48px 20px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

.footer-brand img { height: 44px; margin-bottom: 16px; }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; color: #999; }

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #222;
  color: #CCCCCC;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.footer-social a:hover { background: #0099CC; color: #fff; }

.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #999; font-size: 0.875rem; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #0099CC; }

.footer-bottom {
  border-top: 1px solid #222;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: #666;
}

.footer-bottom a { color: #666; text-decoration: none; }
.footer-bottom a:hover { color: #0099CC; }

/* --- Utilities --- */
.text-teal { color: #0099CC; }
.text-orange { color: #FF6900; }
.bg-dark { background: #333333; }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 3px;
}

.badge-teal { background: #0099CC; color: #fff; }
.badge-orange { background: #FF6900; color: #fff; }

/* Hype Cycle box */
.hype-cycle {
  background: #1a1a1a;
  color: #fff;
  border-radius: 8px;
  padding: 24px 28px;
  margin: 24px 0;
}

.hype-cycle h4 { color: #0099CC; margin-bottom: 12px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }
.hype-cycle p { color: #CCCCCC; font-size: 0.9rem; margin-bottom: 0.6em; }
.hype-cycle strong { color: #FF6900; }

/* =============================================
   Amazon Product Cards
============================================= */
.amz-product-section {
  margin: 2.5rem 0;
  padding: 1.5rem;
  background: #fff;
  border: 2px solid #0099CC;
  border-radius: 10px;
}

.amz-section-title {
  font-size: 1.2rem;
  color: #333333;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #CCCCCC;
  padding-bottom: 0.75rem;
}

.amz-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.amz-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  background: #fafafa;
}

.amz-card:hover {
  box-shadow: 0 4px 16px rgba(0,153,204,0.18);
  transform: translateY(-2px);
}

.amz-card-img-link {
  display: block;
  background: #fff;
  text-align: center;
  padding: 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}

.amz-card-img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.amz-card-img-placeholder {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.amz-card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.4rem;
}

.amz-card-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: #333333;
  line-height: 1.3;
  text-decoration: none;
}

.amz-card-name:hover { color: #0099CC; text-decoration: none; }

.amz-card-desc {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.4;
  flex: 1;
}

.amz-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
  padding: 0.45rem 0.75rem;
  background: #FF6900;
  color: #fff !important;
  border-radius: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s;
}

.amz-card-btn:hover { background: #cc5400; color: #fff !important; }

.amz-disclaimer {
  font-size: 0.75rem;
  color: #999;
  margin-top: 0.5rem;
  font-style: italic;
}

@media (max-width: 600px) {
  .amz-product-grid { grid-template-columns: repeat(2, 1fr); }
}

/* (header-actions styles now in the header section above) */

/* ─── Search Page ───────────────────────────── */
.search-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.search-hero {
  text-align: center;
  padding: 20px 0 36px;
  border-bottom: 1px solid #333;
  margin-bottom: 36px;
}
.search-hero h1 {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 8px;
}
.search-hero p {
  color: #aaaaaa;
  font-size: 1rem;
  margin: 0;
}
.search-wrapper {
  margin-top: 0;
}

/* Pagefind UI — dark theme, scoped to #search to beat default specificity */
#search {
  --pagefind-ui-scale: 1;
  --pagefind-ui-primary: #0099CC;
  --pagefind-ui-text: #cccccc;
  --pagefind-ui-background: #1c1c1c;
  --pagefind-ui-border: #444444;
  --pagefind-ui-tag: #333333;
  --pagefind-ui-border-width: 2px;
  --pagefind-ui-border-radius: 4px;
  --pagefind-ui-image-border-radius: 4px;
  --pagefind-ui-image-box-ratio: 3 / 2;
  --pagefind-ui-font: inherit;
}
.pagefind-ui__search-input {
  background: #1c1c1c !important;
  color: #ffffff !important;
  border-color: #444444 !important;
}
.pagefind-ui__search-input::placeholder { color: #666666 !important; }
.pagefind-ui__search-clear { color: #888 !important; }
.pagefind-ui__form::before { background-color: #888 !important; }
.pagefind-ui__result { border-color: #2a2a2a !important; }
.pagefind-ui__result-title a { color: #0099CC !important; }
.pagefind-ui__result-title a:hover { color: #FF6900 !important; }
.pagefind-ui__result-excerpt { color: #999999 !important; }
.pagefind-ui__message { color: #888888 !important; }
.pagefind-ui__button {
  background: #0099CC !important;
  color: #ffffff !important;
  border-color: #0099CC !important;
}
.pagefind-ui__button:hover {
  background: #FF6900 !important;
  border-color: #FF6900 !important;
}

/* ── 404 page ─────────────────────────────────────────────────────────────── */

.error-page {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.error-code {
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 900;
  line-height: 1;
  color: #FF6900;
  letter-spacing: -4px;
  margin-bottom: 0;
}

.error-img {
  width: 100%;
  max-width: 700px;
  border-radius: 16px;
  margin: 1.5rem auto;
}

.error-headline {
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: #333;
  margin: 1rem 0 0.5rem;
}

.error-subtext {
  font-size: 1.05rem;
  color: #666;
  max-width: 540px;
  margin: 0 auto 0.75rem;
  line-height: 1.6;
}

.error-dad-quote {
  display: inline-block;
  background: #f5f5f5;
  border-left: 4px solid #0099CC;
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1.25rem;
  margin: 1.25rem auto;
  max-width: 520px;
  font-style: italic;
  color: #444;
  font-size: 0.97rem;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.75rem;
}

.btn-home {
  display: inline-block;
  background: #FF6900;
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-home:hover { background: #cc5400; color: #fff; text-decoration: none; }

.btn-secondary {
  display: inline-block;
  background: #fff;
  color: #0099CC;
  border: 2px solid #0099CC;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-secondary:hover { background: #0099CC; color: #fff; text-decoration: none; }

.error-suggestions {
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: #888;
}
.error-suggestions a { color: #0099CC; }
.error-suggestions a:hover { color: #FF6900; }
