/* 2cbuy productDetail desktop + mobile */

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: #fff;
  color: #111;
  font-family: "League Spartan", system-ui, sans-serif;
  overflow-x: hidden;
  max-width: 100%;
}
button, a { font-family: inherit; }

.pd-page {
  min-height: 100vh;
  background: #fff;
  color: #111;
}

.pd-m-nav {
  display: none;
}

.pd-top {
  border-bottom: 1px solid #eee;
  background: #fff;
}

.pd-top-inner {
  max-width: 1226px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pd-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
}

.pd-logo span {
  color: #fe5437;
}

.pd-logo img {
  height: 36px;
  width: auto;
}

.pd-top-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.pd-top-right a {
  color: inherit;
  text-decoration: none;
}

.pd-wrap {
  max-width: 1226px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

.pd-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 18px;
  color: #111;
  text-decoration: none;
  cursor: pointer;
}

.pd-hero {
  display: grid;
  grid-template-columns: 630px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.pd-gallery {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: sticky;
  top: 20px;
}

.pd-thumbs {
  width: 80px;
  max-height: 500px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none;
}

.pd-thumbs::-webkit-scrollbar {
  display: none;
}

.pd-thumbs button {
  width: 80px;
  height: 80px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  overflow: hidden;
  background: #f6f6f6;
  cursor: pointer;
  flex: 0 0 auto;
}

.pd-thumbs button.active {
  border-color: #fe5437;
}

.pd-thumbs img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  display: block;
}

.pd-stage {
  width: 500px;
  max-width: calc(100% - 92px);
}

.pd-main {
  width: 500px;
  max-width: 100%;
  height: 500px;
  border-radius: 10px;
  overflow: hidden;
  background: #f6f6f6;
  position: relative;
}

.pd-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #f6f6f6;
}

.pd-num {
  display: none;
}

.pd-info {
  padding: 0 20px;
  min-width: 0;
}

.pd-title {
  font-size: 32px;
  line-height: 1.25;
  margin: 15px 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.pd-price {
  font-size: 28px;
  color: #fe5437;
  font-weight: 800;
  margin: 0 0 20px;
  line-height: 1;
}

.pd-sub {
  display: none;
}

.pd-cat {
  margin-top: 10px;
}

.pd-cat-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.pd-swatches,
.pd-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 10px;
}

.pd-swatch {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: #f6f6f6;
  cursor: pointer;
}

.pd-swatch.active,
.pd-size.active {
  border-color: #fe5437 !important;
  background: #f6f6f6;
  color: #fe5437;
}

.pd-swatch img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

.pd-size {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 14px;
}

.pd-ops {
  padding: 10px 0 0;
  display: flex;
  flex-direction: column;
}

