/*
Theme Name: EfoodBid Block Theme
Theme URI: https://efoodbid.com/
Author: ShinerOps
Author URI: https://shinerops.com/
Description: Editorial marketplace theme for EfoodBid affiliate food listings.
Version: 0.2.1
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: efoodbid
*/

:root {
  --efb-ink: #15110e;
  --efb-muted: #6e6259;
  --efb-paper: #fffaf1;
  --efb-panel: #ffffff;
  --efb-border: #ded3c4;
  --efb-accent: #c83f26;
  --efb-accent-dark: #8d2719;
  --efb-leaf: #315f4d;
  --efb-gold: #e8b84f;
  --efb-shadow: 0 18px 50px rgba(55, 39, 28, 0.14);
}

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

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

a {
  color: inherit;
}

.wp-site-blocks {
  min-height: 100vh;
}

.efb-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.efb-header {
  border-bottom: 1px solid var(--efb-border);
  background: rgba(255, 250, 241, 0.94);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.efb-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 20px;
}

.efb-brand {
  font-weight: 850;
  font-size: 1.28rem;
  text-decoration: none;
}

.efb-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--efb-muted);
  font-size: 0.95rem;
}

.efb-nav a {
  text-decoration: none;
}

.efb-nav a:hover,
.efb-nav a:focus-visible {
  color: var(--efb-accent-dark);
}

.efb-main {
  padding: 42px 0 64px;
}

.efb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 28px;
  align-items: stretch;
  padding: 34px 0 52px;
  min-width: 0;
}

.efb-hero__copy {
  min-height: 410px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 4px solid var(--efb-accent);
}

