*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: #1b1b1b;
  background: #ffffff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font-family: inherit;
}

.product-intro {
  padding: 48px 60px 12px;
  text-align: center;
}

.product-intro__title {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.product-intro__rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8a8a8a;
  font-size: 14px;
}

.product-intro__rating strong {
  color: #1b1b1b;
  font-weight: 600;
}

.product-intro__code {
  margin-top: 6px;
  color: #8a8a8a;
  font-size: 13px;
}

.star {
  color: #d8d8d8;
  font-size: 14px;
  line-height: 1;
}

.star.is-filled {
  color: #e2b65c;
}

.product-gallery {
  overflow: hidden;
  padding: 12px 0 28px;
}

.product-gallery__stage {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-gallery__slide {
  position: absolute;
  width: min(420px, 46%);
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6f5f3;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.product-gallery__slide img {
  max-width: 86%;
  max-height: 86%;
  object-fit: contain;
}

.product-gallery__zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.product-gallery__slide.is-active {
  opacity: 1;
  z-index: 3;
  transform: scale(1);
  pointer-events: auto;
}

.product-gallery__slide.is-prev,
.product-gallery__slide.is-next {
  opacity: 0.38;
  z-index: 2;
  pointer-events: none;
}

.product-gallery__slide.is-prev {
  transform: translateX(-78%) scale(0.9);
}

.product-gallery__slide.is-next {
  transform: translateX(78%) scale(0.9);
}

.product-gallery__controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.product-gallery__swatches,
.product-buy__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 0;
  cursor: pointer;
  box-sizing: border-box;
  background-clip: padding-box;
}

.color-dot.is-active {
  border: 2px solid var(--accent, #A8632E);
  box-shadow: 0 0 0 2px #ffffff;
}

.color-dot.is-plain {
  background: #f4f1ec;
  border: 1px dashed #cfc7bb;
}

.product-gallery__pager {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: #8a8a8a;
}

.product-gallery__pager button,
.similar__arrows button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e5e5e5;
  background: #f3f3f3;
  color: #1b1b1b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.product-gallery__pager svg,
.similar__arrows svg,
.buy-heart svg,
.similar-card__heart svg {
  width: 16px;
  height: 16px;
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.7fr);
  gap: 64px;
  padding: 24px 60px 24px;
  align-items: start;
}

.product-copy h2,
.product-specs h2,
.product-reviews h2,
.similar__header h2,
.detail-cta h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 16px;
}

.product-copy p,
.review-body p {
  font-size: 15px;
  line-height: 1.7;
  color: #4a4a4a;
}

.product-specs,
.product-reviews {
  margin-top: 36px;
}

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
}

.spec-grid > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #ececec;
  font-size: 14px;
}

.spec-grid dt {
  color: #8a8a8a;
  font-weight: 400;
}

.spec-grid dd {
  font-weight: 500;
  text-align: right;
}

.spec-dots {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.spec-dots i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.review-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.review-item {
  display: flex;
  gap: 14px;
}

.review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #eee7de;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.review-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.review-date {
  display: block;
  font-size: 12px;
  color: #8a8a8a;
  margin-bottom: 8px;
}

.reviews-more {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 14px 18px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}

.review-score {
  font-size: 13px;
  color: #8a8a8a;
  font-weight: 500;
}

.reviews-empty {
  margin-bottom: 24px;
  font-size: 14px;
  color: #8a8a8a;
}

.review-notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eaf7ef;
  color: #18794e;
  font-size: 14px;
  font-weight: 500;
}

.review-list--pending {
  margin-bottom: 22px;
}

.review-item.is-pending {
  padding: 12px;
  border: 1px dashed #d8cbb8;
  border-radius: 14px;
  background: #fbf8f4;
}

.review-pending-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f4eadc;
  color: #8a5a28;
  font-size: 12px;
  font-weight: 600;
}

.review-form {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid #ececec;
}

.review-form h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
}

.review-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
}

.review-form__field input,
.review-form__field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: #1b1b1b;
  background: #ffffff;
}

