.product-details-page {
  background: var(--ap-surface, #f6f3ea);
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.product-detail {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(320px, 560px);
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(24px, 5vw, 52px) 8.5vw 36px;
  align-items: start;
  border-bottom: 1px solid rgb(190, 190, 190);
}

.product-detail-mobile {
  display: none;
}

.product-media {
  width: 100%;
  max-width: 620px;
  justify-self: end;
  display: grid;
  gap: 12px;
}

.product-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: min(620px, calc(100svh - 180px));
  background: var(--ap-surface-deep, #ede9dc);
  border: 1px solid #b9b2a7;
  overflow: hidden;
  display: grid;
  place-items: center;
  touch-action: pan-y;
}

.product-gallery-track {
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.35s ease;
  will-change: transform;
}

.product-gallery-track.is-dragging {
  transition: none;
}

.product-main-image {
  width: 100%;
  height: 100%;
  flex: 0 0 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.product-gallery-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: clamp(48px, 8vw, 84px);
  border: 0;
  background: transparent;
  color: #111;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transform: none;
}

.product-gallery-arrow:hover {
  background: rgba(245, 243, 234, 0.22);
}

.product-gallery-arrow-left {
  left: 0;
}

.product-gallery-arrow-right {
  right: 0;
}

.product-gallery-count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  min-width: 48px;
  padding: 6px 8px;
  background: rgba(17, 17, 17, 0.84);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.product-content {
  width: 100%;
  max-width: 560px;
}

.product-content h1 {
  font-size: clamp(24px, 2.1vw, 34px);
  line-height: 1;
  font-weight: 800;
  margin-bottom: 14px;
}

.product-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 22px;
  margin-bottom: 16px;
}

.product-meta div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 18px;
  line-height: 1.2;
}

.condition-meta-link {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 18px;
  line-height: 1.2;
}

.product-meta strong {
  font-size: 15px;
  font-weight: 800;
}

.product-meta span {
  font-weight: 500;
  word-break: break-word;
}

.condition-link {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.condition-link:hover {
  color: #ff563f;
}

.product-description {
  font-size: 17px;
  line-height: 1.35;
  margin-bottom: 18px;
}

.accordion {
  width: 100%;
}

.accordion-item {
  border-bottom: 1px solid #555;
}

.accordion-trigger {
  width: 100%;
  min-height: 49px;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
  cursor: pointer;
  font-size: 20px;
  font-weight: 800;
  color: #111;
}

.plus {
  flex: 0 0 auto;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.3s ease;
}

.accordion-item.open .plus {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.accordion-content p {
  font-size: 16px;
  line-height: 1.45;
  color: #444;
  padding: 0 35px 18px 0;
}

.accordion-content a {
  color: #111;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.add-to-cart {
  width: 100%;
  min-height: 74px;
  margin-top: 14px;
  background: #000;
  color: #fff;
  border: 0;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.add-to-cart:hover {
  opacity: 0.85;
}

.add-to-cart:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 1000px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 5vw;
  }

  .product-content {
    max-width: none;
  }

  .product-media {
    justify-self: center;
    max-width: 620px;
    margin: 0 auto;
  }

  .product-image-wrap {
    max-height: none;
  }
}

@media (max-width: 600px) {
  .product-detail--desktop {
    display: none;
  }

  .product-detail-mobile {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: var(--ap-surface, #f6f3ea);
    border-bottom: 1px solid #bfb8ad;
  }

  .product-mobile-head {
    width: 100%;
    min-height: 88px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(132px, 38%);
    border-top: 1px solid #cfc8bd;
    border-bottom: 1px solid #cfc8bd;
    background: #f7f7f7;
  }

  .product-mobile-head h1,
  .product-mobile-head div {
    margin: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    color: #111;
    font-weight: 800;
    line-height: 1.05;
  }

  .product-mobile-head h1 {
    padding: 10px 12px;
    border-right: 2px solid #cfcfcf;
    font-size: 30px;
    overflow-wrap: anywhere;
  }

  .product-mobile-head div {
    justify-content: center;
    padding: 10px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 20px;
  }

  .product-mobile-gallery {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: #f7f7f7;
  }

  .product-mobile-image-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-bottom: 1px solid #cfc8bd;
    touch-action: pan-y;
  }

  .product-mobile-image-wrap .product-main-image {
    object-fit: cover;
  }

  .product-mobile-image-wrap .product-gallery-arrow {
    width: 54px;
  }

  .product-mobile-actions {
    width: 100%;
    min-height: 78px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(132px, 38%);
    border-bottom: 1px solid #cfc8bd;
    background: #f7f7f7;
  }

  .product-mobile-action-condition {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 10px 14px;
    border-right: 2px solid #cfcfcf;
    color: #111;
    text-decoration: none;
    line-height: 1.1;
  }

  .product-mobile-action-condition strong {
    font-size: 16px;
    font-weight: 800;
  }

  .product-mobile-action-condition span {
    font-size: 18px;
    font-weight: 500;
    overflow-wrap: anywhere;
  }

  .product-mobile-actions form {
    min-width: 0;
  }

  .product-mobile-actions button {
    width: 100%;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
  }

  .product-mobile-actions button:disabled {
    cursor: not-allowed;
    opacity: .55;
  }

  .product-mobile-info {
    padding: 24px 28px 6px;
  }

  .product-mobile-description {
    margin: 0 0 26px;
    color: #111;
    font-size: 21px;
    line-height: 1.4;
  }

  .product-mobile-accordion .accordion-item {
    border-bottom: 1px solid #555;
  }

  .product-mobile-accordion .accordion-trigger {
    min-height: 70px;
    font-size: 25px;
    line-height: 1.15;
  }

  .product-mobile-accordion .plus {
    font-size: 34px;
  }

  .product-mobile-accordion .accordion-content p {
    padding: 0 34px 22px 0;
    font-size: 18px;
    line-height: 1.45;
  }
}

@media (max-width: 420px) {
  .product-gallery-arrow {
    width: 44px;
    height: auto;
    font-size: 30px;
  }

  .product-mobile-head {
    min-height: 74px;
    grid-template-columns: minmax(0, 1fr) minmax(126px, 40%);
  }

  .product-mobile-actions {
    min-height: 72px;
    grid-template-columns: minmax(0, 1fr) minmax(126px, 40%);
  }

  .product-mobile-info {
    padding: 24px 24px 6px;
  }

  .product-mobile-head h1 {
    font-size: 24px;
  }

  .product-mobile-head div {
    font-size: 16px;
  }

  .product-mobile-actions button {
    font-size: 14px;
  }

  .product-mobile-action-condition strong {
    font-size: 13px;
  }

  .product-mobile-action-condition span {
    font-size: 15px;
  }

  .product-mobile-description {
    font-size: 18px;
  }

  .product-mobile-accordion .accordion-trigger {
    min-height: 60px;
    font-size: 22px;
  }

  .product-mobile-accordion .plus {
    font-size: 30px;
  }

  .accordion-content p {
    padding-right: 0;
  }
}

@media (max-width: 340px) {
  .product-mobile-head,
  .product-mobile-actions {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 42%);
  }

  .product-mobile-head h1 {
    font-size: 22px;
  }

  .product-mobile-head div,
  .product-mobile-actions button {
    font-size: 13px;
  }
}
