/* =============================
   TFCR FINAL CLEAN CSS
   ============================= */

:root {
  --tfcr-bg: #fdfaf8;
  --tfcr-paper: #ffffff;
  --tfcr-soft: #faf4f2;
  --tfcr-blush: #ead8d3;
  --tfcr-blush-2: #f6ece9;
  --tfcr-rose: #b9828f;
  --tfcr-rose-dark: #8f5d69;
  --tfcr-ink: #302a28;
  --tfcr-text: #352e2c;
  --tfcr-muted: #8a7b76;
  --tfcr-line: rgba(48, 42, 40, 0.08);
  --tfcr-shadow: 0 14px 40px rgba(48, 42, 40, 0.06);
  --tfcr-shadow-soft: 0 8px 24px rgba(48, 42, 40, 0.045);
}

/* Whole page */
body,
.site,
.site-content,
.elementor,
.elementor-section,
.elementor-container,
.elementor-widget-wrap {
  background-color: var(--tfcr-bg);
  color: var(--tfcr-ink);
}

body,
p,
li,
span,
div,
input,
select,
button {
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--tfcr-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--tfcr-ink);
}

a {
  color: var(--tfcr-rose-dark);
  text-decoration: none;
}

a:hover {
  color: var(--tfcr-rose);
}

/* =============================
   FacetWP Styling
   ============================= */

.facetwp-facet {
  margin-bottom: 22px;
}

.facetwp-facet-search input,
.facetwp-search {
  width: 100%;
  border: 0 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  box-shadow: 0 10px 30px rgba(48, 42, 40, 0.06) !important;
  padding: 16px 22px !important;
  color: var(--tfcr-ink) !important;
  font-size: 16px !important;
  outline: none !important;
}

.facetwp-facet-search input::placeholder,
.facetwp-search::placeholder {
  color: #a59792 !important;
}

.facetwp-checkbox,
.facetwp-radio {
  background-image: none !important;
  display: inline-flex !important;
  align-items: center;
  margin: 0 8px 8px 0 !important;
  padding: 10px 14px !important;
  border-radius: 999px !important;
  background-color: #ffffff !important;
  border: 1px solid var(--tfcr-line) !important;
  color: var(--tfcr-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  transition: all 0.18s ease;
}

.facetwp-checkbox:hover,
.facetwp-radio:hover {
  background-color: var(--tfcr-soft) !important;
  color: var(--tfcr-ink) !important;
}

.facetwp-checkbox.checked,
.facetwp-radio.checked {
  background-color: var(--tfcr-blush) !important;
  border-color: var(--tfcr-blush) !important;
  color: var(--tfcr-rose-dark) !important;
}

.facetwp-dropdown,
.facetwp-sort-select,
select {
  border: 1px solid var(--tfcr-line) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  padding: 12px 16px !important;
  color: var(--tfcr-ink) !important;
  font-weight: 600 !important;
  box-shadow: 0 6px 18px rgba(48, 42, 40, 0.035);
}

.facetwp-counter {
  color: var(--tfcr-muted) !important;
  font-size: 12px !important;
}

.facetwp-selections ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 18px;
  list-style: none;
}

.facetwp-selections li {
  margin: 0 !important;
}

.facetwp-selection-value {
  display: inline-flex !important;
  align-items: center;
  border-radius: 999px !important;
  background: var(--tfcr-blush-2) !important;
  color: var(--tfcr-rose-dark) !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.facetwp-reset {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  background: var(--tfcr-blush-2) !important;
  color: var(--tfcr-rose-dark) !important;
  border-radius: 999px !important;
  padding: 10px 16px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  cursor: pointer;
}

.facetwp-reset:hover {
  background: var(--tfcr-blush) !important;
}

/* =============================
   Spice Filter Peppers
   ============================= */

.facetwp-facet-spice_level .facetwp-radio {
  min-width: 60px !important;
  justify-content: center !important;
  font-size: 0 !important;
}

.facetwp-facet-spice_level .facetwp-radio[data-value="1"]::after { content: "🌶"; }
.facetwp-facet-spice_level .facetwp-radio[data-value="2"]::after { content: "🌶🌶"; }
.facetwp-facet-spice_level .facetwp-radio[data-value="3"]::after { content: "🌶🌶🌶"; }
.facetwp-facet-spice_level .facetwp-radio[data-value="4"]::after { content: "🌶🌶🌶🌶"; }
.facetwp-facet-spice_level .facetwp-radio[data-value="5"]::after { content: "🌶🌶🌶🌶🌶"; }

.facetwp-facet-spice_level .facetwp-radio::after {
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--tfcr-rose-dark);
}

.facetwp-facet-spice_level .facetwp-radio.checked {
  background: var(--tfcr-rose) !important;
  border-color: var(--tfcr-rose) !important;
}