.efb-kicker {
  color: var(--efb-accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.efb-hero h1 {
  max-width: 850px;
  margin: 10px 0 18px;
  font-size: 4.85rem;
  line-height: 0.94;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.efb-hero p {
  max-width: 680px;
  color: var(--efb-muted);
  font-size: 1.12rem;
  line-height: 1.62;
}

.efb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.efb-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
  margin-top: 26px;
}

.efb-stats div {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--efb-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.efb-stats strong,
.efb-stats span {
  display: block;
}

.efb-stats strong {
  font-size: 1.8rem;
  line-height: 1;
}

.efb-stats span {
  margin-top: 6px;
  color: var(--efb-muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.efb-button,
.efb-button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--efb-accent);
  background: var(--efb-accent);
  color: #fff;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.efb-button--secondary,
.efb-button--secondary:visited {
  background: transparent;
  color: var(--efb-accent-dark);
}

.efb-featured {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  min-height: 410px;
  padding: 24px;
  border: 1px solid var(--efb-border);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(200, 63, 38, 0.12), rgba(49, 95, 77, 0.16)),
    var(--efb-panel);
  box-shadow: var(--efb-shadow);
}

.efb-text-link {
  color: var(--efb-accent-dark);
  font-weight: 850;
  text-decoration: none;
}

.efb-featured span {
  color: var(--efb-leaf);
  font-weight: 850;
}

.efb-featured h2 {
  margin: 12px 0;
  font-size: 2rem;
  line-height: 1.08;
}

.efb-featured h2 a {
  text-decoration: none;
}

.efb-section {
  padding: 34px 0;
}

.efb-section--tight {
  padding-top: 0;
}

.efb-section__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.efb-section__header > * {
  min-width: 0;
}

.efb-section__header h1,
.efb-section__header h2 {
  margin: 0;
  font-size: 2.65rem;
  line-height: 1;
  overflow-wrap: break-word;
}

.efb-section__header p {
  max-width: 560px;
  color: var(--efb-muted);
}

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

.efb-card {
  min-width: 0;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  background: var(--efb-panel);
  border: 1px solid var(--efb-border);
  border-radius: 8px;
  overflow: hidden;
}

.efb-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eadfd0;
}

.efb-card__image--placeholder {
  display: flex;
  align-items: end;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(21, 17, 14, 0.08), rgba(21, 17, 14, 0.42)),
    linear-gradient(135deg, #c83f26, #315f4d);
}

.efb-card__image--placeholder[data-source="amazon"] {
  background:
    linear-gradient(135deg, rgba(21, 17, 14, 0.05), rgba(21, 17, 14, 0.34)),
    linear-gradient(135deg, #e8b84f, #c83f26);
}

.efb-card__image--placeholder[data-source="ebay"] {
  background:
    linear-gradient(135deg, rgba(21, 17, 14, 0.08), rgba(21, 17, 14, 0.38)),
    linear-gradient(135deg, #315f4d, #347c93);
}

.efb-card__image--placeholder span {
  max-width: 12ch;
  color: #fff;
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.32);
}

.efb-card > div {
  padding: 18px;
}

.efb-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
}

.efb-card__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--efb-border);
  border-radius: 999px;
  color: var(--efb-muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.efb-card h3 {
  min-height: 3.2em;
  margin: 6px 0 10px;
  font-size: 1.18rem;
  line-height: 1.28;
}

.efb-card h3 a {
  text-decoration: none;
}

.efb-card p {
  color: var(--efb-muted);
  line-height: 1.5;
}

.efb-note {
  min-height: 4.4em;
  color: var(--efb-ink) !important;
  font-size: 0.92rem;
}

.efb-price {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  font-weight: 850;
  color: var(--efb-leaf);
}

.efb-price a {
  color: var(--efb-leaf);
}

.efb-price span {
  color: var(--efb-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.efb-detail {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 28px;
  align-items: start;
  padding: 34px 0;
}

.efb-detail__media .efb-card__image {
  border: 1px solid var(--efb-border);
  border-radius: 8px;
  box-shadow: var(--efb-shadow);
}

.efb-detail__body {
  min-width: 0;
  padding-top: 4px;
}

.efb-detail h1 {
  max-width: 720px;
  margin: 18px 0;
  font-size: 3.55rem;
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.efb-detail__summary {
  max-width: 660px;
  color: var(--efb-muted);
  font-size: 1.08rem;
  line-height: 1.62;
}

.efb-detail .efb-note {
  max-width: 620px;
  min-height: 0;
  padding-left: 16px;
  border-left: 4px solid var(--efb-accent);
}

.efb-detail__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 700px;
  margin: 24px 0;
}

.efb-detail__facts div {
  padding: 14px;
  border: 1px solid var(--efb-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.efb-detail__facts dt {
  color: var(--efb-muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.efb-detail__facts dd {
  margin: 6px 0 0;
  font-weight: 850;
}

.efb-affiliate-box {
  display: grid;
  gap: 14px;
  max-width: 700px;
  padding: 20px;
  border: 1px solid var(--efb-border);
  border-radius: 8px;
  background: #fff;
}

.efb-affiliate-box p {
  margin: 0;
  color: var(--efb-muted);
  line-height: 1.55;
}

.efb-affiliate-box .efb-button {
  width: fit-content;
}

.efb-interest-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 24px;
}

.efb-interest-hero div {
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--efb-border);
  border-radius: 8px;
  background: #fff;
}

.efb-interest-hero strong,
.efb-interest-hero span {
  display: block;
}

.efb-interest-hero strong {
  font-size: 2rem;
  line-height: 1;
}

.efb-interest-hero span {
  margin-top: 8px;
  color: var(--efb-muted);
  font-weight: 800;
}

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

.efb-interest-card {
  display: flex;
  min-width: 0;
  min-height: 236px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--efb-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 241, 0.88)),
    #fff;
}

.efb-interest-card span {
  color: var(--efb-leaf);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.efb-interest-card h2 {
  margin: 10px 0;
  font-size: 1.42rem;
  line-height: 1.08;
}

.efb-interest-card p {
  color: var(--efb-muted);
  line-height: 1.52;
  overflow-wrap: break-word;
}

.efb-listing-radar {
  display: grid;
  grid-template-columns: minmax(160px, 0.28fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 20px 0 14px;
  padding: 16px;
  border: 1px solid var(--efb-border);
  border-radius: 8px;
  background: #15110e;
  color: #fff;
}

.efb-listing-radar strong,
.efb-listing-radar span {
  display: block;
}

.efb-listing-radar strong {
  font-size: 2rem;
  line-height: 1;
}

.efb-listing-radar span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.efb-listing-radar p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
  overflow-wrap: break-word;
}

.efb-listing-radar .efb-text-link {
  color: #fff;
  white-space: nowrap;
}

.efb-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
  align-items: center;
  margin: 20px 0 34px;
  padding: 26px;
  border: 1px solid var(--efb-border);
  border-radius: 8px;
  background: #15110e;
  color: #fff;
}

.efb-band h2 {
  margin: 8px 0 0;
  font-size: 2.15rem;
  line-height: 1.02;
}

.efb-band p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.efb-signup-band {
  margin-top: 24px;
  padding: 28px;
  background: var(--efb-leaf);
  color: #fff;
  border-radius: 8px;
}

.efb-signup-band p {
  color: rgba(255, 255, 255, 0.82);
}

.efb-signup {
  display: grid;
  gap: 16px;
  max-width: 760px;
}

.efb-signup label,
.efb-filters label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.efb-signup input[type="email"],
.efb-filters input,
.efb-filters select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--efb-border);
  border-radius: 6px;
  font: inherit;
}

.efb-signup fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.efb-signup legend {
  margin-bottom: 10px;
  font-weight: 850;
}

.efb-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.efb-chip {
  display: inline-flex;
  align-items: center;
}

.efb-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
}

.efb-chip input {
  position: absolute;
  opacity: 0;
}

.efb-chip input:checked + span {
  background: var(--efb-gold);
  color: var(--efb-ink);
  border-color: var(--efb-gold);
}

.efb-form-note {
  margin: 0;
  font-size: 0.92rem;
}

.efb-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--efb-border);
  border-radius: 8px;
  background: var(--efb-panel);
}

