.pdp-grid {
    display: grid;
    grid-template-columns: 70px 1fr 360px;
    gap: 20px;
    align-items: start;
    margin-bottom: 0;
    width: 100%;
}
.pdp-grid::after {
    content: '';
    display: table;
    clear: both;
}
.pdp-grid + .pdp-tabs {
    clear: both;
    width: 100%;
}

.pdp-thumbs-scroll {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}
.pdp-thumbs-scroll::-webkit-scrollbar { width: 4px; }
.pdp-thumbs-scroll::-webkit-scrollbar-thumb { background: var(--wk-border); border-radius: 2px; }
.pdp-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--wk-border);
    transition: border-color .2s;
    flex-shrink: 0;
    background: var(--wk-bg);
}
.pdp-thumb.active {
    border-color: var(--wk-purple);
    border-width: 2px;
}
.pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdp-main-image {
    width: 100%;
    display: flex;
    justify-content: center;
}
.pdp-main-img-wrap {
    position: relative;
    background: var(--wk-bg);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--wk-border);
    width: 600px;
    height: 600px;
    max-width: 100%;
    aspect-ratio: 1;
    touch-action: pan-y;
    /* 占位背景：浅色 + 微模糊效果，图片加载前显示 */
    background: #f3f0eb;
}
.pdp-main-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .25s ease;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}
.pdp-main-img-wrap.dragging { cursor: grabbing; }
.pdp-main-img-wrap:not(.dragging) { cursor: grab; }
.pdp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.9);
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
    transition: all .2s;
    color: #333;
    padding: 0;
    line-height: 1;
    z-index: 10;
}
.pdp-arrow:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.pdp-arrow-left { left: 12px; }
.pdp-arrow-right { right: 12px; }

.pdp-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: zoom-out;
}
.pdp-lightbox.open {
    display: flex;
}
.pdp-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
    transition: opacity .15s ease;
}
.pdp-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    z-index: 1001;
    padding: 0;
    width: 44px;
    height: 44px;
}
.pdp-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: background .2s;
}
.pdp-lightbox-nav:hover {
    background: rgba(255,255,255,.3);
}
.pdp-lightbox-prev { left: 20px; }
.pdp-lightbox-next { right: 20px; }

.pdp-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.pdp-cat {
    font-size: 12px;
    color: var(--wk-purple);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.pdp-cat a {
    color: inherit;
    text-decoration: none;
    transition: opacity .15s;
}
.pdp-cat a:hover { opacity: .7; }
.pdp-brand-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--wk-muted, #666);
    transition: color .15s;
}
.pdp-brand a:hover .pdp-brand-name { color: var(--wk-purple); }
.pdp-title {
    font-size: 16px;
    font-weight: 900;
    line-height: 1.3;
    margin: 0;
    color: var(--wk-text);
}
.pdp-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.pdp-rating-text {
    color: var(--wk-muted);
    font-weight: 600;
}
.pdp-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-top: 1px solid var(--wk-border);
    border-bottom: 1px solid var(--wk-border);
}
.pdp-price-current {
    font-size: 36px;
    font-weight: 700;
    line-height: 44px;
    white-space: nowrap;
    color: var(--wk-text);
}
.pdp-price-orig {
    font-size: 16px;
    color: var(--wk-muted);
    text-decoration: line-through;
    font-weight: 600;
}
.pdp-discount {
    background: #fef2f2;
    color: #ef4444;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
}

.pdp-colors {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pdp-color-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
}
.pdp-color-name {
    color: var(--wk-purple);
    font-weight: 800;
}
.pdp-color-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.pdp-color-selector { margin-bottom: 16px; }
.pdp-color-label { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--wk-text); }
.pdp-color-label .pdp-color-name { font-weight: 600; color: var(--wk-purple); }
.pdp-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.pdp-swatch {
    width: 48px; height: 48px;
    border-radius: 8px;
    border: 2px solid var(--wk-border);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: border-color .2s;
}
.pdp-swatch.active { border-color: var(--wk-purple); }
.pdp-swatch:hover { border-color: var(--wk-purple); }
.pdp-swatch img { width: 100%; height: 100%; object-fit: cover; }
.pdp-swatch-text {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: #fff; font-weight: 700;
}

