/*
Theme Name: GimeNow
Theme URI: https://gimenow.example
Author: GimeNow
Author URI: https://gimenow.example
Description: A fast, responsive deal-finder WordPress theme with voting, submissions, favorites, affiliate click tracking, and SEO markup.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.6
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gimenow
Tags: custom-post-types, deals, responsive, seo, affiliate, community
*/

:root {
  --gn-primary: #0f172a;
  --gn-secondary: #2563eb;
  --gn-accent: #06b6d4;
  --gn-bg: #f8fafc;
  --gn-surface: #ffffff;
  --gn-muted: #64748b;
  --gn-border: #e2e8f0;
  --gn-hot: #ef4444;
  --gn-cold: #0284c7;
  --gn-success: #16a34a;
  --gn-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --gn-radius: 8px;
  --gn-max: 1180px;
  --gn-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--gn-bg);
  color: var(--gn-primary);
  font-family: var(--gn-font);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--gn-secondary);
  text-decoration: none;
}

a:hover,
a:focus {
  color: #1d4ed8;
}

button,
input,
select,
textarea {
  font: inherit;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gn-wrap {
  width: min(100% - 32px, var(--gn-max));
  margin-inline: auto;
}

.gn-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--gn-border);
  backdrop-filter: blur(16px);
}

.gn-header-inner {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.gn-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gn-primary);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.gn-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--gn-secondary), var(--gn-accent));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.gn-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.gn-nav ul {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.gn-nav a {
  color: #334155;
  font-weight: 700;
  font-size: 0.94rem;
}

.gn-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gn-mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--gn-border);
  border-radius: var(--gn-radius);
  background: var(--gn-surface);
  color: var(--gn-primary);
}

.gn-btn,
.button,
input[type="submit"] {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--gn-radius);
  background: var(--gn-secondary);
  color: #fff;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.gn-btn:hover,
.gn-btn:focus,
.button:hover,
input[type="submit"]:hover {
  color: #fff;
  background: #1d4ed8;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

.gn-btn--ghost {
  border-color: var(--gn-border);
  background: #fff;
  color: var(--gn-primary);
}

.gn-btn--ghost:hover,
.gn-btn--ghost:focus {
  background: #f1f5f9;
  color: var(--gn-primary);
  box-shadow: none;
}

.gn-btn--accent {
  background: var(--gn-accent);
}

.gn-btn--accent:hover,
.gn-btn--accent:focus {
  background: #0891b2;
}

.gn-main {
  min-height: 70vh;
}

.gn-hero {
  position: relative;
  overflow: hidden;
  padding: 68px 0 40px;
  background:
    radial-gradient(circle at 20% 5%, rgba(6, 182, 212, 0.18), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #eff6ff 56%, #ecfeff 100%);
  border-bottom: 1px solid var(--gn-border);
}

.gn-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 42px;
  align-items: center;
}

.gn-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.gn-hero h1,
.gn-page-title {
  margin: 16px 0 12px;
  font-size: clamp(2.45rem, 5vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.gn-hero p {
  max-width: 670px;
  margin: 0 0 24px;
  color: #475569;
  font-size: 1.18rem;
}

.gn-search-panel {
  padding: 8px;
  border: 1px solid var(--gn-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--gn-shadow);
}

.gn-search-form {
  display: grid;
  grid-template-columns: 1fr 180px 150px;
  gap: 8px;
}

.gn-search-form input,
.gn-search-form select,
.gn-field input,
.gn-field select,
.gn-field textarea,
#commentform input,
#commentform textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--gn-border);
  border-radius: var(--gn-radius);
  background: #fff;
  color: var(--gn-primary);
}

.gn-search-form button {
  min-height: 46px;
}

.gn-hero-card {
  display: grid;
  gap: 14px;
}

.gn-stat-card,
.gn-card,
.gn-sidebar-card,
.gn-form-card,
.gn-comment-box {
  border: 1px solid var(--gn-border);
  border-radius: var(--gn-radius);
  background: var(--gn-surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.055);
}

.gn-stat-card {
  padding: 18px;
}

.gn-stat-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.gn-section {
  padding: 42px 0;
}

.gn-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.gn-section-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2rem);
}

.gn-section-head p {
  margin: 5px 0 0;
  color: var(--gn-muted);
}

.gn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gn-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gn-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  padding: 34px 0;
}

.gn-card {
  overflow: hidden;
}

.gn-deal-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
}

.gn-deal-image {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #e2e8f0;
  overflow: hidden;
}

.gn-deal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gn-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 0.78rem;
  font-weight: 900;
}

.gn-deal-image .gn-badge {
  position: absolute;
  left: 12px;
  top: 12px;
}

.gn-card-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.gn-deal-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
}

.gn-deal-title a {
  color: var(--gn-primary);
}

.gn-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--gn-muted);
  font-size: 0.88rem;
}

.gn-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.gn-current-price {
  color: var(--gn-primary);
  font-weight: 950;
  font-size: 1.5rem;
}

.gn-original-price {
  color: #94a3b8;
  text-decoration: line-through;
}

.gn-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gn-vote-box {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--gn-border);
  border-radius: var(--gn-radius);
  background: #fff;
}

.gn-vote-btn,
.gn-save-btn {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--gn-muted);
  cursor: pointer;
}

.gn-vote-btn:hover,
.gn-vote-btn.is-active[data-vote="hot"] {
  color: var(--gn-hot);
}

