/* ==========================================================================
   Delas av de tre kategorisidorna: /flaktar/, /datorkylning/, /inomhusklimat/
   Färgsättning kommer från theme-*.css. Ladda EFTER base.css + theme-*.css.
   ========================================================================== */

.main { max-width: 1100px; margin: 0 auto; padding: 40px 20px 80px; }

/* Rullande text + sök i hero */
.hero-text-block { height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; transition: opacity 0.6s ease; }
.hero-text-block.fading { opacity: 0; }
.rotate-text { display: inline-block; }
.search-wrap { display: flex; max-width: 540px; margin: 0 auto 32px; background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 8px 32px rgba(4,44,83,0.25); }
.search-wrap input { flex: 1; border: none; outline: none; padding: 14px 18px; font-size: 15px; font-family: 'Inter', 'Inter Fallback', sans-serif; background: transparent; color: var(--gray-dark); min-width: 0; }
.search-wrap input::placeholder { color: var(--gray-light); }
.search-wrap button { background: var(--accent); color: var(--accent-text); border: none; padding: 0 22px; font-size: 14px; font-weight: 500; font-family: 'Inter', 'Inter Fallback', sans-serif; cursor: pointer; white-space: nowrap; transition: background 0.15s; }
.search-wrap button:hover { background: var(--accent-hover); }

.hero-stats { display: flex; justify-content: center; gap: clamp(20px, 5vw, 48px); flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat strong { display: block; color: var(--white); font-size: 22px; font-weight: 500; }
.hero-stat span { color: rgba(255,255,255,0.6); font-size: 12px; }

/* Intro + filter */
.intro { background: var(--white); border-radius: var(--radius-lg); padding: 28px 32px; margin-bottom: 32px; border: 1px solid var(--gray-pale); }
.intro h2 { font-size: 17px; font-weight: 500; color: var(--blue-dark); margin-bottom: 8px; }
.intro p { font-size: 14px; color: var(--gray-mid); line-height: 1.7; max-width: 780px; }

.filter-section { background: var(--white); border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 28px; border: 1px solid var(--gray-pale); }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-row:last-child { margin-bottom: 0; }
.filter-label { font-size: 12px; font-weight: 500; color: var(--gray-mid); text-transform: uppercase; letter-spacing: 0.06em; min-width: 70px; flex-shrink: 0; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { padding: 6px 14px; border-radius: 20px; border: 1px solid var(--gray-pale); background: var(--white); font-size: 13px; font-family: 'Inter', 'Inter Fallback', sans-serif; color: var(--gray-mid); cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.active { background: var(--accent-ghost); border-color: var(--accent); color: var(--accent); font-weight: 500; }
.filter-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--gray-pale); flex-wrap: wrap; gap: 10px; }
.result-count { font-size: 13px; color: var(--gray-mid); }
.result-count strong { color: var(--gray-dark); }
.sort-select { font-size: 13px; font-family: 'Inter', 'Inter Fallback', sans-serif; padding: 7px 12px; border: 1px solid var(--gray-pale); border-radius: var(--radius-sm); color: var(--gray-dark); background: var(--white); cursor: pointer; outline: none; }

/* Produktgrid */
.section-label { font-size: 12px; font-weight: 600; color: var(--gray-light); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 36px; min-height: 320px; }
.card.featured { border-color: var(--accent); }
.card-img { width: 100%; height: 150px; display: flex; align-items: center; justify-content: center; position: relative; background: var(--accent-ghost); overflow: hidden; }
.card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.card-brand { font-size: 11px; color: var(--gray-light); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.card-name { font-size: 14px; font-weight: 500; color: var(--gray-dark); margin-bottom: 10px; line-height: 1.35; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--gray-pale); gap: 8px; }
.card-price { font-size: 18px; font-weight: 500; color: var(--gray-dark); line-height: 1; }
.card-price small { font-size: 12px; font-weight: 400; color: var(--gray-light); }
.no-results { text-align: center; padding: 60px 20px; color: var(--gray-mid); display: none; }
.no-results h3 { font-size: 16px; font-weight: 500; margin-bottom: 6px; color: var(--gray-dark); }

/* Info-knapp (visas bara där hover-panelen INTE fungerar, dvs. touch-enheter) */
.info-btn {
  position: absolute; top: 8px; right: 8px; z-index: 6;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(4,44,83,0.55); color: var(--white);
  border: none; font-size: 13px; font-style: italic; font-weight: 700;
  font-family: Georgia, serif; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.info-btn:hover { background: rgba(4,44,83,0.8); }

/* Hover-panel (endast enheter med mus/pekare i tillräckligt bred vy).
   Dold som standard så inget läcker ut som oformaterad text på touch/mobil. */
.card-hover, .ecard-hover { display: none; }
@media (hover: hover) and (min-width: 769px) {
  .info-btn { display: none; }
  .card-hover { display: flex; position: absolute; inset: 0; background: rgba(4,44,83,0.96); border-radius: inherit; padding: 18px; flex-direction: column; gap: 10px; opacity: 0; pointer-events: none; transition: opacity 0.18s ease; z-index: 10; }
  .card:hover .card-hover { opacity: 1; pointer-events: auto; }
  .ch-namn { font-size: 15px; font-weight: 500; color: #ffffff; line-height: 1.3; }
  .ch-desc { font-size: 12px; color: rgba(255,255,255,0.7); line-height: 1.6; flex: 1; }
  .ch-specs { display: flex; flex-wrap: wrap; gap: 6px; }
  .ch-spec { font-size: 11px; background: rgba(255,255,255,0.1); color: var(--white); padding: 3px 8px; border-radius: 4px; }
  .ch-typ { font-size: 10px; font-weight: 600; color: var(--accent-pale); text-transform: uppercase; letter-spacing: 0.08em; }
  .ch-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.1); gap: 8px; }
  .ch-price { font-size: 18px; font-weight: 500; color: #ffffff; }
  .ch-buy { background: var(--accent); color: var(--accent-text); border: none; padding: 8px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; font-family: 'Inter', 'Inter Fallback', sans-serif; cursor: pointer; text-decoration: none; display: inline-block; transition: background 0.15s; white-space: nowrap; }
  .ch-buy:hover { background: var(--accent-hover); }
}

/* Mobil/touch produktinfo — modal som visas via info-knappen ovan */
.info-modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(4,44,83,0.5);
  align-items: flex-end; justify-content: center;
}
.info-modal-overlay.open { display: flex; }
.info-modal {
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 28px 24px;
  width: 100%; max-width: 480px;
  max-height: 82vh; overflow-y: auto;
  position: relative;
  animation: im-slide-up 0.25s ease;
}
@keyframes im-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.info-modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 22px; line-height: 1;
  color: var(--gray-light); cursor: pointer;
}
.im-typ { font-size: 11px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.im-namn { font-size: 18px; font-weight: 500; color: var(--gray-dark); margin-bottom: 10px; line-height: 1.3; }
.im-desc { font-size: 14px; color: var(--gray-mid); line-height: 1.6; margin-bottom: 16px; }
.im-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.im-spec { font-size: 12px; background: var(--accent-ghost); color: var(--accent); padding: 4px 10px; border-radius: 4px; }
.im-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--gray-pale); gap: 12px; }
.im-price { font-size: 20px; font-weight: 500; color: var(--gray-dark); }
.im-buy { background: var(--accent); color: var(--accent-text); text-decoration: none; padding: 12px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; transition: background 0.15s; white-space: nowrap; }
.im-buy:hover { background: var(--accent-hover); }

