/* =========================================================================
   GadgetsSniper — Archive / Landing Pages CSS
   Used by: page-best-picks.php, page-comparisons.php, page-buying-guides.php,
            page-deals.php, page-categories.php
   Depends on tokens defined in front-page.css (--gs-bg, --gs-fg, --gs-green, --gs-cyan, etc.)
   ========================================================================= */

/* ---------- Mega-menu (header All Categories dropdown) ---------- */
.gs-nav__cats { position: relative; }
.gs-nav__cats-link { display: inline-flex; align-items: center; gap: 6px; }
.gs-nav__cats-caret {
  font-size: 11px; opacity: .7;
  transition: transform .2s ease;
}
.gs-nav__cats:hover .gs-nav__cats-caret,
.gs-nav__cats:focus-within .gs-nav__cats-caret { transform: rotate(180deg); }

.gs-mega {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 480px;
  max-width: 560px;
  padding: 18px;
  background: rgba(15, 20, 32, .98);
  border: 1px solid rgba(16, 245, 138, .15);
  border-radius: 14px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255,255,255,.02) inset;
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index: 100;
}
.gs-nav__cats:hover .gs-mega,
.gs-nav__cats:focus-within .gs-mega { opacity: 1; visibility: visible; transform: translateY(0); }

.gs-mega__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.gs-mega__item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--gs-fg, #E8ECF4);
  background: rgba(255,255,255,.02);
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.gs-mega__item:hover {
  background: rgba(16, 245, 138, .08);
  border-color: rgba(16, 245, 138, .3);
  transform: translateX(2px);
}
.gs-mega__name { font-weight: 600; font-size: 14px; }
.gs-mega__count {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 245, 138, .12);
  color: var(--gs-green, #10F58A);
}
.gs-mega__all {
  display: block;
  margin-top: 12px;
  padding: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  color: var(--gs-cyan, #00D4FF);
  border: 1px dashed rgba(0, 212, 255, .3);
  border-radius: 10px;
  transition: background .15s ease;
}
.gs-mega__all:hover { background: rgba(0, 212, 255, .08); }

/* ---------- Archive hero ---------- */
.gs-archive-page main { padding-top: 0; }
.gs-archive-hero {
  position: relative;
  padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(ellipse 800px 400px at 20% 0%, rgba(16, 245, 138, .12), transparent 60%),
    radial-gradient(ellipse 600px 350px at 85% 100%, rgba(0, 212, 255, .10), transparent 60%),
    var(--gs-bg, #0A0E1A);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  overflow: hidden;
}
.gs-archive-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, #000 30%, transparent 80%);
  pointer-events: none;
}
.gs-archive-hero__inner {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.gs-archive-hero__eyebrow {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gs-green, #10F58A);
  background: rgba(16, 245, 138, .08);
  border: 1px solid rgba(16, 245, 138, .25);
  border-radius: 999px;
}
.gs-archive-hero__eyebrow--hot {
  color: #FF6B3D;
  background: rgba(255, 107, 61, .08);
  border-color: rgba(255, 107, 61, .3);
  animation: gs-pulse-hot 2.4s ease-in-out infinite;
}
@keyframes gs-pulse-hot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 61, .35); }
  50%      { box-shadow: 0 0 0 8px rgba(255, 107, 61, 0); }
}
.gs-archive-hero__title {
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  color: var(--gs-fg, #E8ECF4);
}
.gs-archive-hero__title .accent-green { color: var(--gs-green, #10F58A); font-style: italic; }
.gs-archive-hero__title .accent-cyan  { color: var(--gs-cyan, #00D4FF);  font-style: italic; }
.gs-archive-hero__sub {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  color: rgba(232, 236, 244, .72);
  margin: 0;
}

/* ---------- Sub-category strip ---------- */
.gs-subcat-strip {
  padding: clamp(36px, 5vw, 56px) 0;
  background: rgba(255, 255, 255, .015);
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}
.gs-subcat-strip__title {
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 26px);
  margin: 0 0 22px;
  color: var(--gs-fg, #E8ECF4);
}
.gs-subcat-strip__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.gs-subcat-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px;
  text-decoration: none;
  background: rgba(15, 20, 32, .6);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.gs-subcat-card:hover {
  border-color: rgba(16, 245, 138, .35);
  background: rgba(16, 245, 138, .04);
  transform: translateY(-2px);
}
.gs-subcat-card__name {
  font-weight: 700;
  font-size: 15px;
  color: var(--gs-fg, #E8ECF4);
}
.gs-subcat-card__count {
  font-size: 12px;
  color: rgba(232, 236, 244, .55);
  font-variant-numeric: tabular-nums;
}
.gs-subcat-card--all {
  background: linear-gradient(135deg, rgba(16,245,138,.08), rgba(0,212,255,.08));
  border-color: rgba(0, 212, 255, .28);
}
.gs-subcat-card--all:hover { border-color: rgba(0, 212, 255, .55); }
.gs-subcat-card--all .gs-subcat-card__count { color: var(--gs-cyan, #00D4FF); font-weight: 600; }

/* ---------- Shop-by Duo (Buying Guides: Budget + Categories side-by-side) ---------- */
.gs-shop-duo {
  padding: clamp(40px, 6vw, 72px) 0;
  background:
    radial-gradient(ellipse 600px 300px at 50% 0%, rgba(16, 245, 138, .06), transparent 70%),
    rgba(255, 255, 255, .015);
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}
.gs-shop-duo__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
  max-width: 1100px;
  margin: 0 auto;
}
.gs-shop-col {
  padding: clamp(20px, 2.5vw, 28px);
  background: rgba(15, 20, 32, .55);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
}
.gs-shop-col__title {
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 2vw, 22px);
  margin: 0 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gs-fg, #E8ECF4);
}
.gs-shop-col__icon {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(16, 245, 138, .1);
  font-size: 16px;
}
.gs-shop-col__sub {
  font-size: 13px;
  color: rgba(232, 236, 244, .58);
  margin: 0 0 18px;
}
.gs-shop-col__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.gs-shop-duo__cta {
  margin-top: 28px;
  text-align: center;
}
.gs-shop-duo__all {
  display: inline-block;
  padding: 12px 26px;
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--gs-cyan, #00D4FF);
  text-decoration: none;
  background: linear-gradient(135deg, rgba(16,245,138,.08), rgba(0,212,255,.08));
  border: 1px solid rgba(0, 212, 255, .35);
  border-radius: 999px;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.gs-shop-duo__all:hover {
  border-color: rgba(0, 212, 255, .7);
  background: linear-gradient(135deg, rgba(16,245,138,.15), rgba(0,212,255,.15));
  transform: translateY(-1px);
}

@media (max-width: 820px) {
  .gs-shop-duo__grid { grid-template-columns: 1fr; }
}

/* ---------- Archive grid section ---------- */
.gs-archive-grid-section {
  padding: clamp(48px, 7vw, 88px) 0;
}
.gs-archive-grid-section__title {
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 30px);
  margin: 0 0 28px;
  color: var(--gs-fg, #E8ECF4);
}

/* ---------- Post grid ---------- */
.gs-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.gs-post-card {
  background: rgba(15, 20, 32, .65);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.gs-post-card:hover {
  border-color: rgba(16, 245, 138, .35);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px -10px rgba(0, 0, 0, .5);
}
.gs-post-card__link { display: block; text-decoration: none; color: inherit; }
.gs-post-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #131826, #0A0E1A);
  display: grid; place-items: center;
  overflow: hidden;
}
.gs-post-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.gs-post-card:hover .gs-post-card__media img { transform: scale(1.05); }
.gs-post-card__media-fallback {
  color: rgba(16, 245, 138, .35);
}
.gs-post-card__deal-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 10px;
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  color: #0A0E1A;
  background: var(--gs-green, #10F58A);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(16, 245, 138, .35);
}
.gs-post-card__body { padding: 18px 20px 20px; }
.gs-post-card__cat {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gs-cyan, #00D4FF);
  background: rgba(0, 212, 255, .08);
  border-radius: 999px;
}
.gs-post-card__title {
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.35;
  margin: 0 0 8px;
  color: var(--gs-fg, #E8ECF4);
}
.gs-post-card__excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(232, 236, 244, .65);
  margin: 0 0 12px;
}
.gs-post-card__price {
  display: flex; align-items: baseline; gap: 10px;
  margin: 6px 0 12px;
}
.gs-post-card__price-now {
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 800; font-size: 22px;
  color: var(--gs-green, #10F58A);
}
.gs-post-card__price-was {
  font-size: 14px;
  color: rgba(232, 236, 244, .4);
  text-decoration: line-through;
}
.gs-post-card__cta {
  display: inline-block;
  font-size: 13px; font-weight: 700;
  color: var(--gs-green, #10F58A);
  letter-spacing: .02em;
}

/* ---------- Pagination ---------- */
.gs-pagination {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-top: 48px;
}
.gs-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 14px;
  font-size: 14px; font-weight: 600;
  color: var(--gs-fg, #E8ECF4);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.gs-pagination .page-numbers:hover {
  background: rgba(16, 245, 138, .08);
  border-color: rgba(16, 245, 138, .3);
}
.gs-pagination .page-numbers.current {
  background: var(--gs-green, #10F58A);
  border-color: var(--gs-green, #10F58A);
  color: #0A0E1A;
}
.gs-pagination .page-numbers.dots {
  background: transparent; border-color: transparent; cursor: default;
}

/* ---------- Empty state ---------- */
.gs-empty-state {
  text-align: center;
  padding: clamp(40px, 6vw, 72px) 24px;
  background: rgba(255, 255, 255, .02);
  border: 1px dashed rgba(255, 255, 255, .12);
  border-radius: 16px;
}
.gs-empty-state p {
  font-size: 16px;
  color: rgba(232, 236, 244, .7);
  margin: 0 0 18px;
}

/* ---------- Categories page ---------- */
.gs-cat-section {
  padding: clamp(36px, 5vw, 64px) 0;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}
.gs-cat-section:last-child { border-bottom: none; }
.gs-cat-section__title {
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 28px);
  margin: 0 0 8px;
  color: var(--gs-fg, #E8ECF4);
}
.gs-cat-section__sub {
  font-size: 14px;
  color: rgba(232, 236, 244, .6);
  margin: 0 0 24px;
}
.gs-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.gs-cat-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.gs-cat-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 20px;
  text-decoration: none;
  background: rgba(15, 20, 32, .6);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.gs-cat-card:hover {
  border-color: rgba(16, 245, 138, .4);
  background: rgba(16, 245, 138, .04);
  transform: translateY(-2px);
}
.gs-cat-card__icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(0, 212, 255, .1);
  color: var(--gs-cyan, #00D4FF);
}
.gs-cat-card__name {
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin: 0;
  color: var(--gs-fg, #E8ECF4);
}
.gs-cat-card__desc {
  font-size: 13px; line-height: 1.5;
  color: rgba(232, 236, 244, .6);
  margin: 0;
}
.gs-cat-card__count {
  font-size: 12px; font-weight: 600;
  color: var(--gs-green, #10F58A);
  font-variant-numeric: tabular-nums;
  margin-top: auto;
}
.gs-cat-card--compact {
  flex-direction: row; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  gap: 10px;
}
.gs-cat-card--compact .gs-cat-card__name { font-size: 14px; }
.gs-cat-card--compact .gs-cat-card__count {
  margin: 0;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(16, 245, 138, .12);
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 720px) {
  .gs-mega { min-width: 280px; right: -12px; }
  .gs-mega__grid { grid-template-columns: 1fr; }
  .gs-subcat-strip__grid { grid-template-columns: repeat(2, 1fr); }
  .gs-post-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .gs-post-card,
  .gs-subcat-card,
  .gs-cat-card,
  .gs-mega,
  .gs-archive-hero__eyebrow--hot,
  .gs-post-card__media img { transition: none !important; animation: none !important; }
}
