@font-face {
  font-family: "Balkara";
  src: url("../fonts/balkara-condensed.ttf") format("truetype");
  font-display: swap;
}

:root {
  --black: #090909;
  --text: #181818;
  --muted: #efefef;
  --white: #ffffff;
  --line: #e3e3e3;
  --accent: #c79d6e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 36px;
  background: var(--white);
}

.brand,
.main-nav,
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-size: 24px;
}

.brand-name,
.catalog-group h2,
.product-tile h3,
.contacts-card h2 {
  font-family: "Balkara", serif;
  font-weight: 400;
}

.brand-name {
  font-size: 28px;
  line-height: 1;
}

.brand-dot {
  font-size: 24px;
}

.main-nav {
  gap: 14px;
  font-size: 24px;
}

.main-nav a:hover,
.phone:hover,
.contacts-card a:hover {
  text-decoration: underline;
}

.header-actions {
  justify-content: flex-end;
  gap: 76px;
}

.phone {
  font-size: 24px;
  white-space: nowrap;
}

.account-button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 0;
  padding: 4px 13px 4px 5px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--black);
  cursor: pointer;
  font-size: 18px;
  white-space: nowrap;
}

.account-menu {
  position: relative;
  z-index: 10;
}

.account-menu > summary {
  list-style: none;
}

.account-menu > summary::-webkit-details-marker {
  display: none;
}

.account-avatar {
  width: 34px;
  height: 34px;
  border: 2px solid #c9c9c9;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 37%, #d8d8d8 0 21%, transparent 22%),
    radial-gradient(circle at 50% 85%, #d8d8d8 0 34%, transparent 35%),
    #f7f7f7;
}

.account-arrow {
  display: block;
  width: 14px;
  height: 9px;
  object-fit: contain;
  transition: transform 0.18s ease;
}

.account-menu[open] .account-arrow {
  transform: rotate(180deg);
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 222px;
  padding: 7px;
  border-radius: 17px;
  color: #ffffff;
  background: var(--black);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.account-dropdown a,
.account-dropdown button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 11px;
  padding: 10px 11px;
  color: #ffffff;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  line-height: 1.1;
  text-align: left;
  white-space: nowrap;
}

.account-dropdown a:hover,
.account-dropdown button:hover {
  color: #000000;
  background: #ffffff;
  text-decoration: none;
}

.account-dropdown form {
  margin: 0;
}

.hero {
  width: 100%;
  height: 470px;
  overflow: hidden;
}

.hero img,
.gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero img {
  object-position: center top;
}

.gallery img {
  object-position: center;
}

.catalog-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(230px, 0.24fr) minmax(0, 0.76fr);
  gap: 16px;
  margin: 0 auto;
  padding: 20px 20px 20px;
  border-radius: 44px 44px 0 0;
  background: var(--white);
  position: relative;
  z-index: 2;
}

.catalog-group {
  padding: 13px 10px 12px;
  border-radius: 48px;
  background: var(--muted);
}

.catalog-group h2 {
  margin: 0 0 7px;
  font-size: 28px;
  line-height: 0.9;
}

.fasteners-group {
  grid-column: 2;
  grid-row: 1;
  height: 267px;
}

.configuration-group h2 {
  width: 100%;
  text-align: center;
}

.fasteners-group h2 {
  margin-left: 36px;
}

.material-group h2 {
  width: calc((100% - 50px) / 2);
  text-align: center;
}

.material-group {
  grid-column: 1 / span 2;
  grid-row: 2;
  width: 51.4%;
  height: 257px;
}

.configuration-group {
  height: 267px;
}

.tile-grid {
  display: grid;
}

.three-columns {
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  height: 207px;
}

.two-columns {
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
  height: 197px;
}

.product-tile {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
  padding: 10px 12px 8px;
  border-radius: 38px;
  background: #ffffff;
}