.pdp-actions {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.pdp-qty {
    display: flex;
    align-items: center;
    border: 2px solid var(--wk-border);
    border-radius: 8px;
    overflow: hidden;
}
.pdp-qty button {
    width: 40px;
    height: 44px;
    border: none;
    background: var(--wk-surface);
    font-size: 18px;
    cursor: pointer;
    font-family: var(--font);
    font-weight: 700;
    color: var(--wk-text);
}
.pdp-qty button:hover {
    background: var(--wk-bg);
}
.pdp-qty input {
    width: 48px;
    height: 44px;
    border: none;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font);
    background: transparent;
    color: var(--wk-text);
}
.pdp-qty input:focus { outline: none; }
.pdp-add-btn {
    flex: 1;
    background: var(--wk-purple);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    font-family: var(--font);
    transition: all .2s;
    padding: 0 20px;
}
/* SKU 名小字仅手机端固定栏内显示 */
.pdp-add-sku { display: none; }

/* 未选 SKU 点加购：色块区高亮提醒 */
.pdp-swatches.wk-sku-alert {
    animation: wkSkuPulse .55s ease-in-out 3;
    border-radius: 10px;
}
@keyframes wkSkuPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0); }
    50% { box-shadow: 0 0 0 5px rgba(124, 58, 237, .45); }
}
.pdp-add-btn:hover:not(:disabled) {
    background: #7c3aed;
    transform: translateY(-1px);
}
.pdp-add-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.pdp-share {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
}
.pdp-share-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--wk-muted);
    white-space: nowrap;
}
.pdp-share-btns {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}
.pdp-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
}
.pdp-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.pdp-share-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}
.pdp-share-icon-copy {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
}
.pdp-share-fb { background: #1877f2; }
.pdp-share-fb:hover { background: #166fe5; }
.pdp-share-pin { background: #e60023; }
.pdp-share-pin:hover { background: #cc001f; }
.pdp-share-tw { background: #000; }
.pdp-share-tw:hover { background: #333; }
.pdp-share-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.pdp-share-ig:hover { opacity: .9; }
.pdp-share-yt { background: #ff0000; }
.pdp-share-yt:hover { background: #e60000; }
.pdp-share-tt { background: #000; }
.pdp-share-tt:hover { background: #333; }
.pdp-share-copy {
    background: var(--wk-surface);
    color: var(--wk-muted);
    border: 2px solid var(--wk-border);
}
.pdp-share-copy:hover {
    background: var(--wk-bg);
    color: var(--wk-text);
    border-color: var(--wk-purple);
}
.pdp-share-copy.copied {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

.pdp-sku {
    font-size: 12px;
    color: var(--wk-muted);
}
.pdp-sku span {
    font-family: var(--font-mono);
    font-weight: 600;
}

.pdp-desc {
    color: var(--wk-muted);
    line-height: 1.7;
    font-size: 14px;
}

.pdp-full-desc div {
    color: var(--wk-muted);
    line-height: 1.8;
    font-size: 14px;
}

.ql-rich-content { color: #333; line-height: 1.8; font-size: 15px; word-wrap: break-word; overflow: hidden; }
.ql-rich-content * {
    max-width: 100% !important;
    box-sizing: border-box !important;
    float: none !important;
}
.ql-rich-content div {
    width: auto !important;
    height: auto !important;
    display: block !important;
}
.ql-rich-content h1 { font-size: 1.8em; font-weight: 800; margin: 1em 0 0.5em; color: #111; }
.ql-rich-content h2 { font-size: 1.4em; font-weight: 800; margin: 1.2em 0 0.5em; color: #111; }
.ql-rich-content h3 { font-size: 1.2em; font-weight: 700; margin: 1em 0 0.4em; color: #222; }
.ql-rich-content p { margin: 0.8em 0; }
.ql-rich-content ul, .ql-rich-content ol { margin: 0.8em 0; padding-left: 1.8em; }
.ql-rich-content li { margin: 0.4em 0; }
.ql-rich-content a { color: #7c3aed; text-decoration: underline; }
.ql-rich-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; }
.ql-rich-content blockquote { border-left: 4px solid #ddd; margin: 1em 0; padding: 0.5em 1em; color: #666; background: #f9f9f9; }
.ql-rich-content strong { font-weight: 700; }
.ql-rich-content em { font-style: italic; }
.ql-rich-content u { text-decoration: underline; }

.pdp-related {
    margin-top: 60px;
    clear: both;
    width: 100%;
    float: none;
}
.pdp-related h2 {
    font-size: 22px;
    font-weight: 900;
    margin: 0 0 8px;
}

.pdp-attr-group {
    margin-bottom: 24px;
}
.pdp-attr-group-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--wk-text);
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--wk-border);
}
.pdp-attr-list {
    width: 100%;
    border-collapse: collapse;
}
.pdp-attr-list th,
.pdp-attr-list td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--wk-border);
    font-size: 14px;
}
.pdp-attr-list th {
    width: 40%;
    color: var(--wk-muted);
    font-weight: 700;
    background: var(--wk-bg);
}
.pdp-attr-list td {
    color: var(--wk-text);
    font-weight: 600;
}

.pdp-tabs {
    margin-top: 60px;
    clear: both;
    width: 100%;
}
.pdp-tab-content {
    overflow: hidden;
}
.pdp-tabs-header {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--wk-border);
    margin-bottom: 24px;
}
.pdp-tab-btn {
    background: none;
    border: none;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    color: var(--wk-muted);
    cursor: pointer;
    font-family: var(--font);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
}
.pdp-tab-btn:hover {
    color: var(--wk-text);
}
.pdp-tab-btn.active {
    color: var(--wk-purple);
    border-bottom-color: var(--wk-purple);
}
.pdp-tab-content {
    animation: tabFadeIn .3s ease;
}
@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.pdp-reviews {
    margin-top: 60px;
}
.pdp-reviews-summary {
    display: flex;
    gap: 40px;
    align-items: center;
    padding: 24px;
    background: var(--wk-surface);
    border: 2px solid var(--wk-border);
    border-radius: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.pdp-reviews-avg {
    text-align: center;
    min-width: 140px;
}
.pdp-reviews-avg-num {
    font-size: 42px;
    font-weight: 900;
    color: #f59e0b;
    line-height: 1;
}
.pdp-reviews-avg-stars {
    color: #f59e0b;
    font-size: 18px;
    letter-spacing: 2px;
    margin-top: 4px;
}
.pdp-reviews-avg-count {
    font-size: 12px;
    color: var(--wk-muted);
    margin-top: 4px;
}
.pdp-reviews-bars {
    flex: 1;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pdp-review-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pdp-review-bar-label {
    font-size: 12px;
    color: var(--wk-muted);
    min-width: 30px;
}
.pdp-review-bar-track {
    flex: 1;
    height: 8px;
    background: var(--wk-bg);
    border-radius: 4px;
    overflow: hidden;
}
.pdp-review-bar-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: 4px;
    transition: width .3s;
}
.pdp-review-bar-count {
    font-size: 12px;
    color: var(--wk-muted);
    min-width: 30px;
    text-align: right;
}
.pdp-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.pdp-review-item {
    padding: 20px;
    background: var(--wk-surface);
    border: 2px solid var(--wk-border);
    border-radius: 12px;
}
.pdp-review-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.pdp-review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}
.pdp-review-content {
    flex: 1;
    min-width: 0;
}
.pdp-review-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.pdp-review-name {
    font-weight: 800;
    font-size: 14px;
}
.pdp-review-badge {
    font-size: 10px;
    background: #d1fae5;
    color: #065f46;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}
.pdp-review-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.pdp-review-stars {
    color: #f59e0b;
    letter-spacing: 1px;
}
.pdp-review-date {
    font-size: 11px;
    color: var(--wk-muted);
}
.pdp-review-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}
.pdp-review-body {
    font-size: 13px;
    line-height: 1.7;
    color: var(--wk-text);
    white-space: pre-line;
    word-break: break-word;
}
.pdp-review-images {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.pdp-review-img-wrap {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--wk-border);
}
.pdp-review-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pdp-review-reply {
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--wk-bg);
    border-radius: 8px;
    border-left: 3px solid var(--wk-purple);
}
.pdp-review-reply-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--wk-purple);
    margin-bottom: 4px;
}
.pdp-review-reply-body {
    font-size: 12px;
    line-height: 1.6;
    color: var(--wk-text);
    white-space: pre-line;
    word-break: break-word;
}
.pdp-reviews-empty {
    text-align: center;
    padding: 40px;
    background: var(--wk-surface);
    border: 2px solid var(--wk-border);
    border-radius: 12px;
}
.pdp-reviews-empty-icon {
    font-size: 48px;
    opacity: .2;
    margin-bottom: 12px;
}
.pdp-reviews-empty-title {
    font-weight: 700;
    color: var(--wk-text);
    margin: 0;
}
.pdp-reviews-empty-desc {
    font-size: 13px;
    color: var(--wk-muted);
    margin-top: 4px;
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .pdp-grid {
        grid-template-columns: 60px 1fr 300px;
        gap: 16px;
    }
    .pdp-thumb {
        width: 50px;
        height: 50px;
    }
    .pdp-thumbs-scroll {
        max-height: 500px;
    }
    .pdp-main-img-wrap {
        width: 100%;
        height: auto;
    }
    .pdp-title { font-size: 16px; }
    .pdp-price-current { font-size: 36px; }
}

@media (max-width: 768px) {
    .pdp-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .pdp-thumbs {
        order: 2;
        position: static;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-width: 0;
        overflow: hidden;
    }
    .pdp-thumbs-scroll {
        flex-direction: row;
        flex-wrap: nowrap;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding-right: 0;
        padding-bottom: 4px;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .pdp-thumb {
        width: 56px;
        height: 56px;
    }
    .pdp-main-image {
        order: 1;
        position: static;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .pdp-main-img-wrap {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        border: 2px solid var(--wk-border);
        border-radius: 8px;
        overflow: hidden;
        background: var(--wk-bg);
    }
    .pdp-main-img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
        max-height: none;
    }
    .pdp-info {
        order: 3;
    }
    .pdp-title { font-size: 16px; }
    .pdp-price-current { font-size: 36px; }
    /* Sticky bottom bar: qty stepper + add to cart pinned to viewport bottom */
    body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
    .pdp-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        background: var(--wk-surface);
        border-top: 1px solid var(--wk-border);
        box-shadow: 0 -4px 16px rgba(0,0,0,.08);
        /* 空白区域点击穿透：被栏盖住的 SKU 色块仍可点中，避免"以为切了 SKU 实际没切" */
        pointer-events: none;
    }
    .pdp-actions > * { pointer-events: auto; }
    .pdp-qty {
        flex-shrink: 0;
    }
    .pdp-qty button { width: 36px; height: 44px; }
    .pdp-qty input { width: 40px; height: 44px; }
    .pdp-add-btn {
        flex: 1;
        height: 56px;
        padding: 0 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        line-height: 1.15;
    }
    /* 按钮内实时显示当前 SKU 名：切没切中一目了然 */
    .pdp-add-sku {
        display: block;
        max-width: 100%;
        font-size: 11px;
        font-weight: 700;
        opacity: .85;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .pdp-add-label { font-size: 15px; }
    .pdp-share {
        justify-content: flex-start;
    }
    .pdp-share-btn {
        width: 32px;
        height: 32px;
    }
    .pdp-share-btns {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .wk-section {
        padding: 24px 0;
    }
    .wk-container {
        padding: 0 16px;
    }
    .pdp-grid {
        gap: 12px;
    }
    .pdp-thumb {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }
    .pdp-thumbs-scroll {
        gap: 8px;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .pdp-title { font-size: 16px; }
    .pdp-price-current { font-size: 36px; }
    .pdp-price {
        padding: 10px 0;
    }
    .pdp-arrow {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    .pdp-arrow-left { left: 8px; }
    .pdp-arrow-right { right: 8px; }
    /* 触控目标加大；滚动定位时避开底部固定栏 */
    .pdp-swatch { width: 44px; height: 44px; }
    .pdp-swatches { scroll-margin-bottom: 96px; }
    .pdp-tab-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    .pdp-reviews-summary {
        flex-direction: column;
        gap: 20px;
        padding: 16px;
    }
    .pdp-reviews-avg {
        min-width: auto;
    }
    .pdp-share-btn {
        width: 30px;
        height: 30px;
    }
    .pdp-share-btns {
        gap: 5px;
    }
    .pdp-share-icon {
        width: 14px;
        height: 14px;
    }
    .pdp-share-label {
        font-size: 12px;
    }

    /* Attribute table: scrollable on mobile to prevent overflow */
    .pdp-attr-group {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .pdp-attr-list {
        min-width: 400px;
    }
    .pdp-attr-list th,
    .pdp-attr-list td {
        padding: 8px 10px;
        font-size: 13px;
        white-space: nowrap;
    }

    /* Related products: ensure grid doesn't overflow */
    .pdp-related .wk-product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* Description: prevent long words from overflowing */
    .pdp-desc, .pdp-full-desc {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    .pdp-full-desc img {
        max-width: 100%;
        height: auto;
    }

    /* Prevent horizontal overflow on PDP page */
    .pdp-tabs, .pdp-related {
        overflow: hidden;
    }
    .pdp-grid {
        width: 100%;
        box-sizing: border-box;
    }

    /* Main image: ensure full border visible */
    .pdp-main-img-wrap {
        touch-action: pan-y;
        overflow: hidden;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }
    .pdp-main-image {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Ensure main image container doesn't exceed viewport width */
    .pdp-main-img-wrap img {
        max-width: 100%;
        width: 100%;
        height: 100%;
        display: block;
    }

    /* Thumb scroll: prevent horizontal overflow */
    .pdp-thumbs-scroll {
        -webkit-overflow-scrolling: touch;
    }

    /* Title: break long words */
    .pdp-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* Share buttons: wrap on mobile */
    .pdp-share-btns {
        flex-wrap: wrap;
    }
}

/* ── Message the seller ── */
.pdp-msg-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    padding: 4px 10px;
    border: 1.5px solid var(--wk-purple);
    border-radius: 999px;
    background: transparent;
    color: var(--wk-purple);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, color .2s;
    flex-shrink: 0;
}
.pdp-msg-btn:hover { background: var(--wk-purple); color: #fff; }
.pdp-msg-btn svg { display: block; }

/* Right-side conversation drawer */
.pdp-chat-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    transition: opacity .25s;
}
.pdp-chat-overlay.show { opacity: 1; }
.pdp-chat-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 9999;
    height: 100vh;
    height: 100dvh;
    width: min(400px, 100vw);
    background: var(--wk-surface, #fff);
    box-shadow: -12px 0 40px rgba(0, 0, 0, .18);
    display: flex;
    flex-direction: column;
    transform: translateX(105%);
    transition: transform .28s cubic-bezier(.32, .72, 0, 1);
}
.pdp-chat-drawer.open { transform: translateX(0); }

.pdp-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--wk-border);
    flex-shrink: 0;
}
.pdp-chat-head-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pdp-chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wk-purple), var(--wk-pink));
    color: #fff;
    font-weight: 900;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pdp-chat-head-text { min-width: 0; }
.pdp-chat-shopname {
    font-size: 15px;
    font-weight: 900;
    color: var(--wk-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pdp-chat-sub { font-size: 11px; color: var(--wk-muted); font-weight: 600; }
.pdp-chat-close {
    border: none;
    background: none;
    color: var(--wk-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    flex-shrink: 0;
}
.pdp-chat-close:hover { background: var(--wk-bg, #f5f3f0); color: var(--wk-text); }

.pdp-chat-product {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 16px 0;
    padding: 10px;
    border: 1px solid var(--wk-border);
    border-radius: 12px;
    flex-shrink: 0;
    min-width: 0;
}
.pdp-chat-product img,
.pdp-chat-noimg {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--wk-bg, #f5f3f0);
    flex-shrink: 0;
}
.pdp-chat-pinfo { min-width: 0; }
.pdp-chat-pname {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: var(--wk-text);
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pdp-chat-pname:hover { color: var(--wk-purple); }
.pdp-chat-pprice { font-size: 12px; font-weight: 800; color: var(--wk-purple); margin-top: 2px; }

.pdp-chat-notice {
    font-size: 11px;
    color: var(--wk-muted);
    line-height: 1.5;
    padding: 10px 16px 0;
    flex-shrink: 0;
}

.pdp-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
}
.pdp-chat-empty {
    margin: auto;
    text-align: center;
    font-size: 13px;
    color: var(--wk-muted);
    font-weight: 600;
}
.pdp-chat-row { max-width: 82%; }
.pdp-chat-row.me { align-self: flex-end; }
.pdp-chat-row.them { align-self: flex-start; }
.pdp-chat-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.5;
    font-weight: 600;
    word-break: break-word;
    white-space: pre-wrap;
}
.pdp-chat-row.me .pdp-chat-bubble {
    background: var(--wk-purple);
    color: #fff;
    border-bottom-right-radius: 5px;
}
.pdp-chat-row.them .pdp-chat-bubble {
    background: var(--wk-bg, #f3f0eb);
    color: var(--wk-text);
    border-bottom-left-radius: 5px;
}
.pdp-chat-time {
    font-size: 10.5px;
    color: var(--wk-muted);
    margin-top: 3px;
}
.pdp-chat-row.me .pdp-chat-time { text-align: right; }

.pdp-chat-error {
    margin: 0 16px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #ef4444;
    border-radius: 8px;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.pdp-chat-input {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--wk-border);
    flex-shrink: 0;
}
.pdp-chat-input textarea {
    flex: 1;
    min-width: 0;
    resize: none;
    max-height: 120px;
    padding: 10px 14px;
    border: 2px solid var(--wk-border);
    border-radius: 22px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    outline: none;
    line-height: 1.4;
    box-sizing: border-box;
}
.pdp-chat-input textarea:focus { border-color: var(--wk-purple); }
.pdp-chat-send {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wk-purple), var(--wk-pink));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity .2s;
}
.pdp-chat-send:disabled { opacity: .5; cursor: default; }

@media (max-width: 600px) {
    .pdp-chat-drawer { width: 100vw; }
}