/* Daisychain Theme Styles */

:root {
  --yellow: #fdee9e;
  --green: #bed9a5;
  --lavender: #c5a1dc;
  --cornflower: #7b8cc4;
  --rose: #e8a0b6;
  --text-dark: #3e2b23;
  --bg-light: #fffdf8;
  --card-bg: transparent;
  --shadow: rgba(0, 0, 0, 0.05);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  padding: 0;
  margin: 0;
}

.site-header {
  background: var(--bg-light);
  text-align: center;
  padding: 1em 0;
  font-size: 2em;
  font-weight: bold;
  color: var(--text-dark);
  z-index: 10;
}

.site-title {
  font-family: 'Georgia', serif;
  font-size: 2em;
  margin: 0;
  color: var(--rose);
  letter-spacing: 0.05em;
}

#navbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--green);
  height: 3.75em;
  display: flex;
  align-items: center;
  justify-content: center;
}

nav ul {
  display: flex;
  align-items: center; /* Add this line */
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--green);
  border-radius: 0;
  justify-content: center;
  height: 100%; /* Ensure ul fills nav height */
}

nav {
  position: sticky;
  top: 0;
  background: var(--green);
  z-index: 1000;
  height: 3.75em;
  display: flex;
  align-items: center;
}

nav li {
  height: 100%; /* Ensure each li fills navbar vertically */
}

nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 1em; /* removed vertical padding, added horizontal only */
  text-align: center;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: bold;
}
nav a:hover,
nav a:focus {
  background-color: var(--yellow);
  color: var(--green);
}

h1, h2 {
  color: var(--rose);
  margin-top: 0;
}

.sort-button,
.type-button,
.breed-button {
  padding: 6px 12px;
  margin: 0.25em;
  border: none;
  border-radius: 5px;
  background-color: var(--yellow);
  color: var(--text-dark);
  font-weight: bold;
  cursor: pointer;
  box-shadow: 2px 2px 4px var(--shadow);
}

.sort-button:hover,
.type-button:hover,
.breed-button:hover {
  background-color: var(--rose);
  color: var(--bg-light);
}

#petz-container,
#babyz-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1em;
  justify-content: flex-start;
}

.pet-card,
.babyz-card {
  background-color: var(--card-bg);
  padding: 0.5em;
  text-align: center;
  box-shadow: none;
  min-width: 150px;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.pet-img-wrapper {
  background: url('img/bgheart.png') no-repeat center center;
  background-size: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1em; /* adjust as needed */
}

.pet-card img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
}

.pet-img-wrapper img {
  display: block;
}

.babyz-card img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-bottom: 0.5em;
}

.babyz-img-wrapper {
  background: url('img/bgcircle.png') no-repeat center center;
  background-size: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1em; /* Adjust as needed for the circle size */
}

.babyz-img-wrapper img {
  display: block;
}

footer {
  margin-top: 4em;
  text-align: center;
  font-size: 0.9em;
  color: #888;
}  

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3em 2em 2em; /* nav (2.75em) + typeButtons (3.25em for buffer) */
  background: #ffffffaa;
  border-radius: 12px;
  box-shadow: 0 2px 6px var(--shadow);
}

section {
  margin-bottom: 2em;
}  

button:focus {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

#typeButtons {
  position: sticky;
  top: 2.75em; /* same as navbar height */
  background: var(--bg-light); /* solid background to block petz behind */
  z-index: 999;
  padding: 0.5em 0;
  margin: 0;
  border-top: 1px solid var(--lavender);
  border-bottom: 1px solid var(--lavender);
}

.sort-button.active,
.type-button.active,
.breed-button.active {
  background-color: var(--rose);
  color: var(--bg-light);
}

#breedContainer {
  position: sticky;
  bottom: 0;
  background: transparent;
  z-index: 999;
  padding: 0.5em;
  text-align: center;
  margin: 0;
}

@media (max-width: 600px) {
  nav a {
    font-size: 0.9em;
    padding: 0.5em;
  }

  nav ul {
    flex-direction: column;
  }

  .sort-button,
  .type-button,
  .breed-button {
    padding: 8px 10px;
    font-size: 0.9em;
    margin: 0.2em;
    width: 90%;
    max-width: 300px;
  }

  #typeButtons,
  #breedContainer {
    padding: 0.25em;
  }

  main {
    padding: 6em 1em 2em;
  }

  .pet-card,
  .babyz-card {
    flex: 1 0 100%;
    max-width: 100%;
  }

  .pet-card img,
  .babyz-card img {
    width: 100%;
    height: auto;
  }

  h1, h2 {
    font-size: 1.2em;
    text-align: center;
  }

  footer {
    font-size: 0.8em;
    padding: 1em;
  }
}