/* ======= ОСНОВНОЙ СТИЛЬ CosmoCatalog ======= */
:root {
  --primary: #d94a92;
  --primary-light: #fff0f7;
  --accent: #f3b6ca;
  --text: #333;
  --muted: #777;
  --bg: #fff9fb;
  --shadow: 0 2px 8px rgba(0,0,0,0.05);
  --font: 'Poppins', system-ui, sans-serif;
}

/* БАЗА */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* КОНТЕЙНЕР */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ССЫЛКИ И КНОПКИ */
a { color: var(--primary); text-decoration: none; transition: .2s; }
a:hover { color: #b93478; }

button, .btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .2s;
  font-family: var(--font);
  font-weight: 600;
}
button:hover, .btn:hover {
  background: #b93478;
}

/* ======= ШАПКА ======= */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--accent);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

/* ЛОГО */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}
.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #ffe3ef;
}

/* ======= МЕНЮ ======= */
.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  transition: .3s;
}
.nav a, .nav button, .nav span {
  font-family: var(--font);
  font-weight: 600;
  font-size: 16px;
  color: var(--primary);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}
.nav a:hover, .nav button:hover {
  color: #b93478;
  transform: translateY(-1px);
}
.nav span {
  color: #e06ba3;
  font-weight: 500;
}

/* ======= КНОПКА-БУРГЕР ======= */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  cursor: pointer;
  gap: 6px;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: .3s;
  z-index: 1003;
}
.menu-toggle span {
  width: 24px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: .3s;
}
.menu-toggle.open span:nth-child(1){ transform: rotate(45deg) translate(5px,5px); }
.menu-toggle.open span:nth-child(2){ opacity: 0; }
.menu-toggle.open span:nth-child(3){ transform: rotate(-45deg) translate(5px,-5px); }

/* ======= ФОН ПОД МЕНЮ ======= */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  visibility: hidden;
  transition: .25s;
  z-index: 1000;
}
.mobile-overlay.show { opacity: 1; visibility: visible; }

/* ======= МЕНЮ (АДАПТИВНОЕ) ======= */
@media (max-width: 1000px) {
  .menu-toggle { display: flex; }
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 72%;
    max-width: 360px;
    height: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 84px 24px;
    gap: 18px;
    background: #fff0f7;
    box-shadow: -2px 0 16px rgba(0,0,0,.12);
    border-left: 3px solid var(--accent);
    border-radius: 16px 0 0 16px;
    transition: right .3s;
    z-index: 1002;
  }
  .nav.is-open { right: 0; }
  .nav a, .nav button, .nav span {
    color: var(--primary);
    font-size: 18px;
  }
  .header__row { justify-content: space-between; }
}

/* ======= КАРТОЧКИ ТОВАРОВ ======= */
.card {
  background: #fff;
  border: 1px solid var(--accent);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  overflow: hidden;
}
.card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
}
.price { color: var(--primary); font-weight: 700; }

/* ======= КНОПКА "ИЗБРАННОЕ" ======= */
.fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column; /* звезда и текст по вертикали */
  gap: 4px;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: #fff;
  color: var(--primary);
  font-weight: 500;
  font-size: 13px;              /* чуть меньше шрифт */
  cursor: pointer;
  padding: 6px 8px;             /* стало уже */
  width: 250px;                 /* фиксированная ширина */
  text-align: center;
  transition: all 0.25s ease;
}

.fav-btn svg {
  width: 18px;
  height: 18px;
}

.fav-btn:hover {
  background: #fff3f8;
  border-color: #e9a3bb;
}

/* ======= ПАГИНАЦИЯ ======= */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 30px 0 10px;
  flex-wrap: wrap;
}
.page-link {
  padding: 8px 14px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}
.page-link:hover {
  background: #ffe8f0;
  border-color: var(--primary);
  color: #b13a73;
}

/* ======= ФУТЕР ======= */
.site-footer {
  background: #ffe9f1;
  color: #4a3c46;
  padding: 40px 0 20px;
  border-top: 3px solid var(--accent);
  margin-top: 40px;
  font-family: 'Inter', sans-serif;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
  padding: 32px 0;
}
.footer-title {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary);
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li { margin: 6px 0; }
.footer-links a {
  color: var(--text);
  text-decoration: none;
}
.footer-links a:hover { color: var(--primary); }
.socials {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ffe3ef;
  color: var(--primary);
  transition: .2s;
}
.social-link:hover { background: #ffd0e3; }
.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--accent);
  margin-top: 30px;
  padding-top: 10px;
  font-size: 14px;
  color: #7a6670;
}
@media (max-width: 900px){
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

/* ======= ГРИД ТОВАРОВ ======= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 720px){
  .grid { grid-template-columns: 1fr; }
}

/* ======= ФИЛЬТРЫ ======= */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}
.filters input,
.filters select {
  padding: 8px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: #fff;
}
.filters .btn {
  background: var(--primary);
  color: #fff;
}
/* ======= FOOTER ======= */
.site-footer {
  background: #fff0f7;
  border-top: 2px solid #f3b6ca;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
  color: #333;
  margin-top: 50px;
  padding-top: 40px;
  font-family: 'Poppins', sans-serif;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  align-items: flex-start;
  padding-bottom: 30px;
}

.footer-logo {
  font-weight: 800;
  font-size: 22px;
  color: #d94a92;
  text-decoration: none;
}

.footer-desc {
  margin-top: 10px;
  color: #555;
  font-size: 14px;
  line-height: 1.5;
}

.footer-title {
  font-weight: 700;
  color: #d94a92;
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li { margin: 6px 0; }
.footer-links a {
  color: #444;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: #d94a92;
}

.socials {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.social-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #ffe4f0;
  color: #d94a92;
  transition: all 0.2s;
}
.social-link:hover {
  background: #d94a92;
  color: #fff;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #f3b6ca;
  padding: 16px 0;
  font-size: 14px;
  color: #777;
}

/* Мобильная адаптация футера */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
  .socials {
    justify-content: center;
  }
}
