/* 50 Shades of Avocado — Mobile-First Netflix-Style Styles */

/* === Global — Inter font === */
body,
.wp-block-navigation,
.wp-block-heading,
.recipe-row__card-title,
.recipe-row-section__header h2,
.recipe-search__input,
.recipe-search__btn {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html,
  .recipe-row {
    scroll-behavior: auto;
  }
}

/* === Search Bar (homepage + search page) === */
.recipe-search {
  padding: 0.75rem 1rem 2rem;
  display: flex;
  justify-content: center;
}

.recipe-search__form {
  display: flex;
  gap: 0;
  width: 100%;
  max-width: 640px;
}

.recipe-search__input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  font-size: 1.05rem;
  border: 2px solid #ccc;
  border-right: none;
  border-radius: 50px 0 0 50px;
  background: #fff;
  color: #333;
  outline: none;
}

.recipe-search__input::placeholder {
  color: #999;
}

.recipe-search__input:focus {
  border-color: #5a6f3d;
}

.recipe-search__btn {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid #5a6f3d;
  border-radius: 0 50px 50px 0;
  background: #5a6f3d;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}

.recipe-search__btn:hover {
  background: #6d8a4a;
}

/* TT5 search block on search results page */
.wp-block-search {
  margin-bottom: 2rem !important;
}

/* === Dark Browsing Section (Netflix-style) === */
.home-sections {
  background: #FFF8F0 !important;
  padding-bottom: 2rem !important;
}

/* === Netflix-Style Recipe Row Section === */
.recipe-row-section {
  padding: 0 0 0 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
  .recipe-row-section {
    padding: 0 0 0 3.5rem;
  }
}

/* Section header: title left, "See All" right */
.recipe-row-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-right: 1rem;
}

@media (min-width: 1024px) {
  .recipe-row-section__header {
    padding-right: 3.5rem;
  }
}

.recipe-row-section__header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: #000;
}

@media (min-width: 1024px) {
  .recipe-row-section__header h2 {
    font-size: 1.35rem;
  }
}

.recipe-row-section__header .see-all {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #4A7C59;
  text-decoration: none;
  white-space: nowrap;
}

.recipe-row-section__header .see-all:hover {
  color: #3a6347;
  text-decoration: underline;
}

/* === Horizontal Scroll Row === */
.recipe-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  padding-right: 1rem;
  scrollbar-width: none;
}

.recipe-row::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1024px) {
  .recipe-row {
    gap: 10px;
    padding-right: 3.5rem;
  }
}

/* === Recipe Card === */
.recipe-row__card {
  flex: 0 0 200px;
  width: 200px;
  scroll-snap-align: start;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Card image */
.recipe-row__card img {
  width: 200px;
  height: 260px;
  object-fit: cover;
  display: block;
}

/* Card title — below the image */
.recipe-row__card-title {
  display: block;
  padding: 0.5rem 0.6rem;
  color: #000;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Hover effect (desktop) */
@media (min-width: 1024px) {
  .recipe-row__card {
    transition: transform 200ms ease, box-shadow 200ms ease;
  }
  .recipe-row__card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 2;
  }
}

/* Focus states for keyboard navigation */
.recipe-row__card:focus-visible {
  outline: 2px solid #4A7C59;
  outline-offset: 2px;
  z-index: 2;
}

/* === Recipe Grid (archive, search, recipes page) === */
.recipe-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .recipe-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .recipe-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.recipe-card {
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.recipe-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.recipe-card-content {
  padding: 1rem 1.25rem 1.25rem;
  flex: 1;
}

.recipe-card-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.recipe-card-meta {
  font-size: 0.85rem;
  color: #666;
  display: flex;
  gap: 1rem;
}

/* === Pagination === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 6px;
  font-size: 0.95rem;
  text-decoration: none;
  color: #3d3d3d;
  background: #fff;
  border: 1px solid #ddd;
  transition: background 0.15s, color 0.15s;
}

.pagination .page-numbers:hover {
  background: #f0e6d3;
  color: #3d3d3d;
}

.pagination .page-numbers.current {
  background: #5a6f3d;
  color: #fff;
  border-color: #5a6f3d;
  font-weight: 600;
}

.pagination .page-numbers.dots {
  border: none;
  background: none;
  pointer-events: none;
}

.pagination .prev,
.pagination .next {
  font-weight: 500;
}

/* === About Section === */
.about-section {
  margin-bottom: 0;
  background: #fff;
}

/* === Site Footer === */
.site-footer {
  margin-top: 0;
}

/* === WPRM recipe card overrides === */
.wprm-recipe-container {
  border: 1px solid var(--wp--preset--color--soft-sage, #D4E5D0);
  border-radius: 8px;
  margin: 2rem 0;
}

.wprm-recipe-name {
  font-family: 'Inter', var(--wp--preset--font-family--heading);
  color: var(--wp--preset--color--avocado-green, #4A7C59);
}

/* === Section headings (used on other pages) === */
.section-heading {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
}

.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--wp--preset--color--avocado-green, #4A7C59);
  margin: 0.75rem auto 0;
}

/* === Header logo === */
.header-logo {
  margin: 0;
}

.header-logo img {
  height: 40px;
  width: auto;
  display: block;
}

/* === CTA Button polish === */
.wp-block-button__link {
  cursor: pointer;
}
