@import url("https://fonts.googleapis.com/css2?family=Dela+Gothic+One&family=Inter:wght@400;500;600&display=swap");

:root {
  --text: #11110f;
  --muted: #686861;
  --line: #ddddda;
  --paper: #fffefa;
  --wash: #f2f2ee;
  --field: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  min-width: 320px;
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  width: 0;
}

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

button,
select,
input {
  font: inherit;
}

.site-header {
  align-items: center;
  background: rgba(255, 254, 250, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: space-between;
  padding: 22px 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-family: "Dela Gothic One", Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
}

.nav {
  display: flex;
  gap: 36px;
}

.nav a {
  font-size: 16px;
}

.nav a:hover,
.product-card:hover .product-title,
.text-button:hover:not(:disabled) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.storefront {
  margin: 96px auto 72px;
  max-width: 1040px;
  padding: 0 30px;
}

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

.product-card {
  display: block;
}

.product-image-wrap {
  align-items: center;
  aspect-ratio: 1;
  background: var(--wash);
  display: flex;
  justify-content: center;
  padding: 20px;
  position: relative;
}

.product-image-wrap img {
  background: var(--field);
  display: block;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  transition: opacity 140ms ease;
  width: 100%;
}

.product-image-wrap.is-loading img,
.shirt-image-wrap.is-loading img {
  opacity: 0;
}

.product-image-wrap.is-loading::after,
.shirt-image-wrap.is-loading::after {
  animation: image-loading 700ms linear infinite;
  border: 1px solid var(--line);
  border-top-color: var(--text);
  border-radius: 999px;
  content: "";
  height: 18px;
  left: calc(50% - 9px);
  position: absolute;
  top: calc(50% - 9px);
  width: 18px;
}

.product-meta {
  display: flex;
  font-size: 15px;
  gap: 12px;
  justify-content: space-between;
  line-height: 1.25;
  padding: 12px 2px 0;
}

.product-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.product-price {
  flex: 0 0 auto;
}

.status {
  color: var(--muted);
  font-size: 15px;
  grid-column: 1 / -1;
}

.pagination {
  align-items: center;
  display: flex;
  gap: 14px;
  grid-column: 1 / -1;
  justify-content: center;
  padding-top: 6px;
}

.page-button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  cursor: pointer;
  min-height: 30px;
  min-width: 24px;
  padding: 2px 4px;
}

.page-button[aria-current="page"] {
  border-color: var(--text);
  color: var(--text);
}

.modal-backdrop {
  align-items: center;
  background: rgba(255, 254, 250, 0.74);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 28px;
  position: fixed;
  z-index: 20;
}

.modal-backdrop[hidden] {
  display: none;
}

.thank-you-modal {
  background: var(--paper);
  border: 1px solid var(--line);
  max-width: 340px;
  padding: 28px 30px 30px;
  position: relative;
  width: 100%;
}

.thank-you-modal h1 {
  font-family: "Dela Gothic One", Arial, sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 12px;
}

.thank-you-modal p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
}

.modal-close {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 12px;
  top: 10px;
}

.about-section {
  margin: 76px 0 0;
  max-width: 560px;
}

.about-section h1 {
  font-family: "Dela Gothic One", Arial, sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 18px;
}

.about-section p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 14px;
}

.shirt-shell {
  background: var(--paper);
  min-height: calc(100vh - 66px);
  overflow: hidden;
  padding: 0;
}

.shirt-panel {
  background: var(--paper);
  min-height: calc(100vh - 66px);
  padding: 18px 42px 36px;
}

.back-link {
  bottom: 34px;
  display: inline-flex;
  font-size: 20px;
  left: 38px;
  line-height: 1;
  padding: 0;
  position: fixed;
  z-index: 11;
}

.shirt-layout {
  align-items: start;
  display: grid;
  gap: 82px;
  grid-template-columns: minmax(260px, 330px) minmax(0, 390px);
  justify-content: center;
  margin-top: 34px;
}

.shirt-gallery {
  display: grid;
  gap: 14px;
}

.shirt-image-wrap {
  align-items: center;
  aspect-ratio: 1;
  background: var(--field);
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  position: relative;
  touch-action: pan-y;
}

.gallery-controls {
  align-items: center;
  display: flex;
  font-size: 13px;
  gap: 14px;
  justify-content: center;
}

.gallery-button {
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}

.gallery-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.shirt-image-wrap img {
  background: var(--field);
  display: block;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  transition:
    opacity 140ms ease,
    transform 180ms ease;
  user-select: none;
  -webkit-user-drag: none;
  width: 100%;
  will-change: transform;
}

.shirt-image-wrap .gallery-peek {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: translate3d(100%, 0, 0);
}

.shirt-image-wrap.is-dragging img {
  cursor: grabbing;
}

@keyframes image-loading {
  to {
    transform: rotate(360deg);
  }
}

.shirt-info {
  padding-top: 0;
}

.shirt-info h1 {
  font-family: "Dela Gothic One", Arial, sans-serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 1.05;
  margin: 0 0 4px;
}

.shirt-price {
  font-size: 18px;
  margin-bottom: 58px;
}

.options {
  display: grid;
  gap: 14px;
  margin-bottom: 58px;
  max-width: 280px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.field select,
.field input {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 0;
  min-height: 38px;
  padding: 8px 11px;
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 16px,
    calc(100% - 12px) 16px;
  background-repeat: no-repeat;
  background-size: 5px 5px;
  padding-right: 34px;
}

.actions {
  align-items: center;
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
}

.text-button {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 500;
  padding: 0;
}

.text-button:disabled {
  color: var(--muted);
  cursor: default;
}

.placeholder-note {
  font-size: 18px;
  margin: 0 0 0;
}

.contact-page {
  margin: 18px auto 72px;
  max-width: 440px;
  padding: 0 28px;
}

.about-page {
  margin: 18px auto 72px;
  max-width: 620px;
  padding: 0 28px;
}

.contact-form {
  display: grid;
  gap: 20px;
  margin-top: 76px;
}

.contact-form label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 7px;
}

.contact-form input,
.contact-form textarea {
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  min-height: 40px;
  padding: 9px 10px;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form button {
  justify-self: start;
}

@media (max-width: 760px) {
  .shirt-shell {
    overflow: auto;
    scrollbar-width: none;
  }

  .shirt-shell::-webkit-scrollbar {
    width: 0;
  }

  .storefront {
    margin-top: 72px;
  }

  .about-section {
    margin-top: 82px;
  }

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

  .shirt-layout {
    gap: 34px;
    grid-template-columns: minmax(0, 320px);
  }

  .shirt-panel {
    padding: 24px 24px 44px;
  }

  .back-link {
    bottom: auto;
    left: 24px;
    position: absolute;
    top: 86px;
  }

  .shirt-info h1 {
    font-size: 32px;
  }

  .shirt-price,
  .options {
    margin-bottom: 42px;
  }
}

@media (max-width: 430px) {
  .site-header {
    padding: 20px;
  }

  .nav {
    gap: 20px;
  }

  .product-grid {
    gap: 28px 18px;
  }

  .product-meta {
    font-size: 14px;
    padding-left: 4px;
    padding-right: 4px;
  }
}

@media (min-width: 1460px) {
  .storefront {
    max-width: 1180px;
  }
}