.facetwp-facet-spice_level .facetwp-radio.checked::after {
  color: #ffffff;
}

/* =============================
   Book Cards
   ============================= */

.tfcr-book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tfcr-book-card {
  overflow: hidden;
  border-radius: 16px;
  background: var(--tfcr-paper);
  box-shadow: 0 8px 20px rgba(48, 42, 40, 0.05);
  transition: all 0.18s ease;
}

.tfcr-book-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(48, 42, 40, 0.08);
}

.tfcr-book-cover-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  max-height: 220px;
  background: var(--tfcr-blush-2);
  overflow: hidden;
}

.tfcr-book-cover,
.tfcr-book-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  display: block;
  transition: transform 0.25s ease;
}

.tfcr-book-card:hover .tfcr-book-cover {
  transform: scale(1.03);
}

.tfcr-no-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: var(--tfcr-blush-2);
}

.tfcr-book-badges {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  z-index: 2;
}

.tfcr-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--tfcr-ink);
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(48, 42, 40, 0.08);
}

.tfcr-spice-badge,
.tfcr-peppers {
  color: var(--tfcr-rose-dark);
  letter-spacing: 1px;
  font-size: 12px;
}

.tfcr-ku-badge {
  color: var(--tfcr-rose-dark);
  background: #ffffff;
}

.tfcr-book-body {
  padding: 10px;
}

.tfcr-stars {
  color: #f3b13f;
  font-size: 15px;
  line-height: 1;
  margin-bottom: 5px;
  letter-spacing: -1px;
}

.tfcr-book-title {
  margin: 0 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.1;
  font-weight: 700;
}

.tfcr-book-title a {
  color: var(--tfcr-ink);
  text-decoration: none;
}

.tfcr-book-title a:hover {
  color: var(--tfcr-rose-dark);
}

.tfcr-book-author {
  margin: 0 0 8px;
  color: var(--tfcr-muted);
  font-size: 11px;
  line-height: 1.3;
}

.tfcr-book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.tfcr-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.tfcr-tag.trope,
.tfcr-tag.theme {
  background: var(--tfcr-blush-2);
  color: var(--tfcr-rose-dark);
}

.tfcr-book-review {
  font-size: 11px;
  line-height: 1.4;
  color: #635653;
  margin-bottom: 8px;
}

.tfcr-review-link {
  display: block;
  text-align: center;
  padding: 6px;
  border-radius: 999px;
  background: var(--tfcr-blush-2);
  color: var(--tfcr-rose-dark);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

/* =============================
   Pagination
   ============================= */

.tfcr-pagination {
  margin-top: 24px;
  text-align: center;
}

.facetwp-pager {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.facetwp-page {
  border-radius: 999px !important;
  padding: 8px 12px !important;
  color: var(--tfcr-muted) !important;
}

.facetwp-page.active {
  background: var(--tfcr-rose) !important;
  color: #ffffff !important;
}

/* =============================
   Buttons
   ============================= */

.elementor-button,
button,
input[type="submit"] {
  border-radius: 999px !important;
  background: var(--tfcr-rose) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 800 !important;
}

.elementor-button:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--tfcr-rose-dark) !important;
}

/* =============================
   Responsive
   ============================= */

@media (max-width: 1100px) {
  .tfcr-book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .tfcr-book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .tfcr-book-grid {
    grid-template-columns: 1fr;
  }

  .facetwp-checkbox,
  .facetwp-radio {
    font-size: 12px !important;
    padding: 9px 12px !important;
  }
}/* Mobile spacing fix */
@media (max-width: 768px) {
  .tfcr-results,
  .tfcr-results-top,
  .tfcr-active-filters,
  .tfcr-book-grid,
  .facetwp-template {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .tfcr-results-top {
    margin-bottom: 14px !important;
  }

  .tfcr-results-top h2 {
    margin-bottom: 10px !important;
  }

  .facetwp-template {
    min-height: 0 !important;
  }

  .elementor-widget-facetwp-template,
  .elementor-widget-container:has(.facetwp-template) {
    min-height: 0 !important;
    height: auto !important;
  }
}
/* Aggressive mobile gap fix */
@media (max-width: 768px) {
  .elementor-element,
  .elementor-widget,
  .elementor-widget-container,
  .elementor-shortcode,
  .facetwp-template,
  .tfcr-book-grid {
    min-height: 0 !important;
  }

  .tfcr-results .elementor-widget-container,
  .tfcr-results .facetwp-template,
  .tfcr-results .tfcr-book-grid {
    height: auto !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .tfcr-results-top {
    margin-bottom: 12px !important;
    padding-bottom: 0 !important;
  }

  .tfcr-book-grid {
    margin-top: 0 !important;
  }
}