/*
Theme Name: FamilyAndFur
Theme URI: https://familyandfur.example
Author: Zahid
Description: Custom affiliate theme for FamilyAndFur – curated finds for families and their furry friends.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: familyandfur
*/

:root {
  --bg: #f7f7f7;
  --white: #ffffff;
  --dark: #0f172a;
  --muted: #6b7280;
  --primary: #0ea5e9;
  --accent: #22c55e;
  --accent-orange: #f97316;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius-card: 14px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--dark);
}

a {
  color: inherit;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  width: 100%;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.branding {
  display: flex;
  flex-direction: column;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

.site-title a {
  text-decoration: none;
  color: var(--dark);
}

.site-tagline {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.nav a {
  text-decoration: none;
  color: #374151;
  font-weight: 500;
}

.nav a:hover {
  color: var(--primary);
}

/* Layout */
.site-main {
  min-height: 100vh;
}

.section {
  padding: 2.5rem 1rem;
  width: 100%;
}

.section-alt {
  background: #f1f5f9;
}

.section-header {
  max-width: 1120px;
  margin: 0 auto 1.5rem;
  padding: 0 1rem;
}

.section-header h2 {
  margin: 0 0 0.4rem;
  font-size: 1.4rem;
}

.section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  padding: 3rem 1rem 3.5rem;
  width: 100%;
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2rem;
  align-items: center;
}

.hero-title {
  font-size: 2.4rem;
  margin: 0 0 0.5rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  max-width: 32rem;
  margin: 0;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--dark);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--dark);
  border-color: rgba(15, 23, 42, 0.08);
}

.hero-highlight {
  background: rgba(15, 23, 42, 0.14);
  padding: 1.5rem;
  border-radius: 1.25rem;
}

.badge {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.16);
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Grids & Cards (compact) */
.grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem 0.5rem;
  display: grid;
  gap: 1rem;
  justify-content: center;
}

/* HOT DEALS – 4 per row */
.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Other sections – 3 per row */
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Tablet */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* Mobile */
@media (max-width: 600px) {
  .grid-4,
  .grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

.card {
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card-img-wrapper {
  position: relative;
  overflow: hidden;
}

.card-img-wrapper img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.card-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--accent-orange);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.card-body {
  padding: 0.75rem 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25rem;
}

.card-text {
  margin: 0;
  font-size: 0.82rem;
  color: #4b5563;
}

.card-meta {
  margin: 0;
  font-size: 0.78rem;
  color: #9ca3af;
}

/* Pricing for Deals */
.deal-pricing {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0.25rem 0 0.4rem;
}

.deal-regular {
  font-size: 0.82rem;
  color: #9ca3af;
  text-decoration: line-through;
}

.deal-current {
  font-size: 0.92rem;
  font-weight: 700;
  color: #16a34a;
}

.card-btn {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  align-self: flex-start;
  padding: 0.45rem 1.1rem;
}

/* Two-column info section */
.two-col {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
}

.two-col h2 {
  margin-top: 0;
}

.list-plain {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  color: #4b5563;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  background: #020617;
  color: #e5e7eb;
  padding-top: 2rem;
  margin-top: 2rem;
  width: 100%;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #e5e7eb;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}
