/* =============================================================================
   GATDeals Theme — assets/css/style.css
   Tactical dark-header aesthetic. Card-first layout. Bootstrap 5 base.
   Color palette:
     --gatd-dark:    #1a1f2e   (header, footer bg)
     --gatd-red:     #c0392b   (hot/save badges, CTA hover)
     --gatd-amber:   #e67e22   (savings %, featured accents)
     --gatd-green:   #27ae60   (in-stock, savings badge)
     --gatd-blue:    #2980b9   (featured card border, links)
     --gatd-light:   #f5f6f8   (page bg)
     --gatd-card:    #ffffff   (card bg)
     --gatd-border:  #e2e5ea   (card borders)
     --gatd-muted:   #6c757d   (secondary text)
   ============================================================================= */

:root {
  --gatd-dark:   #1a1f2e;
  --gatd-red:    #c0392b;
  --gatd-amber:  #e67e22;
  --gatd-green:  #27ae60;
  --gatd-blue:   #2980b9;
  --gatd-light:  #f5f6f8;
  --gatd-card:   #ffffff;
  --gatd-border: #e2e5ea;
  --gatd-muted:  #6c757d;
  --gatd-radius: 10px;
  --gatd-accent:  #c0392b;   /* alias for red */
}

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

body {
  background: var(--gatd-light);
  color: #212529;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

a { color: var(--gatd-blue); text-decoration: none; }
a:hover { color: var(--gatd-red); }

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

.container-xl { max-width: 1280px; margin: 0 auto; padding: 0 16px; }


/* ── Header ───────────────────────────────────────────────────────────────── */
.gatd-header {
  background: var(--gatd-dark);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.gatd-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 0;
  flex-wrap: wrap;
}

/* Logo */
.gatd-logo {
  display: flex;
  align-items: baseline;
  gap: 4px;
  text-decoration: none;
  flex-shrink: 0;
}

.gatd-logo__gat {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.gatd-logo__deals {
  font-size: 26px;
  font-weight: 800;
  color: var(--gatd-amber);
  letter-spacing: -0.5px;
}

.gatd-logo__tag {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  font-weight: 400;
  margin-left: 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
  align-self: center;
}

/* Category nav */
.gatd-cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
}

.gatd-cat-nav__link {
  color: rgba(255,255,255,.75);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 4px;
  transition: background .15s, color .15s;
  letter-spacing: .02em;
}

.gatd-cat-nav__link:hover,
.gatd-cat-nav__link:focus {
  background: rgba(255,255,255,.12);
  color: #ffffff;
}

.gatd-cat-nav__link--all {
  background: var(--gatd-amber);
  color: #ffffff;
}

.gatd-cat-nav__link--all:hover {
  background: var(--gatd-red);
  color: #ffffff;
}

@media (max-width: 767px) {
  .gatd-header__inner { padding: 10px 0; }
  .gatd-cat-nav { display: none; }
  .gatd-logo__tag { display: none; }
}


/* ── Badges ───────────────────────────────────────────────────────────────── */
.gatd-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  line-height: 1.4;
}

.badge-firearms { background: #2c3e50; color: #ffffff; }
.badge-optics   { background: #1a5276; color: #ffffff; }
.badge-ammo     { background: #922b21; color: #ffffff; }
.badge-hunting  { background: #1e8449; color: #ffffff; }
.badge-outdoor  { background: #1a6b3a; color: #ffffff; }
.badge-medical  { background: #a93226; color: #ffffff; }
.badge-deals    { background: var(--gatd-dark); color: #ffffff; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.gatd-btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
  text-align: center;
  text-decoration: none;
}

.gatd-btn:active { transform: scale(.98); }

.gatd-btn--primary {
  background: var(--gatd-red);
  color: #ffffff;
}
.gatd-btn--primary:hover { background: #a93226; color: #ffffff; }

.gatd-btn--secondary {
  background: var(--gatd-dark);
  color: #ffffff;
}
.gatd-btn--secondary:hover { background: #2c3e50; color: #ffffff; }

/* ── Section titles ───────────────────────────────────────────────────────── */
.gatd-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gatd-dark);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gatd-border);
}

/* ── Main layout ──────────────────────────────────────────────────────────── */
.gatd-main {
  padding: 28px 0 48px;
  min-height: 60vh;
}

.gatd-empty {
  color: var(--gatd-muted);
  font-size: 15px;
  padding: 24px 0;
}


/* ── Hero ─────────────────────────────────────────────────────────────────── */
.gatd-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--gatd-card);
  border-radius: var(--gatd-radius);
  overflow: hidden;
  border: 1px solid var(--gatd-border);
  margin-bottom: 32px;
  min-height: 280px;
  max-height: 420px; /* FIX: cap hero so tall images don't dominate the page */
}

.gatd-hero__img-wrap {
  overflow: hidden;
  background: #edf0f4;
}

.gatd-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gatd-hero__content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.gatd-hero__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gatd-amber);
}

.gatd-hero__merchant {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

.gatd-hero__merchant a { color: var(--gatd-dark); }
.gatd-hero__merchant a:hover { color: var(--gatd-red); }

.gatd-hero__excerpt {
  color: #444;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 767px) {
  .gatd-hero { grid-template-columns: 1fr; max-height: none; }
  .gatd-hero__img-wrap { height: 200px; }
  .gatd-hero__content { padding: 20px; }
  .gatd-hero__merchant { font-size: 22px; }
}

/* ── Featured row ─────────────────────────────────────────────────────────── */
.gatd-featured-row {
  margin-bottom: 32px;
}


/* ── Deal card ────────────────────────────────────────────────────────────── */
.gatd-card {
  background: var(--gatd-card);
  border: 1px solid var(--gatd-border);
  border-radius: var(--gatd-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow .2s, transform .2s;
}

.gatd-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.10);
  transform: translateY(-2px);
}

/* Featured card — blue left border accent */
.gatd-card--featured {
  border-left: 3px solid var(--gatd-blue);
  position: relative;
}

.gatd-card__featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--gatd-blue);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  z-index: 2;
}

