/*
Theme Name: Toys for My Fido
Theme URI: https://toysformyfido.com/
Author: Ziv Gonen
Author URI: https://toysformyfido.com/
Description: A minimalist and fully custom theme for dog enrichment product reviews.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: toysformyfido
*/

/* Root Variables for Theme Colors & Fonts */
:root {
  --color-primary: #8d6e63; /* warm brown */
  --color-secondary: #a1887f; /* soft neutral */
  --color-accent: #fff7f1; /* background warm */
  --color-dark: #4a2c15;
  --color-light: #ffffff;
  --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Base Reset & Defaults */
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background-color: var(--color-light);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  color: var(--color-dark);
  margin-top: 0;
  margin-bottom: 0.6em;
  line-height: 1.2;
}

h1 { font-size: 2.2em; }
h2 { font-size: 1.8em; }
h3 { font-size: 1.4em; }

/* Paragraphs & Text */
p {
  margin-bottom: 1.2em;
  max-width: 700px;
}

/* Typography Utility Classes */
.text-sm { font-size: 0.9rem; }
.text-lg { font-size: 1.2rem; }
.text-xl { font-size: 1.6rem; }

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
a:focus, .btn:focus {
  outline: 2px dashed var(--color-primary);
  outline-offset: 2px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease-in-out;
}

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

.btn-primary:hover {
  background-color: #6d4c41;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-light);
}

.btn-secondary:hover {
  background-color: #7e675b;
}

/* Containers */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Section Styling */
.section {
  padding: 60px 20px;
  background-color: var(--color-accent);
  border-radius: 12px;
  margin: 0 auto 40px auto;
  text-align: center;
  max-width: 1100px;
}

.section-title {
  font-size: 2em;
  margin-bottom: 20px;
}

.section-description {
  font-size: 1.1em;
  color: #444;
  max-width: 700px;
  margin: 0 auto 1.5em auto; /* center it horizontally */
  text-align: center;
}

/* Product Cards */
.product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.product-card {
  width: 300px;
  background-color: var(--color-light);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.product-card img {
  width: 100%;
  border-radius: 8px;
}

.product-card h3 {
  margin-top: 10px;
  font-size: 1.1em;
}

.product-card p {
  font-size: 0.95em;
  color: #555;
}

.product-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: bold;
  color: var(--color-primary);
}

/* Layout Utility Classes */
.text-center { text-align: center; }
.flex { display: flex; }
.gap-20 { gap: 20px; }
.mb-40 { margin-bottom: 40px; }

/* HEADER */
.custom-site-header {
  background-color: #ffffff;
  border-bottom: 2px solid #f4d9a6;
  padding: 10px 20px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 100%;
  gap: 20px;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 15px;
}

.site-logo {
  max-height: 100px;
  width: auto;
  height: auto;
  border-radius: 8px;
}

.site-tagline {
  font-size: 1.2rem;
  font-weight: 600;
  color: #8b5e3c;
  font-style: italic;
}

/* NAVIGATION */
.hamburger {
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #8b5e3c;
}

.main-nav {
  display: none;
  flex-direction: column;
  width: 100%;
  padding-top: 10px;
}

.main-nav.active {
  display: flex;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu li {
  padding: 10px;
  border-bottom: 1px solid #f1e8db;
}

.nav-menu a {
  text-decoration: none;
  color: #5b3a1e;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: #d8863b;
}

/* BREADCRUMBS */
.breadcrumbs-wrapper {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px 0 20px;
}

.breadcrumbs {
  font-size: 0.9rem;
  color: #777;
}

.breadcrumbs a {
  color: #8c6239;
  text-decoration: none;
  font-weight: 500;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  color: #333;
  font-weight: 600;
}


/* MAIN + FOOTER */
.site-main {
  background-color: #fffdf9;
  padding: 2rem 1rem;
}

.site-main h1 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.site-main p {
  line-height: 1.6;
  margin-bottom: 24px;
}

.site-main > .container {
  max-width: 800px;
  margin: 0 auto;
}

.site-footer {
  text-align: center;
  padding: 1rem;
  background-color: #f4e7d3;
  font-size: 0.9rem;
  color: #5b3a1e;
}

/* Category Grid & Cards */
.category-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 20px;
  width: 300px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.category-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}

.category-card h3 {
  font-size: 1.2em;
  color: var(--color-dark);
  margin-bottom: 10px;
}

.category-card p {
  font-size: 0.95em;
  color: #555;
  margin-bottom: 15px;
}

.category-card .btn {
  margin-top: auto;
  width: fit-content;
  align-self: center;
  padding-left: 24px;
  padding-right: 24px;
}

/* How we rank page */

.how-we-rank-page h1, 
.how-we-rank-page h2, 
.how-we-rank-page h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: #222;
}

.how-we-rank-page p {
  font-family: 'Inter', sans-serif;
  color: #444;
  line-height: 1.6;
}