.pd-buy,
.pd-fav {
  width: 100%;
  height: 45px;
  margin-bottom: 10px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.pd-buy {
  border: 1px solid transparent;
  background: #fe5437;
  color: #fff;
  order: 1;
}

.pd-fav {
  border: 1px solid #fe5437;
  background: #fff;
  color: #fe5437;
  order: 2;
}

.pd-fav.active {
  background: #fff5f3;
}

.pd-section {
  margin-top: 30px;
  background: #fff;
}

.pd-h {
  font-weight: 600;
  font-size: 25px;
  margin: 10px 0 12px;
}

.pd-qc-sec {
  padding: 8px 0 4px;
}

.pd-qc-head {
  padding: 0 2px;
}

.pd-qc-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pd-qc-title {
  margin: 0;
  color: #111;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pd-qc-title::after {
  content: "›";
  font-size: 26px;
  font-weight: 400;
  color: #888;
  line-height: 1;
  transform: translateY(-1px);
}

.pd-qc-viewall {
  color: #6b7280;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.pd-qc-viewall:hover {
  color: #111;
}

.pd-qc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.pd-qc-tab {
  border: 0;
  background: #f3f4f6;
  color: #374151;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}

.pd-qc-tab.is-on {
  background: #111;
  color: #fff;
}

.pd-qc-scroller-wrap {
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.pd-qc-scroller {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0 2px 8px;
  scrollbar-width: none;
  min-width: 0;
  max-width: 100%;
  overscroll-behavior-x: contain;
}

.pd-qc-scroller::-webkit-scrollbar {
  display: none;
}

.pd-qc-card {
  flex: 0 0 210px;
  width: 210px;
  scroll-snap-align: start;
  background: #fff;
  cursor: pointer;
  text-align: left;
  border: 0;
  padding: 0;
}

.pd-qc-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f3f3f3;
  border-radius: 10px;
  overflow: hidden;
}

.pd-qc-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pd-qc-cap {
  margin-top: 8px;
}

.pd-qc-sku {
  font-size: 13px;
  font-weight: 600;
  color: #111;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.pd-qc-meta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #16a34a;
  font-size: 12px;
  font-weight: 600;
}

.pd-qc-shots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.pd-qc-shots svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.pd-qc-next {
  position: absolute;
  top: 92px;
  right: 6px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  color: #111;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.pd-qc-next[hidden] {
  display: none;
}

.pd-qc-lb {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.pd-qc-lb[hidden] {
  display: none;
}

.pd-qc-lb img {
  max-width: min(78vw, 1100px);
  max-height: 82vh;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.pd-qc-lb-close,
.pd-qc-lb-nav {
  position: absolute;
  z-index: 20;
  border: 0;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
}

.pd-qc-lb-close {
  top: 16px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 28px;
}

.pd-qc-lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
}

.pd-qc-lb-nav.prev { left: 16px; }
.pd-qc-lb-nav.next { right: 16px; }

.pd-qc-lb-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  color: #fff;
  font-size: 13px;
}

.pd-details {
  background: #fefefe;
  border-radius: 18px 18px 0 0;
}

.pd-details img,
.pd-detail-item,
.pd-detail-item img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

.pd-detail-item {
  line-height: 0;
}

.pd-empty {
  color: #888;
  padding: 24px 0;
}

@media (max-width: 1100px) {
  .pd-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .pd-gallery {
    position: static;
  }

  .pd-stage,
  .pd-main {
    width: 100%;
    max-width: 500px;
  }

  .pd-main {
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 768px) {
  .pd-top,
  .pd-back {
    display: none;
  }

  .pd-m-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #eee;
  }

  .pd-m-back {
    position: absolute;
    left: 12px;
    top: 0;
    height: 60px;
    display: flex;
    align-items: center;
    font-size: 36px;
    line-height: 1;
    color: #333;
    text-decoration: none;
    padding: 0 8px;
  }

  .pd-m-logo {
    font-weight: 800;
    font-size: 22px;
    color: #111;
    text-decoration: none;
  }

  .pd-m-logo span {
    color: #fe5437;
  }

  .pd-wrap {
    padding: 60px 0 62px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .pd-hero {
    grid-template-columns: 1fr;
    gap: 0;
    min-width: 0;
    max-width: 100%;
  }

  .pd-gallery {
    flex-direction: column;
    gap: 0;
    position: static;
  }

  .pd-thumbs {
    display: none;
  }

  .pd-stage,
  .pd-main {
    width: 100%;
    max-width: none;
  }

  .pd-main {
    height: 360px;
    max-height: 360px;
    border-radius: 0;
    background: #f6f6f6;
  }

  .pd-num {
    display: block;
    position: absolute;
    right: 14px;
    bottom: 20px;
    z-index: 2;
    width: 60px;
    padding: 2px 0;
    border-radius: 9999px;
    background: #00000040;
    color: #fff;
    font-size: 12px;
    text-align: center;
    box-sizing: border-box;
  }

  .pd-info {
    display: flex;
    flex-direction: column;
    padding: 0;
    min-width: 0;
    max-width: 100%;
  }

  .pd-style-block {
    order: 1;
    margin: 0;
    padding: 8px 10px 0;
    border-bottom: 1px solid #dedede;
  }

  .pd-style-block .pd-cat-label {
    display: none;
  }

  .pd-swatches {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    padding: 0 0 15px;
    scrollbar-width: none;
  }

  .pd-swatches::-webkit-scrollbar {
    display: none;
  }

  .pd-swatch {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    padding: 4px;
    border: 1px solid #dedede;
    border-radius: 12px;
    background: #fff;
  }

  .pd-swatch img {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .pd-price {
    order: 2;
    font-size: 18px;
    font-weight: 600;
    margin: 10px 10px 0;
    padding-bottom: 0;
  }

  .pd-title {
    order: 3;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.2em;
    margin: 10px 10px 10px;
    -webkit-line-clamp: 2;
    padding-bottom: 10px;
    border-bottom: 1px solid #dedede;
  }

  .pd-size-block {
    order: 4;
    margin: 0;
    padding: 10px 10px 0;
  }

  .pd-ops {
    order: 5;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    flex-direction: row;
    align-items: center;
    width: 100%;
    max-width: 100%;
    height: 50px;
    margin: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: none;
    border-top: 1px solid #eee;
    box-sizing: border-box;
  }

  .pd-fav {
    order: 1;
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    margin: 0 20px 0 0;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 25px;
    font-weight: 500;
  }

  .pd-fav-text {
    display: none;
  }

  .pd-fav.active {
    color: #fe5437;
    background: #fff;
  }

  .pd-buy {
    order: 2;
    flex: 1;
    width: auto;
    height: 40px;
    margin: 0;
    border-radius: 6px;
    font-size: 1.125rem;
    font-weight: 600;
  }

  .pd-section {
    margin-top: 10px;
    padding: 0 10px;
    min-width: 0;
    max-width: 100%;
  }

  .pd-qc-sec.pd-section {
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
  }

  .pd-qc-head {
    padding: 0 10px;
  }

  .pd-qc-scroller {
    padding: 0 10px 8px;
  }

  .pd-h {
    font-size: 16px;
    font-weight: 700;
    margin: 8px 0 10px;
  }

  .pd-qc-title {
    font-size: 18px;
  }

  .pd-qc-card {
    flex-basis: 168px;
    width: 168px;
  }

  .pd-qc-next {
    top: 72px;
  }

  .pd-qc-lb img {
    max-width: 72vw;
    max-height: 70vh;
  }
  .pd-qc-lb-nav {
    width: 52px;
    height: 52px;
  }

  .pd-details {
    margin-top: 10px;
    padding: 0;
    border-radius: 18px 18px 0 0;
    overflow-x: hidden;
  }

  .pd-details img,
  .pd-detail-item,
  .pd-detail-item img {
    max-width: 100%;
    height: auto;
  }

  .pd-details .pd-h {
    margin-left: 12px;
    font-weight: 600;
  }
}

.pd-buy-mask {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.pd-buy-mask.open {
  display: flex !important;
  pointer-events: auto;
}

.pd-buy-dialog {
  width: min(560px, 100%);
  max-height: 80vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  padding: 22px 18px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.pd-buy-title {
  margin: 0 0 16px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.pd-buy-empty {
  padding: 28px 12px;
  color: #888;
  text-align: center;
}

.pd-buy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.pd-buy-row img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex: 0 0 36px;
}

.pd-buy-meta {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pd-buy-name {
  font-weight: 700;
  font-size: 16px;
}

.pd-buy-code {
  color: #8a8a8a;
  font-size: 13px;
}

.pd-buy-go {
  margin-left: auto;
  color: #fe5437;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.pd-buy-close {
  display: none;
}

@media (max-width: 768px) {
  .pd-buy-mask {
    align-items: flex-end;
    padding: 0;
    background: rgba(0, 0, 0, 0.4);
  }

  .pd-buy-dialog {
    width: 100%;
    max-height: 78vh;
    border-radius: 16px 16px 0 0;
    padding: 10px 14px 0;
    box-shadow: none;
  }

  .pd-buy-title {
    display: none;
  }

  .pd-buy-row {
    margin: 0;
    padding: 10px 2px;
    border-radius: 0;
    box-shadow: none;
  }

  .pd-buy-row img {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .pd-buy-name {
    font-weight: 600;
    font-size: 15px;
  }

  .pd-buy-row:has(.pd-buy-code) .pd-buy-name {
    display: none;
  }

  .pd-buy-code {
    display: inline;
    color: #111;
    font-size: 15px;
    font-weight: 600;
  }

  .pd-buy-go {
    background: #fe5437;
    color: #fff;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
  }

  .pd-buy-close {
    display: block;
    width: calc(100% + 28px);
    margin: 8px -14px 0;
    height: 48px;
    border: none;
    background: #f3f3f3;
    color: #9a9a9a;
    font-size: 16px;
    cursor: pointer;
  }
}