/* SEO-textblock längst ner */
.seo-section { background: var(--white); border: 1px solid var(--gray-pale); border-radius: var(--radius-lg); padding: 32px; margin-top: 20px; }
.seo-section h2 { font-size: 18px; font-weight: 500; color: var(--blue-dark); margin-bottom: 12px; }
.seo-section h3 { font-size: 15px; font-weight: 500; color: var(--gray-dark); margin: 20px 0 6px; }
.seo-section p { font-size: 14px; color: var(--gray-mid); line-height: 1.75; margin-bottom: 10px; }
.seo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 20px; }
.seo-card { background: var(--gray-ghost); border-radius: var(--radius-md); padding: 16px; }
.seo-card h4 { font-size: 13px; font-weight: 500; color: var(--blue-dark); margin-bottom: 6px; }
.seo-card p { font-size: 13px; color: var(--gray-mid); margin: 0; line-height: 1.5; }

/* Redaktionens val (alltid gult/amber — inte temastyrt, en fast "editor's pick"-signal) */
.editorial { margin-bottom: 36px; }
.editorial-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.editorial-title { font-size: 13px; font-weight: 700; color: var(--gray-dark); text-transform: uppercase; letter-spacing: 0.08em; }
.editorial-crown { font-size: 16px; }
.editorial-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ecard { background: var(--white); border: 1px solid var(--gray-pale); border-top: 3px solid var(--amber); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; transition: box-shadow 0.2s, transform 0.2s; display: flex; flex-direction: column; position: relative; box-shadow: 0 2px 8px rgba(232,184,75,0.12); }
.ecard:hover { box-shadow: 0 4px 16px rgba(232,184,75,0.22); transform: translateY(-2px); }
.ecard-img { width: 100%; height: 150px; display: flex; align-items: center; justify-content: center; position: relative; background: var(--amber-pale); overflow: hidden; }
.ecard-badge { position: absolute; top: 10px; left: 10px; font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 20px; letter-spacing: 0.03em; background: var(--amber); color: var(--gray-dark); }
.ecard-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.ecard-brand { font-size: 11px; color: var(--gray-light); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.ecard-name { font-size: 14px; font-weight: 500; color: var(--gray-dark); margin-bottom: 8px; line-height: 1.35; }
.ecard-desc { font-size: 12px; color: var(--gray-mid); line-height: 1.5; margin-bottom: 12px; }
.ecard-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--gray-pale); gap: 8px; }
.ecard-price { font-size: 18px; font-weight: 500; color: var(--gray-dark); line-height: 1; }
.ecard-price small { font-size: 12px; font-weight: 400; color: var(--gray-light); }
.ecard-btn { background: var(--amber); color: var(--gray-dark); border: none; padding: 7px 10px; border-radius: var(--radius-sm); font-size: 10px; font-weight: 600; font-family: 'Inter', 'Inter Fallback', sans-serif; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-block; transition: background 0.15s; }
.ecard-btn:hover { background: #D4A43A; }
@media (hover: hover) and (min-width: 769px) {
  .ecard-hover { display: flex; position: absolute; inset: 0; background: rgba(44,32,4,0.94); border-radius: inherit; padding: 18px; flex-direction: column; gap: 10px; opacity: 0; pointer-events: none; transition: opacity 0.18s ease; z-index: 10; }
  .ecard:hover .ecard-hover { opacity: 1; pointer-events: auto; }
  .ech-typ { font-size: 10px; font-weight: 600; color: var(--amber); text-transform: uppercase; letter-spacing: 0.08em; }
  .ech-namn { font-size: 15px; font-weight: 500; color: #ffffff; line-height: 1.3; }
  .ech-desc { font-size: 12px; color: rgba(255,255,255,0.75); line-height: 1.6; flex: 1; }
  .ech-specs { display: flex; flex-wrap: wrap; gap: 6px; }
  .ech-spec { font-size: 11px; background: rgba(232,184,75,0.2); color: var(--amber); padding: 3px 8px; border-radius: 4px; }
  .ech-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid rgba(232,184,75,0.2); gap: 8px; }
  .ech-price { font-size: 18px; font-weight: 500; color: #ffffff; }
  .ech-buy { background: var(--amber); color: var(--gray-dark); border: none; padding: 8px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; font-family: 'Inter', 'Inter Fallback', sans-serif; cursor: pointer; text-decoration: none; display: inline-block; transition: background 0.15s; white-space: nowrap; }
  .ech-buy:hover { background: #D4A43A; }
}

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 28px 0 8px; flex-wrap: wrap; }
.page-btn {
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid var(--gray-pale); border-radius: var(--radius-sm);
  background: var(--white); color: var(--gray-dark);
  font-size: 14px; font-family: 'Inter', 'Inter Fallback', sans-serif; cursor: pointer;
  transition: all 0.15s;
}
.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 500; }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-info { color: var(--gray-light); font-size: 14px; padding: 0 4px; }
.ecard-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

@media (max-width: 900px) {
  .editorial-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hero { padding: 48px 20px 56px; }
  .intro { padding: 20px; }
  .filter-section { padding: 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-img, .ecard-img { height: 130px; }
  .seo-section { padding: 20px; }
}
@media (max-width: 480px) {
  .editorial-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card-img, .ecard-img { height: 110px; }
  .card-body, .ecard-body { padding: 10px 12px 12px; }
  .card-name, .ecard-name { font-size: 13px; }
  .card-price, .ecard-price { font-size: 15px; }
  .buy-btn, .ecard-btn { padding: 7px 10px; font-size: 11px; }
  .ecard-desc { font-size: 11px; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-stats { gap: 16px; }
  .search-wrap button { padding: 0 14px; font-size: 13px; }
}

/* Brödsmula (används på undersidor per produkttyp, t.ex. /flaktar/golvflaktar/) */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-light); margin: 0 0 20px; flex-wrap: wrap; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--gray-pale); }

/* Vanliga frågor (FAQ) på undersidor per produkttyp */
.faq { margin: 8px 0 0; }
.faq-item { border-bottom: 1px solid var(--gray-pale); padding: 20px 0; }
.faq-item:first-child { border-top: 1px solid var(--gray-pale); }
.faq-q { font-size: 15px; font-weight: 500; color: var(--blue-dark); margin-bottom: 8px; }
.faq-a { font-size: 14px; color: var(--gray-mid); line-height: 1.7; }