.review-form__field textarea {
  resize: vertical;
  min-height: 110px;
}

.review-form__rating {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
}

.review-form__rating legend {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

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

.review-form__star {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
}

.review-form__star:has(input:checked) {
  border-color: #1b1b1b;
  background: #f7f5f2;
}

.review-form__star input {
  accent-color: #1b1b1b;
}

.review-form__error {
  color: #b42318;
  font-size: 12px;
  font-weight: 400;
}

.review-form__submit {
  height: 46px;
  padding: 0 20px;
  border: none;
  border-radius: 12px;
  background: #1b1b1b;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.product-buy {
  position: sticky;
  top: 108px;
}

.product-buy__card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  border: 1px solid #e7e4df;
  border-radius: 14px;
  padding: 28px 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(27, 27, 27, 0.08);
}

.product-buy__top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.product-buy__price {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0;
}

.product-buy__card .product-stock {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
}

.product-buy__card .product-stock.is-in-stock {
  color: #18794e;
  background: #eaf7ef;
}

.product-buy__card .product-stock.is-out-of-stock {
  color: #9b4236;
  background: #f6eeec;
}

.product-buy__colors {
  display: flex;
  flex-direction: column;
}

.product-buy__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}

.product-buy__swatches {
  gap: 12px;
}

.product-buy__swatches .color-dot {
  width: 26px;
  height: 26px;
}

.product-buy__facts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

.product-buy__facts li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #4a4a4a;
}

.product-buy__facts svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.product-buy__cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.product-qty {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #faf9f7;
}

.product-qty button {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  font-size: 18px;
  color: #1b1b1b;
}

.product-qty span {
  min-width: 28px;
  text-align: center;
  font-weight: 600;
}