.product-link {
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-link:hover,
.product-link:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-tile h3 {
  max-width: 12ch;
  margin: 0;
  font-size: 28px;
  line-height: 0.9;
  text-transform: uppercase;
}

.product-tile img {
  width: 100%;
  min-height: 0;
  flex: 1;
  object-fit: contain;
  object-position: center bottom;
  margin-top: 5px;
}

.configuration-group .product-tile {
  height: 207px;
}

.material-group .product-tile {
  min-height: 0;
}

.three-columns .product-tile:not(:last-child)::after,
.two-columns .product-tile:not(:last-child)::after {
  position: absolute;
  top: 50%;
  z-index: 1;
  content: "•";
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  line-height: 1;
  transform: translateY(-50%);
}

.three-columns .product-tile:not(:last-child)::after {
  right: -28px;
}

.two-columns .product-tile:not(:last-child)::after {
  right: -35px;
}

.gallery {
  width: 100%;
  height: 260px;
  margin: 0;
}

.contacts-card {
  width: 100%;
  max-width: 1206px;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 70px;
  margin: 0 auto;
  padding: 40px 22px 28px;
  border-radius: 44px 44px 0 0;
  background: #ffffff;
  position: relative;
}

.contacts-card h2 {
  margin: 0 0 28px;
  font-size: 42px;
  text-transform: uppercase;
}

.contacts-card p {
  margin: 0 0 25px;
  font-size: 24px;
  line-height: 1.4;
}

.contacts-card a {
  font-weight: 700;
}

.pickup-block {
  align-self: center;
}

.pickup-block p {
  max-width: 440px;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.15;
}

.map-button {
  display: inline-block;
  padding: 14px 18px;
  border: 2px solid var(--black);
  border-radius: 999px;
  font-size: 16px;
}

.map-button:hover {
  color: #ffffff;
  background: var(--black);
  text-decoration: none !important;
}

.site-footer {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 1206px;
  margin: 0 auto;
  padding: 30px 15px;
  background: #ffffff;
  font-size: 24px;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
    height: auto;
    min-height: 76px;
    padding: 14px 22px;
  }

  .header-actions {
    gap: 14px;
  }

  .main-nav {
    display: none;
  }

  .phone {
    display: none;
  }

  .catalog-card {
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
  }

  .configuration-group,
  .fasteners-group,
  .material-group {
    width: auto;
    height: auto;
    grid-column: auto;
    grid-row: auto;
  }

  .configuration-group h2,
  .material-group h2 {
    width: auto;
    text-align: left;
  }

  .fasteners-group h2 {
    margin-left: 0;
  }

  .three-columns,
  .two-columns {
    height: auto;
    gap: 14px;
  }

  .product-tile,
  .configuration-group .product-tile,
  .material-group .product-tile {
    height: auto;
    min-height: 220px;
  }

  .three-columns .product-tile::after,
  .two-columns .product-tile::after {
    display: none;
  }

  .contacts-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 620px) {
  .site-header {
    min-height: 64px;
    padding: 12px 16px;
  }

  .brand-owner,
  .brand-dot {
    display: none;
  }

  .brand-name {
    font-size: 25px;
  }

  .account-button {
    padding-right: 10px;
  }

  .account-button span:nth-child(2),
  .account-arrow {
    display: none;
  }

  .catalog-card {
    width: calc(100% - 16px);
    gap: 10px;
    margin-top: 0;
    padding: 10px;
    border-radius: 26px;
  }

  .catalog-group {
    padding: 8px;
    border-radius: 23px;
  }

  .three-columns,
  .two-columns {
    grid-template-columns: 1fr 1fr;
  }

  .three-columns .product-tile:last-child {
    grid-column: span 2;
  }

  .product-tile,
  .configuration-group .product-tile,
  .material-group .product-tile {
    min-height: 175px;
    border-radius: 20px;
  }

  .contacts-card {
    width: 100%;
    margin-top: 0;
    padding: 32px 20px;
    border-radius: 0;
  }

  .site-footer {
    flex-direction: column;
    padding: 22px 20px;
  }
}
