.back-catalog { color: #99999f; text-transform: uppercase; font: 10px var(--mono); }
.detail-shell { width: min(1320px, calc(100% - 48px)); margin-inline: auto; padding-top: 35px; }
.breadcrumb { display: flex; gap: 8px; align-items: center; color: #696970; text-transform: uppercase; font: 8px var(--mono); padding: 12px 0 30px; }
.breadcrumb a:hover { color: white; }
.product-detail { display: grid; grid-template-columns: 1.08fr .92fr; min-height: 680px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #111113; }
.detail-gallery { position: relative; min-height: 680px; background: #1a1a1c; overflow: hidden; }
.detail-gallery > img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
.detail-gallery::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 62%, rgba(0,0,0,.35)); }
.detail-badge { position: absolute; z-index: 2; top: 22px; left: 22px; border-radius: 5px; padding: 8px 10px; background: white; color: #111; font: 600 8px var(--mono); text-transform: uppercase; }
.image-index { position: absolute; z-index: 2; bottom: 21px; left: 23px; color: rgba(255,255,255,.75); font: 9px var(--mono); }
.detail-copy { padding: clamp(45px, 5vw, 80px); display: flex; flex-direction: column; align-items: flex-start; }
.detail-category { color: var(--blue-light); text-transform: uppercase; font: 600 9px var(--mono); letter-spacing: .08em; }
.detail-copy h1 { font-size: clamp(60px, 6vw, 92px); margin: 22px 0 20px; }
.detail-rating { display: flex; gap: 8px; align-items: center; color: #83838a; font: 9px var(--mono); }
.detail-rating strong { color: #e9e9ec; }
.detail-rating i { color: var(--blue-light); font-style: normal; }
.detail-price-row { width: 100%; display: flex; align-items: end; justify-content: space-between; padding: 28px 0; margin-top: 15px; border-block: 1px solid var(--line); }
.detail-price { font: 400 45px var(--display); }
.detail-price-row small { color: #6f6f75; text-align: right; font: 8px/1.5 var(--mono); text-transform: uppercase; }
.detail-description { color: #939399; line-height: 1.75; font-size: 13px; margin: 25px 0; }
.detail-options { width: 100%; display: grid; gap: 11px; margin-bottom: 27px; }
.detail-options div { display: flex; justify-content: space-between; align-items: center; color: #7d7d84; text-transform: uppercase; font: 9px var(--mono); }
.detail-options strong { color: #cacacf; font-weight: 500; }
.detail-actions { display: grid; grid-template-columns: 1fr 52px; width: 100%; gap: 9px; }
.detail-actions .btn { width: 100%; }
.detail-save { border: 1px solid #3b3b40; border-radius: 8px; background: transparent; cursor: pointer; display: grid; place-items: center; }
.detail-save svg { width: 19px; fill: none; stroke: white; stroke-width: 1.7; }
.detail-save.saved { background: var(--blue); border-color: var(--blue); }
.detail-save.saved svg { fill: white; }
.disclosure { color: #64646a; font: 8px/1.6 var(--mono); text-transform: uppercase; margin-top: 15px; }
.details-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; padding: 110px 0; border-bottom: 1px solid var(--line); }
.details-lower h2, .related h2 { font-size: clamp(46px, 5vw, 68px); margin: 14px 0 24px; }
.buying-notes { display: grid; }
.buying-notes div { display: grid; grid-template-columns: 34px 1fr; gap: 14px; border-top: 1px solid var(--line); padding: 18px 0; }
.buying-notes div:last-child { border-bottom: 1px solid var(--line); }
.buying-notes span { color: var(--blue-light); font: 600 9px var(--mono); }
.buying-notes p { margin: 0; color: #a0a0a6; font-size: 12px; }
.seller-panel { background: #151517; border: 1px solid var(--line); border-radius: 15px; padding: 30px; align-self: start; }
.seller-head { display: flex; align-items: center; gap: 14px; }
.seller-avatar { width: 48px; height: 48px; border-radius: 12px; background: var(--blue); display: grid; place-items: center; font: 400 20px var(--display); }
.seller-head h3 { margin: 0 0 5px; font-size: 15px; }
.seller-head span { color: #77777d; font: 8px var(--mono); text-transform: uppercase; }
.seller-stats { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 26px; border-top: 1px solid var(--line); }
.seller-stats div { padding-top: 20px; display: grid; gap: 5px; }
.seller-stats strong { font: 400 23px var(--display); }
.seller-stats span { color: #6e6e74; font: 7px var(--mono); text-transform: uppercase; }
.related { padding: 100px 0 130px; }
.related-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 35px; }
.related-head a { color: #aaaab0; font: 9px var(--mono); text-transform: uppercase; }
.related-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.related-card .product-image { aspect-ratio: .86; }
.related-card .product-image a { display: block; width: 100%; height: 100%; }
.related-card .product-image img { width: 100%; height: 100%; object-fit: cover; }
.error-page { min-height: 65vh; display: grid; place-items: center; text-align: center; padding: 80px 20px; }
.error-page h1 { font-size: clamp(70px, 12vw, 150px); }
.error-page p { color: var(--muted); }
.detail-footer { padding-top: 75px; }

@media (max-width: 900px) {
  .product-detail { grid-template-columns: 1fr; }
  .detail-gallery { min-height: 580px; }
  .related-grid { grid-template-columns: repeat(2,1fr); gap: 24px 10px; }
}
@media (max-width: 760px) {
  .back-catalog { display: none; }
  .detail-shell { width: min(100% - 24px, 680px); padding-top: 18px; }
  .breadcrumb { padding-bottom: 18px; }
  .product-detail { border-radius: 14px; }
  .detail-gallery { min-height: 420px; }
  .detail-copy { padding: 36px 23px; }
  .detail-copy h1 { font-size: 58px; }
  .details-lower { grid-template-columns: 1fr; padding: 75px 0; gap: 50px; }
  .related { padding: 75px 0 90px; }
  .related-head { align-items: flex-start; flex-direction: column; }
}

/* Product detail v2: Kakobuy ordering flow */
.product-detail-v2 { grid-template-columns: minmax(0,1.08fr) minmax(420px,.92fr); }
.detail-gallery-v2 { display: flex; flex-direction: column; min-height: 720px; background: #0d0d0f; }
.detail-gallery-v2::after { display: none; }
.gallery-main { position: relative; min-height: 0; flex: 1; overflow: hidden; background: #19191b; }
.gallery-main > img { width: 100%; height: 100%; min-height: 615px; object-fit: cover; filter: saturate(.88); }
.gallery-main::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg,transparent 70%,rgba(0,0,0,.42)); }
.gallery-arrow { position: absolute; z-index: 3; top: 50%; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(8,8,9,.72); color: white; cursor: pointer; transform: translateY(-50%); font: 15px var(--mono); backdrop-filter: blur(10px); }
.gallery-arrow:hover { background: var(--blue); border-color: var(--blue); }
.gallery-prev { left: 18px; }
.gallery-next { right: 18px; }
.gallery-thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: 82px; gap: 8px; overflow-x: auto; padding: 11px; border-top: 1px solid var(--line); scrollbar-width: thin; }
.gallery-thumb { width: 82px; height: 82px; padding: 0; border: 1px solid transparent; border-radius: 8px; overflow: hidden; background: #1b1b1e; cursor: pointer; opacity: .58; }
.gallery-thumb.active { border-color: var(--blue-light); opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-copy-v2 { padding: clamp(34px,4vw,62px); }
.detail-copy-v2 h1 { font-size: clamp(54px,5.1vw,80px); margin: 19px 0 17px; }
.product-source-id { margin-left: auto; color: #626269; }
.dual-price { margin-top: 13px; }
.dual-price > div { display: flex; align-items: baseline; gap: 13px; }
.detail-price-cny { color: #f1f1f4; font: 400 31px var(--display); }
.detail-price-cny + .detail-price { color: var(--blue-light); font-size: 30px; }
.detail-selectors { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 0 0 10px; }
.detail-selector { display: grid; gap: 8px; color: #85858b; text-transform: uppercase; font: 8px var(--mono); }
.detail-selector select { width: 100%; height: 48px; border: 1px solid #37373c; border-radius: 7px; outline: none; background: #171719; color: #c9c9ce; padding: 0 12px; font: 9px var(--mono); }
.detail-selector select:focus { border-color: var(--blue); }
.selector-note { margin: 0 0 18px; color: #606067; font: 7px/1.6 var(--mono); text-transform: uppercase; }
.kakobuy-buy { min-height: 54px; font-size: 9px; }
.detail-secondary-actions { width: 100%; display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 9px; }
.detail-secondary-actions a,.detail-secondary-actions button,.detail-secondary-actions span { min-height: 39px; display: flex; align-items: center; justify-content: center; border: 1px solid #343439; border-radius: 6px; background: #171719; color: #9b9ba1; cursor: pointer; text-align: center; text-transform: uppercase; font: 7px var(--mono); }
.detail-secondary-actions button { width: 100%; }
.detail-secondary-actions a:hover,.detail-secondary-actions button:hover { border-color: #56565d; color: white; }
.order-flow { width: 100%; margin-top: 16px; padding: 14px 15px; border: 1px solid rgba(88,137,255,.22); border-radius: 8px; background: rgba(88,137,255,.06); }
.order-flow span { display: block; margin-bottom: 6px; color: var(--blue-light); text-transform: uppercase; font: 600 7px var(--mono); }
.order-flow p { margin: 0; color: #85858b; font: 8px/1.55 var(--mono); }
.seller-source-link { display: flex; justify-content: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); color: #909096; text-transform: uppercase; font: 8px var(--mono); }
.mobile-buy-bar { display: none; }

@media (max-width: 900px) {
  .product-detail-v2 { grid-template-columns: 1fr; }
  .detail-gallery-v2 { min-height: auto; }
  .gallery-main > img { min-height: 600px; max-height: 760px; }
}
@media (max-width: 760px) {
  body { padding-bottom: 74px; }
  .gallery-main > img { min-height: 430px; max-height: 530px; }
  .gallery-thumbs { grid-auto-columns: 66px; }
  .gallery-thumb { width: 66px; height: 66px; }
  .detail-copy-v2 h1 { font-size: 51px; }
  .detail-selectors { grid-template-columns: 1fr; }
  .detail-secondary-actions { grid-template-columns: 1fr 1fr; }
  .detail-secondary-actions > :first-child { grid-column: span 2; }
  .mobile-buy-bar { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 14px; border-top: 1px solid #35353a; background: rgba(12,12,14,.95); backdrop-filter: blur(18px); }
  .mobile-buy-bar > div { display: grid; gap: 2px; }
  .mobile-buy-bar strong { font: 400 25px var(--display); }
  .mobile-buy-bar span { color: #73737a; text-transform: uppercase; font: 7px var(--mono); }
  .mobile-buy-bar a { min-width: 150px; min-height: 48px; display: grid; place-items: center; border-radius: 7px; background: var(--blue); color: white; text-transform: uppercase; font: 8px var(--mono); }
}

/* Small-screen resilience for long imported product titles and metadata */
.breadcrumb { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.breadcrumb::-webkit-scrollbar { display: none; }
.detail-copy h1, .product-info h3 { overflow-wrap: anywhere; }
.detail-rating { flex-wrap: wrap; }
@media (max-width: 760px) {
  .detail-price-row { align-items: flex-start; flex-direction: column; gap: 10px; }
  .detail-price-row small { text-align: left; }
  .product-source-id { width: 100%; margin-left: 0; }
}
