:root {
  --orange: #ff5126;
  --orange-dark: #ee4421;
  --yellow: #f7aa00;
  --green: #59b86c;
  --green-dark: #49a95d;
  --red: #ff4f49;
  --red-dark: #ee443f;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(100% - 60px, 1180px);
  margin: 0 auto;
}

.topbar {
  min-height: 68px;
  margin-top: 2px;
  display: grid;
  grid-template-columns: 230px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 0 18px 0 28px;
  color: #fff;
  background: var(--orange);
  border-radius: 30px 30px 0 0;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  position: relative;
}

.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 212px;
  background: #fff;
  clip-path: polygon(0 0, 85% 0, 100% 100%, 0 100%);
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  flex-direction: column;
  line-height: 1;
}

.brand-main {
  color: var(--yellow);
  font-family: Inter, Arial, sans-serif;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 1px;
}

.brand-sub {
  color: #163b5d;
  font-size: 11px;
  font-weight: 800;
  margin-left: 83px;
  margin-top: -1px;
}

.nav-links {
  justify-self: end;
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}

.nav-links a:hover {
  opacity: 0.82;
}

.search {
  width: 190px;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border-radius: 4px;
  padding: 0 8px;
}

.search-icon {
  color: #a0a0a0;
  font-size: 16px;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #4b5563;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 18px 14px 15px;
  font-size: 11px;
  color: #5d6674;
}

.breadcrumb strong {
  color: #111827;
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(330px, 0.9fr);
  gap: 28px;
  align-items: start;
  padding: 0 14px;
}

.image-frame {
  min-height: 520px;
  border: 1px solid #d8d8d8;
  display: grid;
  place-items: center;
  background: #fff;
}

.image-frame img {
  width: min(70%, 390px);
  height: auto;
  display: block;
}

.product-info {
  padding-top: 2px;
}

.product-info h1 {
  margin: 0;
  max-width: 620px;
  font-size: 18px;
  line-height: 1.42;
  font-weight: 400;
}

.price {
  margin: 18px 0 34px;
  font-size: 18px;
}

.quantity-control {
  display: grid;
  grid-template-columns: 32px 52px 32px;
  width: max-content;
  border: 1px solid #cfcfcf;
}

.quantity-control button,
.quantity-control input {
  height: 30px;
  border: 0;
  background: #fff;
  text-align: center;
  color: #555;
}

.quantity-control button {
  cursor: pointer;
  font-size: 18px;
}

.quantity-control input {
  border-left: 1px solid #d7d7d7;
  border-right: 1px solid #d7d7d7;
  outline: 0;
}

.stock {
  margin: 14px 0 14px;
  color: #ff3a3a;
  font-size: 11px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  color: #fff;
  border-radius: 3px;
  font-size: 13px;
  transition: transform .15s ease, filter .15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(.96);
}

.btn-buy {
  background: var(--red);
}

.btn-cart {
  background: var(--green);
}

.description {
  padding: 26px 14px 14px;
  font-size: 14px;
  line-height: 1.55;
}

.description p {
  margin: 2px 0;
}

.other-products {
  padding: 44px 14px 10px;
}

.section-heading h2 {
  margin: 0 0 14px;
  font-size: 21px;
  font-weight: 400;
}

.heading-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, #f3f4f6, transparent);
  margin-bottom: 8px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.card {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  border: 1px solid #ebebeb;
  background: #fff;
  border-radius: 2px;
  padding: 16px 14px 11px;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.08);
}

.card img {
  width: 90px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 18px;
}

.card-price {
  margin: 0 0 6px;
  font-size: 13px;
}

.card-title {
  color: #0469d9;
  font-size: 11px;
  line-height: 1.45;
}

.card-title:hover {
  text-decoration: underline;
}

.share {
  margin-top: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8a8a8a;
  text-align: left;
  font-size: 10px;
  cursor: pointer;
}

footer {
  margin-top: 0;
  min-height: 42px;
  display: grid;
  place-items: center;
  background: #050505;
  color: #00dbff;
  font-size: 10px;
}

@media (max-width: 980px) {
  .page-shell {
    width: min(100% - 28px, 920px);
  }

  .topbar {
    grid-template-columns: 205px 1fr;
    padding-right: 16px;
  }

  .search {
    grid-column: 2;
    justify-self: end;
    width: 220px;
    margin-bottom: 9px;
  }

  .nav-links {
    align-self: end;
    padding-top: 12px;
  }

  .topbar::before {
    width: 195px;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: 100%;
  }

  .topbar {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px 18px 16px;
    border-radius: 0;
  }

  .topbar::before {
    width: 185px;
    height: 58px;
    bottom: auto;
  }

  .brand,
  .nav-links,
  .search {
    grid-column: 1;
    justify-self: stretch;
  }

  .brand {
    z-index: 1;
    padding-left: 6px;
  }

  .nav-links {
    justify-content: flex-end;
    gap: 18px;
    padding-top: 4px;
  }

  .search {
    width: 100%;
    margin: 0;
  }

  .breadcrumb,
  .product-layout,
  .description,
  .other-products {
    padding-left: 18px;
    padding-right: 18px;
  }

  .product-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .image-frame {
    min-height: 390px;
  }

  .product-info h1 {
    font-size: 17px;
  }

  .price {
    margin-bottom: 20px;
  }

  .btn {
    flex: 1 1 150px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 440px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: 240px;
  }

  .card img {
    width: 110px;
    height: 120px;
  }
}