.similar-card__add {
  margin-top: 10px;
  width: 100%;
  height: 38px;
  border: 1px solid #1b1b1b;
  border-radius: 10px;
  background: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.buy-request {
  width: 100%;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  background: var(--accent, #A8632E);
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.buy-request:hover {
  filter: brightness(1.05);
}

.buy-heart,
.similar-card__heart {
  width: 52px;
  height: 52px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #ffffff;
  color: #1b1b1b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.buy-heart.is-active,
.similar-card__heart.is-active {
  color: #c45c4a;
}

.buy-heart.is-active svg path,
.similar-card__heart.is-active svg path {
  fill: currentColor;
}

.similar {
  padding: 32px 0 48px;
}

.similar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  margin-bottom: 24px;
}

.similar__header h2 {
  font-size: 32px;
  margin: 0;
}

.similar__arrows {
  display: flex;
  gap: 10px;
}

.similar__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 0 60px;
}

.similar__track::-webkit-scrollbar {
  display: none;
}

.similar-card {
  position: relative;
  flex: 0 0 270px;
}

.similar-card__link {
  display: flex;
  flex-direction: column;
  color: inherit;
}

.similar-card__image {
  display: block;
  aspect-ratio: 1;
  background: #f6f5f3;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
}

.similar-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
}

.similar-card strong {
  font-size: 16px;
  font-weight: 600;
}

.similar-card__swatches {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.similar-card__swatches i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.similar-card__heart {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
}

.detail-cta {
  padding: 24px 60px 80px;
}

.detail-cta h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 28px;
}

.detail-cta__banner {
  position: relative;
  height: 420px;
  border-radius: 24px;
  overflow: hidden;
}

.detail-cta__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-cta__actions {
  position: absolute;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

.detail-cta__btn {
  min-width: 180px;
  height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.detail-cta__btn--light {
  background: #ffffff;
  color: #1b1b1b;
}

.detail-cta__btn--dark {
  background: rgba(70, 48, 36, 0.72);
  color: #ffffff;
}

@media (max-width: 1024px) {
  .product-intro,
  .product-layout,
  .similar__header,
  .similar__track,
  .detail-cta {
    padding-left: 32px;
    padding-right: 32px;
  }

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

  .product-buy {
    position: static;
  }

  .product-gallery__stage {
    height: 320px;
  }

  .product-gallery__slide {
    height: 280px;
  }

  .detail-cta__banner {
    height: 320px;
  }
}

@media (max-width: 768px) {
  .product-intro,
  .product-layout,
  .similar__header,
  .similar__track,
  .detail-cta {
    padding-left: 20px;
    padding-right: 20px;
  }

  .product-intro__title {
    font-size: 32px;
  }

  .product-gallery__slide.is-prev,
  .product-gallery__slide.is-next {
    display: none;
  }

  .product-gallery__slide {
    width: 86%;
  }

  .spec-grid {
    grid-template-columns: 1fr;
  }

  .similar__header h2,
  .detail-cta h2 {
    font-size: 26px;
  }

  .similar-card {
    flex: 0 0 min(78vw, 260px);
  }

  .detail-cta__actions {
    flex-direction: column;
    width: calc(100% - 40px);
  }

  .detail-cta__banner {
    height: 260px;
  }
}

.gallery-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  border: 0;
  padding: 24px 56px;
  background: transparent;
  overflow: visible;
}

.gallery-dialog::backdrop {
  background: rgba(20, 18, 16, 0.72);
}

.gallery-dialog img {
  width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: 16px;
  background: #f6f5f3;
}

.gallery-dialog__close,
.gallery-dialog__nav,
.reviews-dialog__close {
  position: absolute;
  border: 0;
  background: #ffffff;
  color: #1b1b1b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gallery-dialog__close,
.reviews-dialog__close {
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  z-index: 2;
}

.gallery-dialog__nav {
  top: 50%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transform: translateY(-50%);
}

.gallery-dialog__nav svg {
  width: 18px;
  height: 18px;
}

.gallery-dialog__nav--prev {
  left: 8px;
}

.gallery-dialog__nav--next {
  right: 8px;
}

.reviews-dialog {
  width: min(1120px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  margin: auto;
  border: 0;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.reviews-dialog::backdrop {
  background: rgba(20, 18, 16, 0.45);
}

.reviews-dialog__card {
  position: relative;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(27, 27, 27, 0.12);
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 36px 32px 32px;
}

.reviews-dialog__layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.reviews-dialog__average {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 8px 0 10px;
}

.reviews-dialog__stars .star {
  font-size: 18px;
}

.reviews-dialog__count {
  margin: 8px 0 22px;
  color: #8a8a8a;
  font-size: 14px;
}

.reviews-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reviews-bars__row {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: #8a8a8a;
}

.reviews-bars__track {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: #efefef;
  overflow: hidden;
}

.reviews-bars__track i {
  display: block;
  height: 100%;
  background: #1b1b1b;
  border-radius: inherit;
}

.reviews-dialog__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.reviews-dialog__toolbar strong {
  font-size: 16px;
}

.reviews-sort {
  position: relative;
}

.reviews-sort__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #ffffff;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.reviews-sort__toggle svg {
  width: 16px;
  height: 16px;
}

.reviews-sort__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 3;
  min-width: 180px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(27, 27, 27, 0.1);
}

.reviews-sort__menu button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.reviews-sort__menu button:hover {
  background: #f7f5f2;
}

.reviews-dialog__search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 0 14px;
  height: 48px;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  background: #fafafa;
}

.reviews-dialog__search svg {
  width: 18px;
  height: 18px;
  color: #8a8a8a;
  flex-shrink: 0;
}

.reviews-dialog__search input {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.reviews-dialog__list {
  gap: 0;
}

.reviews-dialog__list .review-item {
  padding: 18px 0;
  border-bottom: 1px solid #f0eeea;
}

.reviews-dialog__empty {
  color: #8a8a8a;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .reviews-dialog__layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .gallery-dialog {
    padding: 48px 12px 12px;
  }

  .gallery-dialog__nav {
    display: none;
  }

  .reviews-dialog__card {
    padding: 28px 18px 20px;
    border-radius: 18px;
  }

  .reviews-dialog__average {
    font-size: 40px;
  }
}
