/* cartwheely.com - US affiliate site */
:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --accent: #0066cc;
  --accent-hover: #0052a3;
  --border: #e0e0e0;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Libre Baskerville', Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.site-header {
  background: #1a1a1a;
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo-text {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.logo-link:hover .logo-text {
  color: #ccc;
}

.header-categories-link {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
}
.header-categories-link:hover {
  color: #ccc;
}
.site-header .header-categories-link {
  color: #fff;
}

.btn-icon {
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon img {
  display: block;
}

.btn-search img {
  filter: brightness(0) invert(1);
}

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1rem 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.search-overlay-inner {
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.search-form-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.search-form {
  display: flex;
  gap: 0.5rem;
}
.search-input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
}
.search-submit {
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
}
.search-submit:hover {
  background: var(--accent-hover);
}
.search-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
}
.search-close:hover {
  color: var(--text);
}

.search-suggestions {
  display: none;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-top: 0.25rem;
  box-shadow: var(--shadow);
}
.search-suggestions.is-open {
  display: block;
}
.search-suggestion-item {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.search-suggestion-item:last-child {
  border-bottom: none;
}
.search-suggestion-item:hover,
.search-suggestion-item.highlight {
  background: var(--accent);
  color: #fff;
}

.category-breadcrumb {
  font-size: 0.9rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-muted);
}
.category-breadcrumb a {
  color: var(--accent);
}
.category-breadcrumb a:hover {
  text-decoration: underline;
}

.all-categories-links {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.category-section-title {
  font-size: 1.35rem;
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--accent);
  color: var(--text);
}
.category-nav-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0 0 1rem 0;
}
.category-nav-list li {
  margin-bottom: 0.35rem;
}
.category-nav-list a {
  color: var(--accent);
  font-size: 0.95rem;
}
.category-nav-list a:hover {
  text-decoration: underline;
}
.all-categories-links .home-intro {
  margin: 0 0 1rem 0;
}

/* Main content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.article-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--text);
}

.article-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.article-meta-line .disclosure-text { margin: 0; }
.article-meta-line .last-updated { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0; }

/* Product cards */
.products-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-card-link {
  display: block;
  color: inherit;
}

.product-card-link:hover .product-card {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-color: #ccc;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (min-width: 900px) {
  .product-card {
    grid-template-columns: 100px 200px 1fr;
  }
}

.product-card-left {
  grid-column: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: #fafafa;
  border-right: 1px solid var(--border);
}

.product-rank {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.product-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.product-badge.best-choice {
  background: linear-gradient(135deg, #e8f4fc 0%, #cce5f7 100%);
  color: #0066b3;
  border: 1px solid rgba(0, 102, 179, 0.35);
}

.product-badge.value-for-money,
.product-badge.value-money {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.35);
}

.product-badge img {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.product-gallery {
  grid-column: 2;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  border-right: 1px solid var(--border);
}

@media (max-width: 899px) {
  .product-card {
    grid-template-columns: 1fr;
  }
  .product-card-left {
    flex-direction: row;
    justify-content: flex-start;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .product-gallery {
    grid-column: 1;
    border-right: none;
    flex-direction: row;
    align-items: flex-start;
  }
}

.product-image-main {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1;
  background: #f9f9f9;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.product-image-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-details {
  grid-column: 3;
  padding: 1rem 1.25rem;
  min-width: 0;
}

@media (max-width: 899px) {
  .product-details {
    grid-column: 1;
  }
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.35rem 0;
  color: var(--text);
}

.product-brand {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
}

.main-highlights {
  margin: 0.5rem 0;
}

.main-highlights h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.35rem 0;
  color: var(--text);
}

.main-highlights ul {
  margin: 0 0 0.35rem 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  transition: max-height 0.3s ease;
}

.main-highlights:not(.is-expanded) ul {
  max-height: 6.5rem;
  overflow: hidden;
}

.main-highlights.is-expanded ul {
  max-height: none;
}

.main-highlights li {
  margin-bottom: 0.25rem;
}

.show-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  padding: 0.2rem 0;
  font-size: 0.85rem;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
}

.show-more:hover {
  text-decoration: underline;
}

.show-more img {
  transition: transform 0.2s ease;
}

.main-highlights.is-expanded .show-more img {
  transform: rotate(180deg);
}

/* Check Price at Amazon button - uses www.amazon.com with our affiliate tag */
.view-deal-row,
.check-price-amazon {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
  padding: 0.75rem 1.5rem;
  min-height: 44px;
  background: #0073e6;
  color: #fff;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  transition: background 0.2s ease;
  text-decoration: none;
}

a.view-deal-row:hover,
a.check-price-amazon:hover {
  background: #0062c9;
  color: #fff;
}

.view-deal-row img[alt="Amazon"],
.check-price-amazon img[alt="Amazon"] {
  width: 72px;
  height: auto;
}

.btn-view-deal,
.check-price-amazon .btn-text {
  white-space: nowrap;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 1.25rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
}

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

.site-footer p {
  margin: 0.2rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Author */
.author-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 0.75rem 0;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 720px;
}
.author-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-name { font-weight: 700; font-size: 1.05rem; margin: 0 0 0.35rem 0; color: var(--text); }
.author-bio { font-size: 0.9rem; margin: 0; color: var(--text-muted); line-height: 1.45; }

/* Homepage */
.home-page .article-title { margin-bottom: 0.5rem; }
.home-intro { font-size: 1.1rem; color: var(--text-muted); margin: 0 0 1.5rem 0; max-width: 42em; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.category-card {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.category-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  color: var(--accent);
}

/* Main category links below roundups */
.main-category-links {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.main-category-links-intro {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.main-category-links-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.main-category-links-wrap a {
  font-size: 0.95rem;
  color: var(--accent);
}
.main-category-links-wrap a:hover {
  text-decoration: underline;
}