.efb-filters button {
  min-height: 44px;
}

.efb-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 28px;
}

.efb-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--efb-border);
  border-radius: 8px;
  background: var(--efb-panel);
  color: var(--efb-ink);
  font-weight: 850;
  text-decoration: none;
}

.efb-pagination__gap {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--efb-muted);
  font-weight: 850;
}

.efb-pagination a.is-active {
  border-color: var(--efb-ink);
  background: var(--efb-ink);
  color: #fff;
}

.efb-empty {
  padding: 28px;
  border: 1px dashed var(--efb-border);
  border-radius: 8px;
  color: var(--efb-muted);
  background: rgba(255, 255, 255, 0.56);
}

.efb-footer {
  border-top: 1px solid var(--efb-border);
  padding: 28px 0;
  color: var(--efb-muted);
}

.efb-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

@media (max-width: 860px) {
  .efb-hero,
  .efb-detail,
  .efb-grid,
  .efb-interest-grid,
  .efb-interest-hero,
  .efb-listing-radar,
  .efb-filters,
  .efb-band {
    grid-template-columns: 1fr;
  }

  .efb-hero__copy,
  .efb-featured {
    min-height: auto;
  }

  .efb-header__inner,
  .efb-section__header,
  .efb-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .efb-hero h1 {
    font-size: 3.35rem;
  }

  .efb-section__header h2 {
    font-size: 2.2rem;
  }

  .efb-band h2 {
    font-size: 1.7rem;
  }

  .efb-detail h1 {
    font-size: 2.55rem;
  }

  .efb-detail__facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .efb-shell {
    padding: 0 14px;
  }

  .efb-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    font-size: 0.9rem;
  }

  .efb-hero h1 {
    max-width: 360px;
    font-size: 1.95rem;
    line-height: 1.02;
  }

  .efb-hero p {
    max-width: 360px;
    font-size: 1rem;
  }

  .efb-hero .efb-kicker {
    max-width: 360px;
  }

  .efb-section__header h2 {
    font-size: 1.9rem;
  }

  .efb-section__header h1 {
    max-width: 360px;
    font-size: 2rem;
    line-height: 1.05;
  }

  .efb-section__header p,
  .efb-interest-card,
  .efb-listing-radar {
    max-width: 360px;
  }

  .efb-listing-radar .efb-text-link {
    white-space: normal;
  }

  .efb-detail h1 {
    max-width: 360px;
    font-size: 2rem;
  }

  .efb-detail__summary,
  .efb-detail .efb-note,
  .efb-affiliate-box {
    max-width: 360px;
  }

  .efb-signup-band {
    padding: 20px;
  }

  .efb-stats {
    grid-template-columns: 1fr;
  }
}