/* Card image */
.gatd-card__img-wrap {
  display: block;
  overflow: hidden;
  background: #edf0f4;
  aspect-ratio: 16/7;
}

.gatd-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.gatd-card:hover .gatd-card__img { transform: scale(1.03); }

/* Card body */
.gatd-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.gatd-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gatd-card__updated {
  font-size: 11px;
  color: var(--gatd-muted);
  margin-left: auto;
}

.gatd-card__merchant {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}

.gatd-card__merchant a { color: var(--gatd-dark); }
.gatd-card__merchant a:hover { color: var(--gatd-red); }

.gatd-card__excerpt {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card CTA */
.gatd-card__cta {
  display: block;
  text-align: center;
  background: var(--gatd-dark);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 6px;
  margin-top: auto;
  transition: background .15s;
}

.gatd-card__cta:hover { background: var(--gatd-red); color: #ffffff; }

.gatd-card__cta--featured {
  background: var(--gatd-blue);
}
.gatd-card__cta--featured:hover { background: #1a6b9a; color: #ffffff; }


/* ── Price trio ───────────────────────────────────────────────────────────── */
.gatd-prices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.gatd-price-item {
  background: #f8f9fb;
  border: 1px solid var(--gatd-border);
  border-radius: 6px;
  padding: 8px 12px;
}

.gatd-price-item__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--gatd-dark);
  margin: 0 0 5px;
  line-height: 1.4;
}

.gatd-price-item__name a {
  color: var(--gatd-dark);
}
.gatd-price-item__name a:hover { color: var(--gatd-red); }

.gatd-price-item__trio {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.gatd-price-item__sale {
  font-size: 20px;
  font-weight: 800;
  color: var(--gatd-dark);
  line-height: 1;
}

.gatd-price-item__was {
  font-size: 13px;
  color: var(--gatd-muted);
  text-decoration: line-through;
}

.gatd-price-item__save {
  font-size: 11px;
  font-weight: 700;
  background: var(--gatd-green);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.gatd-price-item__seller {
  font-size: 11px;
  color: var(--gatd-muted);
  margin: 4px 0 0;
}

/* On the hero / single page — bigger price display */
.gatd-single__prices .gatd-price-item__sale { font-size: 26px; }
.gatd-hero .gatd-price-item__sale { font-size: 24px; }

/* ── Single post ──────────────────────────────────────────────────────────── */
.gatd-single__hero-img-wrap {
  border-radius: var(--gatd-radius);
  overflow: hidden;
  margin-bottom: 24px;
  max-height: 380px;
}

.gatd-single__hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gatd-single__header { margin-bottom: 20px; }

.gatd-single__merchant {
  font-size: 32px;
  font-weight: 800;
  margin: 8px 0 4px;
  line-height: 1.2;
  color: var(--gatd-dark);
}

.gatd-single__updated {
  font-size: 12px;
  color: var(--gatd-muted);
  margin: 0;
}

.gatd-single__prices {
  background: var(--gatd-card);
  border: 1px solid var(--gatd-border);
  border-radius: var(--gatd-radius);
  padding: 20px;
  margin-bottom: 28px;
}

.gatd-single__prices-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gatd-dark);
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Post content typography */
.gatd-single__content { line-height: 1.75; }
.gatd-single__content h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--gatd-dark);
  border-bottom: 1px solid var(--gatd-border);
  padding-bottom: 6px;
}
.gatd-single__content p  { margin: 0 0 14px; }
.gatd-single__content ul { padding-left: 20px; margin-bottom: 14px; }
.gatd-single__content li { margin-bottom: 6px; }
.gatd-single__content a  { color: var(--gatd-blue); font-weight: 500; }
.gatd-single__content a:hover { color: var(--gatd-red); }
.gatd-single__content strong { font-weight: 700; }


