:root {
  --black: #000000;
  --white: #FDFDFD;
  --line: #e7e7e7;
  --sidebar: 250px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: "Inter", Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

a {
  text-decoration: none;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  padding: 30px 26px 24px;
  background: var(--white);
  border-right: 1px solid var(--line);
}

.brand {
  display: block;
  width: 132px;
  height: 34px;
}

.brand img,
.mobile-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
  margin-top: 72px;
}

.sidebar-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
}

.sidebar-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--black);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.sidebar-nav a:hover::after,
.sidebar-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.sidebar-foot {
  margin: auto 0 0;
  color: #777;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mobile-header {
  display: none;
}

.store {
  min-height: 100vh;
  margin-left: var(--sidebar);
  padding: 30px;
}

.store-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}

.store-heading h1,
.store-heading p {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.store-heading p {
  color: #777;
  font-size: 10px;
}

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

.product-card {
  min-width: 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

.product-open {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.product-image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #fff;
}

.product-image::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 0, 0, 0.045);
  content: "";
  pointer-events: none;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: scale(var(--piece-scale, 1));
  transform-origin: center;
  transition: opacity 220ms ease, transform 320ms cubic-bezier(0.2, 0.7, 0, 1);
}

.product-open:hover .product-image img,
.product-open:focus-visible .product-image img {
  opacity: 0.88;
}

.product-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding-top: 11px;
}

.product-meta h2,
.product-meta p {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
}

.product-meta p {
  white-space: nowrap;
}

.product-colors-preview {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}

.mini-swatch {
  width: 8px;
  height: 8px;
  border: 1px solid #d1d1d1;
  border-radius: 50%;
}

.product-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(380px, 0.55fr);
  overflow: auto;
  background: var(--white);
}

.product-view[hidden] {
  display: none;
}

.detail-close {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 60;
  padding: 5px 0;
  background: transparent;
  cursor: pointer;
}

.detail-close span {
  display: inline-block;
  margin-left: 8px;
  font-size: 18px;
  line-height: 0;
}

.detail-gallery {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 34px;
  border-right: 1px solid var(--line);
}

.detail-image-wrap {
  position: relative;
  width: min(68vh, 74%);
  aspect-ratio: 3 / 4;
}

.detail-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 1;
  transform: scale(var(--piece-scale, 1));
  transform-origin: center;
  transition: opacity 150ms ease, transform 320ms cubic-bezier(0.2, 0.7, 0, 1);
}

.detail-image-wrap img.is-changing {
  opacity: 0;
}

.image-index {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.detail-info {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  padding: 86px 40px 42px;
}

.detail-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.detail-title-row h2,
.detail-title-row p {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
}

.detail-title-row p {
  white-space: nowrap;
}

.choice-block {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.choice-label {
  margin: 0 0 13px;
  color: #777;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.color-options,
.size-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-button {
  position: relative;
  display: grid;
  width: clamp(32px, 2.6vw, 36px);
  height: clamp(32px, 2.6vw, 36px);
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.color-button::before {
  width: clamp(16px, 1.3vw, 18px);
  height: clamp(16px, 1.3vw, 18px);
  border: 1px solid #cecece;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  content: "";
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 280ms ease;
}

.color-button::after {
  position: absolute;
  inset: 2px;
  border: 1px solid var(--black);
  border-radius: 50%;
  content: "";
  opacity: 0;
  transform: scale(0.68);
  transition: opacity 220ms ease, transform 360ms cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.color-button:hover {
  transform: translateY(-2px);
}

.color-button:hover::before {
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.14);
  transform: scale(1.08);
}

.color-button.is-active::before {
  transform: scale(0.84);
}

.color-button.is-active::after {
  opacity: 1;
  transform: scale(1);
  animation: swatch-ring-in 420ms cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes swatch-ring-in {
  0% {
    opacity: 0;
    transform: scale(0.58);
  }
  68% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.size-list span {
  min-width: 28px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  text-align: center;
  font-size: 11px;
}

.product-specs {
  margin: 0 0 28px;
}

.product-specs div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.product-specs dt,
.product-specs dd {
  margin: 0;
  font-size: 11px;
}

.product-specs dt {
  color: #777;
}

.buy-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px;
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  transition: opacity 180ms ease;
}

.buy-button:hover,
.buy-button:focus-visible {
  opacity: 0.76;
}

.buy-note {
  margin: 10px 0 0;
  color: #777;
  font-size: 9px;
  line-height: 1.45;
}

:focus-visible {
  outline: 1px solid var(--black);
  outline-offset: 3px;
}

@media (max-width: 1080px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-view {
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  }

  .detail-image-wrap {
    width: 82%;
  }
}

@media (max-width: 760px) {
  :root {
    --mobile-header: 65px;
  }

  .sidebar {
    display: none;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    height: var(--mobile-header);
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }

  .mobile-brand {
    display: block;
    width: 96px;
    height: 28px;
  }

  .menu-toggle {
    padding: 8px 0 8px 10px;
    background: transparent;
    cursor: pointer;
  }

  .mobile-menu {
    position: absolute;
    top: var(--mobile-header);
    right: 0;
    left: 0;
    display: flex;
    max-height: 0;
    flex-direction: column;
    gap: 17px;
    overflow: hidden;
    padding: 0 18px;
    background: var(--white);
    border-bottom: 0 solid var(--line);
    opacity: 0;
    transition: max-height 260ms ease, padding 260ms ease, opacity 180ms ease;
  }

  .mobile-menu.is-open {
    max-height: 220px;
    padding-top: 20px;
    padding-bottom: 24px;
    border-bottom-width: 1px;
    opacity: 1;
  }

  .store {
    margin-left: 0;
    padding: 22px 12px 40px;
  }

  .store-heading {
    margin: 0 6px 20px;
  }

  .product-grid {
    gap: 32px 8px;
  }

  .product-meta {
    display: block;
    padding: 9px 4px 0;
  }

  .product-meta h2,
  .product-meta p {
    font-size: 10px;
  }

  .product-meta p {
    margin-top: 3px;
  }

  .product-colors-preview {
    padding-left: 4px;
  }

  .product-view {
    display: block;
  }

  .product-view[hidden] {
    display: none;
  }

  .detail-close {
    top: 15px;
    right: 16px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.9);
  }

  .detail-gallery {
    min-height: auto;
    padding: 56px 12px 16px;
    border-right: 0;
  }

  .detail-image-wrap {
    width: min(100%, 470px);
  }

  .detail-info {
    min-height: auto;
    padding: 24px 18px 48px;
  }

  .color-button {
    width: 38px;
    height: 38px;
  }

  .color-button::before {
    width: 18px;
    height: 18px;
  }

  .detail-title-row h2,
  .detail-title-row p {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
