@font-face {
  font-family: "Easy";
  src: url("../../assets/fonts/Easy.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Pixel";
  src: url("../../assets/fonts/Pixel.ttf") format("truetype");
  font-display: swap;
}

:root {
  --page-bg: #ffffff;
  --text-main: #000000;
  --line-soft: rgba(0, 0, 0, 0.14);
  --button-bg: #242424;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--page-bg);
  color: var(--text-main);
  font-family: "Pixel", monospace;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.product-page {
  min-height: 100vh;
  padding: 24px 28px 44px;
}

.product-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.back-link {
  font-size: 2rem;
  line-height: 1;
}

.brand-mark img {
  width: 118px;
}

.product-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
  width: min(100%, 1500px);
  margin: 0 auto;
}

.product-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 76px;
}

.product-image-card {
  width: min(100%, 720px);
  margin: 0;
}

.product-image-back {
  width: min(78%, 560px);
}

.product-image-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.purchase-panel {
  position: sticky;
  top: 112px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 160px;
}

.info-trigger,
.product-price,
.size-label,
.size-select,
.purchase-button,
.overlay-close,
.overlay-copy {
  font-family: "Pixel", monospace;
  color: #000000;
}

.info-trigger {
  align-self: flex-end;
  width: 60px;
  height: 60px;
  border: 2px solid rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  background: transparent;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

.product-price,
.size-label,
.size-select,
.purchase-button,
.overlay-close,
.overlay-copy {
  margin: 0;
  font-size: 1.19rem;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

.overlay-copy {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.5;
  letter-spacing: 0.08em;
}


.size-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.size-select {
  width: 100%;
  border: 1px solid var(--line-soft);
  background: #ffffff;
  padding: 12px 14px;
  outline: none;
}

.purchase-button {
  width: 100%;
  border: 1px solid var(--button-bg);
  background: var(--button-bg);
  color: #ffffff;
  padding: 16px 18px;
  cursor: pointer;
}

.info-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.397);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, visibility 160ms ease;
}

.info-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.overlay-panel {
  position: relative;
  min-height: 100vh;
  padding: 28px;
}

.overlay-close {
  position: absolute;
  top: 28px;
  right: 28px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.overlay-title {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 120px;
  margin: 0;
  color: #000000;
  font-family: "Easy", sans-serif;
  font-size: 5.5rem;
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.overlay-copy {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 42px;
  max-width: 620px;
}

@media (max-width: 900px) {
  .product-page {
    padding: 18px 16px 36px;
  }

  .product-topbar {
    margin-bottom: 22px;
  }

  .brand-mark img {
    width: 88px;
  }

  .back-link {
    font-size: 1.9rem;
  }

  .product-stage {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }

  .product-media {
    gap: 42px;
  }

  .product-image-card,
  .product-image-back {
    width: 100%;
  }

  .purchase-panel {
    position: static;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding-top: 0;
    gap: 14px;
  }

  .info-trigger {
    align-self: flex-end;
    width: 56px;
    height: 56px;
    font-size: 2rem;
  }

  .purchase-button {
    min-height: 54px;
  }

  .overlay-panel {
    padding: 18px 16px 28px;
  }

  .overlay-close {
    top: 18px;
    right: 16px;
  }

  .overlay-title {
    left: 16px;
    right: 16px;
    bottom: 100px;
    font-size: 3.2rem;
  }

  .overlay-copy {
    left: 16px;
    right: 16px;
    bottom: 32px;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .product-price,
  .size-label,
  .size-select,
  .purchase-button,
  .overlay-close,
  .overlay-copy {
    font-size: 1.5rem;
  }

  .overlay-title {
    font-size: 2.5rem;
  }
}
