/* =====================================================================
   The Kackling Hens — Main Stylesheet
   Brand: dark/amber, restrained "Hen House Tech" base with a 30% dose
   of playful chicken-brand personality (footer wink, logo mark, tagline).
   ===================================================================== */

:root {
  --bg: #0d0e10;
  --panel: #15171a;
  --panel-hi: #1a1d21;
  --amber: #f5a623;
  --amber-bright: #ffc35c;
  --line: #23262b;
  --text: #e7e7e5;
  --muted: #8b8f96;
  --green: #4ade80;
  --red: #e8472b;
  --mono: 'SF Mono', 'Consolas', 'Courier New', monospace;
  --sans: 'Helvetica Neue', Arial, sans-serif;
  --radius: 7px;
  --radius-lg: 12px;
  --max-width: 1140px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  font-size: 16px;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

/* Visible keyboard focus everywhere — never remove outline without replacing it. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------------------------------------------
   Top strip
   --------------------------------------------------------------------- */
.top-strip {
  background: #1a1305;
  color: var(--amber);
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  padding: 8px 16px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

/* ---------------------------------------------------------------------
   Header
   --------------------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(13, 14, 16, 0.92);
  backdrop-filter: blur(6px);
  z-index: 50;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.site-logo img {
  width: 30px;
  height: 30px;
}

.site-logo .sub {
  color: var(--muted);
  font-weight: 400;
  font-family: var(--mono);
  font-size: 12px;
}

.main-nav {
  display: flex;
  gap: 26px;
  font-size: 13.5px;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  opacity: 0.75;
  padding: 4px 0;
  transition: opacity .15s, color .15s;
}

.main-nav a:hover,
.main-nav a.active {
  opacity: 1;
  color: var(--amber);
}

.header-cta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}

.header-cta:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* Cart icon + count badge, sits between the nav and the Get a Quote CTA. */
.cart-icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  text-decoration: none;
  flex-shrink: 0;
  transition: border-color .15s;
}

.cart-icon-link:hover { border-color: var(--amber); }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--amber);
  color: #0d0e10;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  min-width: 16px;
  height: 16px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    padding-top: 14px;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 10px 4px; border-top: 1px solid var(--line); opacity: 1; }
  .site-header { flex-wrap: wrap; }
  .nav-toggle { display: inline-block; }
  .header-cta { display: none; }
}

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.hero {
  padding: 90px 24px 70px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero .tag {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--amber);
  letter-spacing: 0.5px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero .tag::before {
  content: "\25CF";
  color: var(--green);
  font-size: 10px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  margin: 0 0 22px;
  font-weight: 700;
  letter-spacing: -1px;
  max-width: 780px;
}

.hero h1 em { font-style: normal; color: var(--amber); }

.hero p.lede {
  font-size: 17px;
  color: var(--muted);
  max-width: 540px;
  margin: 0 0 32px;
  line-height: 1.6;
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: var(--radius);
  display: inline-block;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--sans);
}

.btn.primary { background: var(--amber); color: #0d0e10; }
.btn.primary:hover { background: var(--amber-bright); }

.btn.ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn.ghost:hover { border-color: var(--amber); color: var(--amber); }

.stats {
  display: flex;
  gap: 48px;
  margin-top: 52px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  max-width: 780px;
  flex-wrap: wrap;
}

.stats .stat b {
  font-family: var(--mono);
  font-size: 24px;
  display: block;
  color: var(--amber);
  font-weight: 600;
}

.stats .stat span { font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------------
   Category / service grid
   --------------------------------------------------------------------- */
.section { padding: 0 24px 90px; max-width: var(--max-width); margin: 0 auto; }

.section .eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin: 0 0 42px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card {
  background: var(--panel);
  padding: 28px 24px;
  transition: background .15s;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.card:hover { background: var(--panel-hi); }

.card .ic { font-size: 22px; margin-bottom: 14px; display: block; }

.card h3 { font-size: 16.5px; margin: 0 0 8px; font-weight: 600; }

.card p { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.55; }

/* ---------------------------------------------------------------------
   CTA strip
   --------------------------------------------------------------------- */
.cta-strip {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 50px 24px;
  text-align: center;
}

.cta-strip h3 { font-size: clamp(20px, 3vw, 24px); margin: 0 0 10px; }
.cta-strip p { color: var(--muted); margin: 0 0 24px; font-size: 14.5px; }

/* ---------------------------------------------------------------------
   Generic page header (used on category/about/contact/faq pages)
   --------------------------------------------------------------------- */
.page-head {
  padding: 60px 24px 40px;
  max-width: var(--max-width);
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 50px;
}

.page-head .eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--amber);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.page-head h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 14px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-head p { color: var(--muted); font-size: 15.5px; max-width: 640px; margin: 0; }

/* ---------------------------------------------------------------------
   Forms (quote requests, contact)
   --------------------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field.full { grid-column: 1 / -1; }

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.field .hint { font-size: 12px; color: var(--muted); }

.field input,
.field select,
.field textarea {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--sans);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
  border-color: var(--amber);
}

.field textarea { resize: vertical; min-height: 120px; }

.form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 720px;
}

.alert {
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
  margin-bottom: 24px;
}

.alert.success {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--green);
}

.alert.error {
  background: rgba(232, 71, 43, 0.1);
  border: 1px solid rgba(232, 71, 43, 0.3);
  color: #ff7a5c;
}

/* ---------------------------------------------------------------------
   Product cards (used across all catalog-type categories — 3D Models,
   Website Templates, and any added later)
   --------------------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s;
}

.product-card:hover { border-color: var(--amber); }

.product-card .thumb {
  aspect-ratio: 1;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--line);
}

.product-card .info { padding: 16px; }

.product-card h3 { font-size: 14.5px; margin: 0 0 8px; font-weight: 600; }

.product-card .price-row {
  display: flex;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.product-card .price-row b { color: var(--amber); }

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--line);
  color: var(--muted);
}

/* ---------------------------------------------------------------------
   Cart page
   --------------------------------------------------------------------- */
.cart-table { width: 100%; border-collapse: collapse; }

.cart-table th, .cart-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.cart-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.cart-row-thumb {
  width: 48px; height: 48px; border-radius: var(--radius);
  object-fit: cover; background: var(--bg);
}

.cart-qty-input {
  width: 60px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  padding: 6px 8px;
  font-size: 14px;
  font-family: var(--sans);
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  margin-top: 8px;
  font-size: 17px;
  font-weight: 700;
}

.cart-summary .amount { font-family: var(--mono); color: var(--amber); }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.site-footer {
  padding: 40px 24px;
  text-align: center;
  font-family: var(--mono);
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-footer .wink { color: #5c5448; }

.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.site-footer .footer-links a {
  text-decoration: none;
  color: var(--muted);
}

.site-footer .footer-links a:hover { color: var(--amber); }
