/* Real Fresh Eggs */

:root {
  --cream: #f8f5f0;
  --cream-dark: #ebe5dc;
  --terracotta: #2d7a4a;
  --terracotta-light: #4a9d6a;
  --forest: #2d4a3e;
  --forest-light: #3d5f50;
  --brown: #4a3728;
  --brown-light: #6b5344;
  --gold: #3d8b5c;
  --gold-light: #6bb87a;
  --white: #fff;
  --shadow: rgba(45, 74, 62, 0.08);
  --shadow-strong: rgba(45, 74, 62, 0.15);
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--brown);
  background: var(--cream);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }

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

a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--cream);
  border-bottom: 1px solid var(--cream-dark);
}

.site-header .logo {
  justify-self: start;
}

.site-header .nav {
  justify-self: center;
}

.site-header .cart-btn {
  justify-self: end;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--forest);
  background: none;
}

.logo-chicken-img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  flex-shrink: 0;
  vertical-align: middle;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: none !important;
}

.logo:focus,
.logo:focus-visible {
  outline: none;
}

.logo img {
  border: none !important;
  outline: none !important;
  background: none !important;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: var(--brown);
  font-weight: 500;
}

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

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--cream-dark);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  font-size: 1.1rem;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--white);
  background: var(--terracotta);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-count:empty,
.cart-count[data-count="0"] {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
}

.hero-bg::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 24px;
  background: linear-gradient(to bottom, var(--terracotta) 0%, transparent 100%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  background: linear-gradient(to top, var(--terracotta) 0%, transparent 100%);
}

.hero-content {
  position: relative;
  max-width: 36rem;
  text-align: center;
}

.hero-tagline {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 0.5rem;
}

.hero h1 {
  color: var(--forest);
  margin: 0 0 1rem;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--brown-light);
  margin: 0 auto 1.75rem;
  max-width: 28rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: none;
}

.btn:hover {
  transform: translateY(-1px);
}

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

.btn-primary:hover {
  background: var(--forest);
  box-shadow: 0 4px 14px var(--shadow-strong);
}

.btn-add {
  background: var(--white);
  color: var(--forest);
  border: 2px solid var(--forest);
}

.btn-add:hover {
  background: var(--forest);
  color: var(--white);
}

/* Sections */
section {
  padding: 4rem 1.5rem;
  max-width: 72rem;
  margin: 0 auto;
}

section + section {
  margin-top: 0.5rem;
}

.section-title {
  text-align: center;
  color: var(--forest);
  margin: 0 0 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--brown-light);
  margin: 0 0 2.5rem;
}

/* Products */
.products {
  background: var(--white);
  border-radius: 16px;
  margin: 2rem auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-shadow: 0 4px 24px var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 280px));
  gap: 1.5rem;
  justify-content: center;
  width: 100%;
  max-width: 36rem;
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
    max-width: 280px;
  }
}

.product-card {
  position: relative;
  padding: 1.75rem;
  background: var(--cream);
  border-radius: 12px;
  border: 1px solid var(--cream-dark);
  transition: box-shadow 0.2s, transform 0.2s;
}

.product-card:hover {
  box-shadow: 0 8px 24px var(--shadow);
  transform: translateY(-2px);
}

.product-card.featured {
  border-color: var(--gold);
  background: linear-gradient(180deg, #fefcf5 0%, var(--cream) 100%);
}

.badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--forest);
  background: var(--gold-light);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.product-image {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.product-card h3 {
  color: var(--forest);
  margin: 0 0 0.5rem;
}

.product-desc {
  font-size: 0.9rem;
  color: var(--brown-light);
  margin: 0 0 1rem;
  min-height: 2.8em;
}

.product-price {
  font-weight: 600;
  color: var(--terracotta);
  margin: 0 0 1rem;
}

.product-card .btn-add {
  width: 100%;
}

/* About */
.about {
  background: linear-gradient(180deg, var(--cream-dark) 0%, var(--cream) 100%);
}

.about-inner {
  display: grid;
  gap: 2rem;
}

@media (min-width: 640px) {
  .about-inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.about-text p {
  margin: 0 0 1rem;
  color: var(--brown-light);
}

.about-visual {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.about-card {
  flex: 1;
  min-width: 140px;
  padding: 1.25rem;
  background: var(--white);
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--cream-dark);
}

.about-card .stat {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--terracotta);
  margin-bottom: 0.25rem;
}

.about-card span:last-child {
  font-size: 0.9rem;
  color: var(--brown-light);
}

/* Order form */
.order {
  background: var(--white);
  border-radius: 16px;
  margin: 2rem auto;
  max-width: 32rem;
  box-shadow: 0 4px 24px var(--shadow);
  border: 1px solid var(--cream-dark);
}

.order-inner {
  width: 100%;
}

.order .section-title,
.order .section-subtitle {
  text-align: center;
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-row label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--forest);
}

.form-row input,
.form-row textarea {
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--cream-dark);
  border-radius: 8px;
  background: var(--cream);
  color: var(--brown);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(45, 122, 74, 0.2);
}

.form-row textarea {
  resize: vertical;
  min-height: 100px;
}

.order-note {
  font-size: 0.9rem;
  color: var(--brown-light);
  margin: 0;
}

/* Footer */
.site-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--forest);
  color: var(--cream);
}

.footer-inner a {
  color: var(--gold-light);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.site-footer p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}

/* Cart drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 360px;
  height: 100vh;
  background: var(--white);
  box-shadow: -4px 0 24px var(--shadow-strong);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-drawer[aria-hidden="false"] {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--cream-dark);
}

.cart-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--forest);
}

.cart-close {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: none;
  font-size: 1.5rem;
  color: var(--brown);
  cursor: pointer;
  line-height: 1;
}

.cart-close:hover {
  color: var(--terracotta);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.cart-empty {
  color: var(--brown-light);
  font-size: 0.95rem;
  margin: 0;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--cream-dark);
  font-size: 0.95rem;
}

.cart-item-name {
  font-weight: 500;
  color: var(--forest);
}

.cart-item-qty {
  color: var(--brown-light);
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--terracotta);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.25rem;
}

.cart-item-remove:hover {
  text-decoration: underline;
}

.cart-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--cream-dark);
}

.cart-total {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: var(--forest);
}

.cart-checkout {
  display: block;
  text-align: center;
  text-decoration: none;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 74, 62, 0.3);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.cart-overlay[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}
