/*
Theme Name: Local Deals Hub
Theme URI: https://example.com/local-deals-hub
Author: Codex
Author URI: https://example.com
Description: A modern WordPress theme for local offers, shop promotions, discounts, and deal discovery platforms.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: local-deals-hub
*/

:root {
  --ink: #17202a;
  --muted: #5a6573;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --line: #dfe5e8;
  --brand: #0f766e;
  --brand-dark: #0b4f4a;
  --accent: #f59e0b;
  --coral: #e45757;
  --blue: #2563eb;
  --mint: #d7f4ed;
  --shadow: 0 18px 45px rgba(23, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

.site-shell {
  min-height: 100vh;
  overflow: hidden;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 250, 247, 0.94);
  border-bottom: 1px solid rgba(223, 229, 232, 0.9);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.05rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--brand);
  border-radius: 8px;
  font-weight: 900;
}

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

.main-nav a {
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
}

.main-nav a:hover {
  color: var(--brand-dark);
}

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

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover,
.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--brand-dark);
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.24);
  transform: translateY(-1px);
}

.button.secondary {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.button.secondary:hover {
  background: var(--mint);
  box-shadow: none;
}

.hero {
  position: relative;
  min-height: 720px;
  display: grid;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(9, 36, 34, 0.9), rgba(9, 36, 34, 0.55) 52%, rgba(9, 36, 34, 0.16)),
    url("https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?auto=format&fit=crop&w=1800&q=80") center / cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(251, 250, 247, 0), var(--paper));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  padding: 72px 0 132px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: #fff7db;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--accent);
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 640px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.deal-search {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 10px;
  width: min(860px, 100%);
  margin-top: 32px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.deal-search input,
.deal-search select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.stats-strip {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: -74px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.stat {
  padding: 25px;
  background: #fff;
}

.stat strong {
  display: block;
  color: var(--brand-dark);
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.section {
  padding: 92px 0;
}

.section.alt {
  background: #fff;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--coral);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.section h2,
.entry-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-head p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.offer-card,
.shop-card,
.step,
.feature-card,
.entry-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(23, 32, 42, 0.06);
}

.offer-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #d8e7e2;
  overflow: hidden;
}

.offer-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.deal-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 7px 10px;
  color: #fff;
  background: var(--coral);
  border-radius: 6px;
  font-weight: 900;
  font-size: 0.82rem;
}

.offer-body {
  padding: 20px;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.offer-body h3,
.feature-card h3,
.step h3,
.shop-card h3,
.entry-card h2 {
  margin: 12px 0 8px;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.offer-body p,
.feature-card p,
.step p,
.shop-card p,
.entry-card p {
  margin: 0;
  color: var(--muted);
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 16px;
}

.price-row strong {
  color: var(--brand-dark);
  font-size: 1.3rem;
}

.price-row del {
  color: #8b96a3;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 54px;
  align-items: center;
}

.owner-visual {
  position: relative;
  min-height: 540px;
  background: url("https://images.unsplash.com/photo-1556742502-ec7c0e9f34b1?auto=format&fit=crop&w=1200&q=80") center / cover;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.owner-visual-panel {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: min(340px, calc(100% - 44px));
  padding: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
}

.owner-visual-panel strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  color: var(--brand-dark);
}

.owner-copy p {
  color: var(--muted);
  font-size: 1.05rem;
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}

.feature-card {
  padding: 22px;
}

.icon-box {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  font-weight: 900;
}

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

.step {
  padding: 26px;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  font-weight: 900;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.shop-card {
  padding: 22px;
}

.shop-card small {
  display: block;
  margin-top: 10px;
  color: var(--brand);
  font-weight: 900;
}

.cta-band {
  color: #fff;
  background: #16302f;
}

.cta-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
}

.cta-inner h2 {
  color: #fff;
}

.cta-inner p {
  max-width: 650px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.site-footer {
  padding: 36px 0;
  color: rgba(255, 255, 255, 0.75);
  background: #0c1918;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-links,
.footer-links ul {
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 700;
}

.page-main {
  padding: 78px 0 92px;
}

.content-area {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
}

.entry-content {
  margin-top: 28px;
  color: var(--muted);
  font-size: 1.06rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.entry-card {
  padding: 24px;
}

.entry-card .button {
  margin-top: 18px;
}

.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;
}

@media (max-width: 920px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 16px 0;
  }

  .main-nav {
    order: 3;
    width: 100%;
  }

  .main-nav ul {
    flex-wrap: wrap;
    gap: 14px 20px;
  }

  .hero {
    min-height: 660px;
  }

  .deal-search,
  .stats-strip,
  .offer-grid,
  .two-column,
  .steps,
  .shop-grid,
  .post-grid,
  .cta-inner {
    grid-template-columns: 1fr;
  }

  .stats-strip {
    margin-top: -42px;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 14px;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .owner-visual {
    min-height: 420px;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1120px);
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .button {
    width: 100%;
  }

  .hero-content {
    padding: 56px 0 112px;
  }

  .deal-search {
    padding: 8px;
  }

  .deal-search button {
    width: 100%;
  }

  .section {
    padding: 68px 0;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
