* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: 'Montserrat', Arial, sans-serif;
  background:
    linear-gradient(rgba(0,0,0,0.66), rgba(0,0,0,0.76)),
    url("../png/fonassortment.png") center top / 100% auto no-repeat,
    #080808;
  color: #f5f5f5;
  padding: 32px 24px;
}

.hidden {
  display: none !important;
}

/* 18+ */

.age-screen {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.age-card {
  width: 100%;
  max-width: 520px;
  padding: 36px 28px;
  text-align: center;
  border-radius: 28px;
  background: #111111;
  border: 1px solid rgba(184, 149, 95, 0.42);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.age-badge {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #b8955f;
  color: #b8955f;
  font-size: 24px;
  font-weight: 700;
}

.age-card h1 {
  font-size: 30px;
  margin-bottom: 14px;
}

.age-card p {
  color: #c8c8c8;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 26px;
}

.age-actions {
  display: grid;
  gap: 12px;
}

.confirm-button,
.deny-button {
  height: 56px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.25s ease;
}

.confirm-button {
  border: none;
  background: #b8955f;
  color: #fff;
}

.deny-button {
  background: rgba(255, 0, 0, 0.1);
  color: #ff4d4d;
  border: 1.5px solid rgba(255, 0, 0, 0.5);
}

.confirm-button:hover,
.deny-button:hover {
  transform: translateY(-2px);
}

.deny-button:hover {
  background: #ff4d4d;
  color: #111;
}

/* page */

.assortment-page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.top-panel {
  display: flex;
  justify-content: flex-start;
  gap: 18px;
  margin-bottom: 12px;
}

.back-link {
  color: #d8d8d8;
  text-decoration: none;
  font-size: 15px;
  transition: 0.25s ease;
  white-space: nowrap;
}

.back-link:hover {
  color: #b8955f;
}

.search-wrapper {
  width: 100%;
  margin-bottom: 18px;
  display: flex;
  justify-content: flex-start;
}

.search-box {
  width: 300px;
  height: 44px;
  padding: 0 16px;
  border-radius: 16px;
  background: #111111;
  border: 1.5px solid rgba(184, 149, 95, 0.32);
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box i {
  color: #b8955f;
  font-size: 14px;
}

.search-box input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #f5f5f5;
  font-size: 14px;
  font-family: inherit;
}

.search-box input::placeholder {
  color: #858585;
}

.assortment-header {
  text-align: left;
  margin-bottom: 22px;
}

.assortment-header h1 {
  font-size: 42px;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.assortment-header p {
  color: #b8b8b8;
}

/* layout */

.shop-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
  align-items: flex-start;
  transition: 0.35s ease;
}

.shop-layout.brand-open {
  grid-template-columns: 1fr;
}

.shop-layout.brand-open .category-sidebar {
  display: none;
}

.shop-layout.brand-open .details-area {
  width: 100%;
}

/* left menu */

.category-sidebar {
  display: grid;
  gap: 10px;
}

.category-group {
  border-radius: 20px;
  overflow: hidden;
  background: #111111;
  border: 1.5px solid rgba(184, 149, 95, 0.28);
}

.category-row {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: none;
  background: transparent;
  color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  transition: 0.25s ease;
  font-family: inherit;
}

.category-row span {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}

.category-row i {
  font-size: 14px;
  color: #cfcfcf;
  transition: 0.25s ease;
}

.category-row span i {
  color: #b8955f;
}

.category-row:hover,
.category-group.open .category-row {
  background: #181818;
}

.category-group.open .category-row > i:last-child {
  transform: rotate(180deg);
}

.category-dropdown {
  display: grid;
  gap: 6px;
  max-height: 0;
  overflow: hidden;
  padding: 0 10px;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.category-dropdown.active {
  max-height: 420px;
  padding: 0 10px 12px;
}

.category-dropdown button {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: #171717;
  color: #cfcfcf;
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: 0.25s ease;
}

.category-dropdown button:hover,
.category-dropdown button.active-brand {
  background: #b8955f;
  color: #fff;
}

/* right side */

.details-area {
  min-width: 0;
}

.news-block,
.brand-card {
  width: 100%;
  padding: 28px;
  border-radius: 28px;
  background: #111111;
  border: 1.5px solid rgba(184, 149, 95, 0.28);
  animation: fadeUp 0.35s ease;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.news-block {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.news-label {
  display: inline-block;
  margin-bottom: 10px;
  color: #b8955f;
  font-size: 13px;
}

.news-block h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.news-block p {
  color: #b8b8b8;
  line-height: 1.5;
  margin-bottom: 18px;
}

.news-list {
  display: grid;
  gap: 12px;
}

.news-item {
  padding: 14px;
  border-radius: 16px;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.news-item h3 {
  font-size: 15px;
  margin-bottom: 4px;
}

.news-item p {
  margin-bottom: 0;
  font-size: 13px;
}

.brand-card {
  max-width: 980px;
  margin: 0 auto;
}

.back-to-list {
  height: 38px;
  padding: 0 14px;
  margin-bottom: 18px;
  border-radius: 13px;
  border: 1px solid rgba(184, 149, 95, 0.35);
  background: #171717;
  color: #f5f5f5;
  cursor: pointer;
  transition: 0.25s ease;
  white-space: nowrap;
  font-family: inherit;
  font-weight: 700;
}

.back-to-list:hover {
  background: #b8955f;
  color: #fff;
}

.brand-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.brand-category {
  display: inline-block;
  margin-bottom: 8px;
  color: #b8955f;
  font-size: 13px;
}

.brand-card-header h2 {
  font-size: 32px;
  letter-spacing: -0.6px;
}

.close-brand {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  border: 1px solid rgba(184, 149, 95, 0.35);
  background: #171717;
  color: #f5f5f5;
  cursor: pointer;
  transition: 0.25s ease;
}

.close-brand:hover {
  background: #b8955f;
  color: #fff;
}

.brand-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.strength-select {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.strength-select button {
  padding: 8px 12px;
  border-radius: 999px;
  border: none;
  background: #181818;
  color: #f5f5f5;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: 0.25s ease;
}

.strength-select button:hover {
  background: #b8955f;
  color: #fff;
}

.brand-meta {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: #181818;
  color: #cfcfcf;
  font-size: 13px;
}

.empty-state {
  padding: 22px;
  border-radius: 18px;
  color: #b8b8b8;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* cards */

.strength-block {
  margin-top: 24px;
  scroll-margin-top: 24px;
}

.strength-block h3 {
  font-size: 20px;
  margin-bottom: 14px;
  color: #f5f5f5;
}

.flavor-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 14px;
  list-style: none;
}

.flavor-card {
  min-width: 0;
  min-height: 285px;
  padding: 10px;
  border-radius: 18px;
  background: #151515;
  border: 1px solid rgba(184, 149, 95, 0.24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: 0.25s ease;
}

.flavor-card:hover {
  transform: translateY(-3px);
  background: #1d1d1d;
  border-color: rgba(184, 149, 95, 0.55);
}

.flavor-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 10px;
  background: #242424;
}

.flavor-info {
  min-width: 0;
  margin-bottom: 8px;
}

.flavor-info h4 {
  font-size: 13px;
  line-height: 1.25;
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}

.flavor-info span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
}

.low {
  color: #ffcc66;
}

.ok {
  color: #9cffb1;
}

.many {
  color: #7dd3ff;
}

.price {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 5px;
}

.price .current {
  font-size: 14px;
  font-weight: 700;
  color: #f5f5f5;
}

.price .old {
  font-size: 12px;
  color: rgba(255,255,255,0.48);
  text-decoration: line-through;
}

.reserve-btn {
  margin-top: auto;
  min-height: 34px;
  border: none;
  border-radius: 10px;
  background: #f5f5f5;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: 0.2s ease;
}

.reserve-btn i {
  font-size: 12px;
}

.reserve-btn:hover {
  background: #b8955f;
  color: #fff;
  transform: translateY(-1px);
}

/* text-only old li fallback */

.flavor-list > li:not(.flavor-card) {
  padding: 14px;
  border-radius: 14px;
  background: #151515;
  border: 1px solid rgba(184, 149, 95, 0.22);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.flavor-list > li:not(.flavor-card):hover {
  background: #1d1d1d;
}

/* animation */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* adaptive */

@media (max-width: 900px) {
  .shop-layout,
  .shop-layout.brand-open {
    grid-template-columns: 1fr;
  }

  .shop-layout.brand-open .category-sidebar {
    display: none;
  }

  .news-block,
  .brand-card {
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  body {
    padding: 20px 16px;
    background:
      linear-gradient(rgba(0,0,0,0.68), rgba(0,0,0,0.78)),
      url("../png/fonassortment-mobile.jpg") center top / cover no-repeat,
      #080808;
  }

  .top-panel {
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 10px;
  }

  .search-wrapper {
    justify-content: flex-start;
    margin-bottom: 16px;
  }

  .search-box {
    width: 100%;
  }

  .assortment-header {
    margin-bottom: 16px;
  }

  .assortment-header h1 {
    font-size: 30px;
  }

  .news-block,
  .brand-card {
    padding: 22px;
    border-radius: 22px;
  }

  .brand-card-header h2 {
    font-size: 26px;
  }

  .category-row {
    min-height: 56px;
  }

  .back-to-list {
    width: 100%;
  }

  .flavor-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .flavor-card {
    min-height: 245px;
    padding: 8px;
    border-radius: 16px;
  }

  .flavor-card img {
    height: 108px;
    border-radius: 12px;
  }

  .flavor-info h4 {
    font-size: 12px;
  }

  .flavor-info span,
  .price .old {
    font-size: 10px;
  }

  .price .current {
    font-size: 12px;
  }

  .reserve-btn {
    min-height: 32px;
    font-size: 11px;
  }
}