.ranking-card:hover {
  transform: scale(1.01);
  transition: transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

table th, table td {
  font-family: 'Inter', sans-serif;
  font-size: 1em;
}

/* Images on home page*/

.homepage-dog-gallery {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
}

.homepage-dog-gallery img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.homepage-dog-gallery img:hover {
  transform: scale(1.03);
}


/* Product Sections (used on category pages) */

/* View on Amazon button*/

.buy-button {
  display: inline-block;
  background-color: #e6b400 !important;
  color: #2e2e2e !important;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  margin-top: 20px;
  margin-left: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: background-color 0.25s ease, transform 0.2s ease;
  text-align: right;
}

.buy-button:hover {
  background-color: #f1cb27  !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.buy-button-wrapper {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

/* Category cards for product pages*/

.category-cards-p {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
  padding-bottom: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.category-card-p {
  background-color: #fff;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  text-align: center;
  font-weight: 600;
  text-decoration: none;
  color: #523c2c;
  border: 1px solid #f0eae1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card-p:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}


.product-title {
  margin-bottom: 10px;
}

.score-badge {
  display: inline-block;
  background-color: #f9f3ec;
  color: #5c2e14;
  border: 2px solid #e0c8b4;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: bold;
  font-size: 0.95rem;
  margin-bottom: 10px;
  margin-top: 10px;
}

.product-section {
  max-width: 800px;
  margin: 40px auto;
  padding: 40px 20px;
  border-bottom: 1px solid #eee;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.product-section h2 {
  font-size: 1.6em;
  color: var(--color-dark);
  margin-bottom: 0.4em;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.95em;
  table-layout: fixed;
}

.ranking-table th,
.ranking-table td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: left;
  word-wrap: break-word;
}

.ranking-table th {
  background-color: #f9f4ef;
  font-weight: 600;
}

/* Buy Button for Product Links */
.buy-button {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background-color: var(--color-primary);
  color: var(--color-light);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.buy-button:hover {
  background-color: #6d4c41;
}

/* pros-cons styling*/

.pros-cons {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.pros-block, .cons-block {
  flex: 1 1 300px;
}

.pros, .cons {
  list-style: none;
  padding-left: 0;
  margin-top: 10px;
}

.pros li {
  background-color: #eafaf0;
  color: #215732;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  position: relative;
}

.pros li::before {
  content: "✅";
  margin-right: 8px;
}

.cons li {
  background-color: #fff0f0;
  color: #721c24;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  position: relative;
}

.cons li::before {
  content: "❌";
  margin-right: 8px;
}

/* Style for all categories page */

/* L1 Index Navigation */
.l1-index {
  margin-bottom: 40px;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 12px;
  text-align: center;
}

.l1-index ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 0;
}

.l1-index li a {
  background-color: #eee;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: background-color 0.2s;
  display: block;
  width: 100%;
  max-width: 320px;
  text-align: center;
  padding: 14px 18px;
  font-size: 1rem;
  border-radius: 24px;
}

.l1-index li a:hover {
  background-color: #ddd;
}

.l1-index ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  padding: 0 16px;
  box-sizing: border-box;
}

.l1-index li a {
  display: block;
  width: 100%;
  max-width: 320px;
  text-align: center;
  padding: 14px 18px;
  font-size: 1rem;
  border-radius: 24px;
  background-color: #f0f0f0;
  box-sizing: border-box;
}

/* Category Section Blocks */
.category-section {
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid #e0e0e0;
}

.category-section h2 {
  margin-bottom: 16px;
  font-size: 1.5rem;
  text-align: center;
}

.category-section p {
  margin-top: 16px;
  text-align: center;
}

.category-section a {
  display: inline-block;
  text-decoration: none;
}

/*search box:*/

.search-container {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 300px;
  margin-left: 20px;
  position: relative;
}

#search-box {
  width: 100%;
  padding: 8px 14px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

#search-box:focus {
  border-color: #d8863b; /* warm orange tone to match your palette */
  outline: none;
  box-shadow: 0 0 4px rgba(216, 134, 59, 0.25); /* soft glow instead of harsh line */
}

#autocomplete-results {
  position: absolute;
  z-index: 9999;
  top: 110%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  z-index: 1000;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#autocomplete-results li {
  list-style: none;
}

#autocomplete-results li a {
  display: block;
  padding: 5px 5px;
  color: #333;
  text-decoration: none;
}

#autocomplete-results li a:hover {
  background-color: #f7f7f7;
}

#autocomplete-results:empty {
  display: none;
}

/* RESPONSIVE */
@media (min-width: 768px) {
  .hamburger {
    display: none;
  }

  .main-nav {
    display: flex !important;
    flex-direction: row;
    width: auto;
    padding-top: 0;
    gap: 20px;
  }

  .nav-menu {
    display: flex;
    gap: 20px;
  }

  .nav-menu li {
    border: none;
    padding: 0;
  }

  .main-nav.active {
    display: flex !important;
  }
    .product-section {
    padding: 20px 16px;
  }

  .ranking-table th,
  .ranking-table td {
    font-size: 0.9em;
    padding: 10px;
  }
	
    .l1-index ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .l1-index li a {
    width: auto;
    max-width: none;
  }

    .search-container {
    margin-left: auto;
    margin-right: auto;
  }
}