/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.gatd-sidebar { display: flex; flex-direction: column; gap: 20px; }

.gatd-sidebar__widget {
  background: var(--gatd-card);
  border: 1px solid var(--gatd-border);
  border-radius: var(--gatd-radius);
  padding: 18px 20px;
}

.gatd-sidebar__widget--email {
  border-left: 3px solid var(--gatd-amber);
}

.gatd-sidebar__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gatd-dark);
  margin: 0 0 12px;
}

.gatd-sidebar__body {
  font-size: 13px;
  color: #555;
  margin: 0 0 14px;
  line-height: 1.5;
}

.gatd-sidebar__cats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gatd-sidebar__cats li a {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  padding: 6px 8px;
  border-radius: 5px;
  transition: background .12s, color .12s;
}

.gatd-sidebar__cats li a:hover {
  background: #f0f2f5;
  color: var(--gatd-red);
}

/* ── Archive header ───────────────────────────────────────────────────────── */
.gatd-archive-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gatd-border);
}

.gatd-archive-header__title {
  font-size: 26px;
  font-weight: 800;
  color: var(--gatd-dark);
  margin: 0 0 6px;
}

.gatd-archive-header__desc {
  color: var(--gatd-muted);
  font-size: 14px;
  margin: 0;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
.gatd-pagination .nav-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.gatd-pagination .page-numbers {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--gatd-border);
  color: #444;
  background: var(--gatd-card);
  transition: background .12s;
}

.gatd-pagination .page-numbers.current,
.gatd-pagination .page-numbers:hover {
  background: var(--gatd-dark);
  color: #ffffff;
  border-color: var(--gatd-dark);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.gatd-footer {
  background: var(--gatd-dark);
  color: rgba(255,255,255,.6);
  padding: 40px 0 28px;
  margin-top: 48px;
}

.gatd-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gatd-footer__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.gatd-footer__cats a {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  transition: color .15s;
}

.gatd-footer__cats a:hover { color: #ffffff; }

.gatd-footer__disclosure {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  max-width: 720px;
  margin: 0;
  line-height: 1.6;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 18px;
}

.gatd-footer__copy {
  font-size: 12px;
  color: rgba(255,255,255,.3);
  margin: 0;
}

.gatd-footer__copy a { color: rgba(255,255,255,.4); }
.gatd-footer__copy a:hover { color: #ffffff; }

/* ── Stats widget ─────────────────────────────────────────────────────────── */
.gatd-sidebar__widget--stats {
  border-left: 3px solid #27ae60;
  border-radius: 0 var(--gatd-radius) var(--gatd-radius) 0;
}

.gatd-stats { display: flex; flex-direction: column; gap: 8px; }

.gatd-stats__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.gatd-stats__label { color: #666; }

.gatd-stats__value {
  font-weight: 700;
  color: var(--gatd-dark);
}

.gatd-stats__value--fresh { color: #27ae60; }

/* ── Large CTA block — bottom of every post ───────────────────────────────── */
.gatd-cta-block {
  margin: 32px 0 16px;
  text-align: center;
}

.gatd-cta-block__link {
  display: inline-block;
  background: var(--gatd-accent);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 16px 40px;
  border-radius: var(--gatd-radius);
  text-decoration: none;
  letter-spacing: .02em;
  transition: background .15s;
}

.gatd-cta-block__link:hover,
.gatd-cta-block__link:focus {
  background: #b33a1a;
  color: #fff;
  text-decoration: none;
}

/* ── v1.6.0: Sticky sidebar, group headers ─────────────────────────────── */

/* Sidebar column: don't stretch to full row height — needed for sticky to work */
.gatd-sidebar {
  align-self: flex-start;
}

/* Sticky sidebar inner wrapper */
.gatd-sidebar__inner {
  position: sticky;
  top: 20px;
}

/* Section group headers in the deals grid */
.gatd-group-header {
  width: 100%;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}
.gatd-group-header:first-child {
  margin-top: 0;
}
.gatd-group-header .gatd-section-title {
  display: inline-block;
  margin-bottom: 0;
}
.gatd-group-header .gatd-section-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid var(--gatd-accent);
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.gatd-group-header .gatd-section-title a:hover {
  color: var(--gatd-accent);
}

/* Featured Deals row header link */
.gatd-featured-row .gatd-section-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid var(--gatd-accent);
  padding-bottom: 2px;
  transition: color .15s;
}
.gatd-featured-row .gatd-section-title a:hover {
  color: var(--gatd-accent);
}
