/* Quirky Products, Home, Menu */

:root {
  --color-header: #d9e5d6;
  --color-card: #eef3ec;
  --color-primary: #0fa3b1;
  --color-text: black;
  --color-white: white;

  --font-heading: "Poppins", sans-serif;
  --font-body: "Roboto", sans-serif;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;

  --radius: 16px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
}

main {
  background-color: white;
  display: flex;
}

h1,
h2,
h3 {
  margin: 0;
}

/* ---- Shared header --- */
.site-header {
  background-color: var(--color-header);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
}

.site-header a {
  display: flex;
  align-items: center;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* ---- Shared button style ---- */
.button,
.product-card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-white);
  background-color: var(--color-primary);
  text-decoration: none;
}

.button {
  min-height: 44px;
  padding: 0 var(--space-md);
  font-size: 14px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.button:hover,
.button:focus-visible,
.product-card-button:hover,
.product-card-button:focus-visible {
  filter: brightness(0.9);
}

/* Quirky Products page */
.product-card {
  padding: var(--space-sm);
  display: flex;
  gap: var(--space-sm);
  background-color: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.product-card-image {
  width: 128px;
  height: 184px;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.product-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.product-card-title,
.product-card-price {
  margin-top: 0px;
  padding-top: 0px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  line-height: 16px;
  color: var(--color-text);
}

.product-card-description {
  margin-top: 0px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: var(--color-text);
}

.product-section {
  width: calc(100% - 2 * var(--space-sm));
  max-width: 354px;
  margin: 0 auto;
  padding: var(--space-md) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  text-align: left;
}

.product-section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--color-text);
  text-align: left;
}

.product-card-button {
  align-self: flex-start;
  height: 32px;
  padding: 0 20px;
  font-size: 12px;
  border-radius: 16px;
}

/* Home page */
.home-page {
  flex-direction: column;
}

/* Search bar */
.search-bar {
  position: relative;
  padding: var(--space-sm) var(--space-md);
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 52px 0 var(--space-sm);
  font-family: var(--font-body);
  font-size: 14px;
  background-color: var(--color-card);
  border: 2px solid var(--color-header);
  border-radius: 22px;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.search-button {
  position: absolute;
  top: 50%;
  right: calc(var(--space-md) + var(--space-xs));
  transform: translateY(-50%);
  display: flex;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: var(--color-header) url("Images/mega-cat-tree-horiz.png") center /
    cover no-repeat;
}

.hero-button {
  position: absolute;
  left: 50%;
  bottom: var(--space-md);
  transform: translateX(-50%);
  width: calc(100% - 2 * var(--space-md));
}

/* Buttons under the cat tree image */
.home-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
}

/* Menu page */
.menu-page {
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-md);
}

.menu-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: var(--space-md);
}

.menu-dropdown {
  border-bottom: 2px solid var(--color-header);
}

.menu-dropdown summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
}

.menu-dropdown summary::-webkit-details-marker {
  display: none;
}

/* Dropdown arrow */
.menu-dropdown summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2.5px solid var(--color-text);
  border-bottom: 2.5px solid var(--color-text);
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.menu-dropdown[open] summary::after {
  transform: rotate(-135deg);
}

.menu-options {
  list-style: none;
  margin: 0;
  padding: 0 0 var(--space-sm) var(--space-sm);
}

.menu-options a {
  display: block;
  padding: var(--space-xs) 0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text);
  text-decoration: none;
}

.menu-options a:hover,
.menu-options a:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Responsive: tablets (768px+) */
@media (min-width: 768px) {
  .site-header {
    padding: var(--space-md) var(--space-lg);
  }

  .site-header img {
    height: 32px;
  }

  /* Products: 2-column grid */
  .product-section {
    max-width: 720px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .product-section-title {
    grid-column: 1 / -1;
    font-size: 24px;
  }

  /* Home */
  .search-bar {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
  }

  .hero {
    aspect-ratio: 21 / 9;
  }

  .home-actions {
    flex-direction: row;
    justify-content: center;
  }

  /* Home buttons */
  .hero-button,
  .home-actions .button {
    width: 300px;
  }

  /* Menu */
  .menu-title {
    font-size: 32px;
  }
}

/* Responsive: desktop 1100px+ */
@media (min-width: 1100px) {
  /* Products: 3-column grid */
  .product-section {
    max-width: 1080px;
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    aspect-ratio: 3 / 1;
  }

  .button {
    font-size: 16px;
    min-height: 52px;
    padding: 0 var(--space-lg);
    border-radius: 26px;
  }

  .hero-button,
  .home-actions .button {
    width: 360px;
  }
}