.gn-vote-btn.is-active[data-vote="cold"] {
  color: var(--gn-cold);
}

.gn-score {
  min-width: 52px;
  padding: 0 9px;
  color: var(--gn-primary);
  font-weight: 950;
  text-align: center;
}

.gn-save-btn.is-saved {
  color: #f59e0b;
}

.gn-category-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.gn-category-tile {
  display: grid;
  min-height: 112px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--gn-border);
  border-radius: var(--gn-radius);
  background: #fff;
  color: var(--gn-primary);
  font-weight: 900;
  text-align: center;
}

.gn-category-tile span {
  color: var(--gn-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.gn-newsletter {
  padding: 30px;
  border-radius: var(--gn-radius);
  background: var(--gn-primary);
  color: #fff;
}

.gn-newsletter h2,
.gn-newsletter p {
  margin-top: 0;
}

.gn-newsletter p {
  color: #cbd5e1;
}

.gn-newsletter form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 620px;
}

.gn-newsletter input {
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--gn-radius);
}

.gn-page-header {
  padding: 36px 0 18px;
}

.gn-breadcrumbs {
  margin-bottom: 10px;
  color: var(--gn-muted);
  font-size: 0.88rem;
}

.gn-breadcrumbs a {
  color: #475569;
}

.gn-single-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 26px;
  align-items: start;
}

.gn-gallery {
  display: grid;
  gap: 12px;
}

.gn-gallery-main {
  overflow: hidden;
  border: 1px solid var(--gn-border);
  border-radius: var(--gn-radius);
  background: #fff;
}

.gn-gallery-main img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gn-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.gn-gallery-thumbs img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--gn-border);
  border-radius: var(--gn-radius);
  object-fit: cover;
  cursor: pointer;
}

.gn-single-panel {
  padding: 22px;
  border: 1px solid var(--gn-border);
  border-radius: var(--gn-radius);
  background: #fff;
  box-shadow: var(--gn-shadow);
}

.gn-single-panel h1 {
  margin: 8px 0 12px;
  font-size: clamp(1.9rem, 3vw, 3.2rem);
  line-height: 1.05;
}

.gn-saving {
  color: var(--gn-success);
  font-weight: 900;
}

.gn-affiliate-btn {
  width: 100%;
  min-height: 54px;
  margin-top: 18px;
  font-size: 1rem;
}

.gn-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--gn-border);
}

.gn-tab {
  padding: 12px 10px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--gn-muted);
  font-weight: 900;
  cursor: pointer;
}

.gn-tab.is-active {
  border-color: var(--gn-secondary);
  color: var(--gn-primary);
}

.gn-tab-panel {
  display: none;
  padding-top: 18px;
}

.gn-tab-panel.is-active {
  display: block;
}

.gn-form-card {
  max-width: 760px;
  padding: 22px;
}

.gn-field {
  margin-bottom: 16px;
}

.gn-field label {
  display: block;
  margin-bottom: 7px;
  font-weight: 900;
}

.gn-field small {
  display: block;
  margin-top: 6px;
  color: var(--gn-muted);
}

.gn-alert {
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: var(--gn-radius);
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 800;
}

.gn-alert--success {
  background: #dcfce7;
  color: #166534;
}

.gn-alert--error {
  background: #fee2e2;
  color: #991b1b;
}

.gn-sidebar {
  display: grid;
  gap: 18px;
}

.gn-sidebar-card {
  padding: 18px;
}

.gn-sidebar-card h3 {
  margin: 0 0 12px;
}

.gn-footer {
  margin-top: 40px;
  padding: 42px 0 28px;
  background: var(--gn-primary);
  color: #cbd5e1;
}

.gn-footer a {
  color: #e0f2fe;
}

.gn-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 24px;
}

.gn-footer h3,
.gn-footer h4 {
  margin-top: 0;
  color: #fff;
}

.gn-footer ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.gn-footer li + li {
  margin-top: 8px;
}

.gn-footer-bottom {
  padding-top: 24px;
  margin-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.9rem;
}

.comment-list {
  padding: 0;
  list-style: none;
}

.comment-body {
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--gn-border);
  border-radius: var(--gn-radius);
  background: #fff;
}

.comment-meta {
  color: var(--gn-muted);
  font-size: 0.88rem;
}

.children {
  margin-left: 24px;
}

@media (max-width: 980px) {
  .gn-hero-grid,
  .gn-layout,
  .gn-single-hero,
  .gn-footer-grid {
    grid-template-columns: 1fr;
  }

  .gn-grid,
  .gn-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gn-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .gn-header-inner {
    min-height: 64px;
  }

  .gn-mobile-toggle {
    display: grid;
  }

  .gn-nav {
    position: fixed;
    inset: 64px 0 auto 0;
    display: none;
    padding: 18px;
    border-bottom: 1px solid var(--gn-border);
    background: #fff;
  }

  .gn-nav.is-open {
    display: block;
  }

  .gn-nav ul,
  .gn-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .gn-header-actions {
    margin-top: 14px;
  }

  .gn-search-form,
  .gn-newsletter form {
    grid-template-columns: 1fr;
  }

  .gn-grid,
  .gn-category-grid {
    grid-template-columns: 1fr;
  }

  .gn-section-head {
    align-items: start;
    flex-direction: column;
  }

  .gn-hero {
    padding-top: 42px;
  }
}
