/* 高端珠宝商品侧边栏组件样式 */

.jewelry-product-sidebar {
    --jewelry-gold: #af94da;
    --jewelry-gold-light: #d7c2f8;
    --jewelry-gold-dark: #af94da;
    --jewelry-black: #1a1a1a;
    --jewelry-gray: #666666;
    --jewelry-light-gray: #f8f8f8;
    --jewelry-white: #ffffff;
    --jewelry-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --jewelry-shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.15);
    --jewelry-border-radius: 12px;
    --jewelry-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.jewelry-product-sidebar__container {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

.jewelry-product-sidebar__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    gap: 32px;
}

/* 产品图片展示区 */
.jewelry-product-sidebar__media {
    flex: 1;
    max-width: 100%;
    width: 100%;
}

.jewelry-product-sidebar__main-image {
    position: relative;
    width: 100%;
    height: 500px;
    margin-bottom: 20px;
    border-radius: var(--jewelry-border-radius);
    overflow: hidden;
    background: linear-gradient(135deg, var(--jewelry-light-gray) 0%, #f0f0f0 100%);
}

.jewelry-product-sidebar__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--jewelry-transition);
}

.jewelry-product-sidebar__image:hover {
    transform: scale(1.05);
}

.jewelry-product-sidebar__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--jewelry-light-gray) 0%, #f0f0f0 100%);
}

.jewelry-product-sidebar__thumbnails {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px;
}

.jewelry-product-sidebar__thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--jewelry-transition);
}

.jewelry-product-sidebar__thumbnail:hover {
    border-color: var(--jewelry-gold);
    transform: translateY(-2px);
}

.jewelry-product-sidebar__thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* 产品信息区 */
.jewelry-product-sidebar__info {
    flex: 1;
    max-width: 100%;
    width: 100%;
    padding-left: 0;
}

.jewelry-product-sidebar__title {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--jewelry-black);
    margin: 0 0 24px 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.jewelry-product-sidebar__price {
    margin-bottom: 32px;
}

.jewelry-product-sidebar__price-sale {
    font-size: 2rem;
    font-weight: 600;
    color: var(--jewelry-gold);
    margin-right: 12px;
}

.jewelry-product-sidebar__price-compare {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--jewelry-gray);
    text-decoration: line-through;
}

.jewelry-product-sidebar__price-regular {
    font-size: 2rem;
    font-weight: 600;
    color: var(--jewelry-gold);
}

.jewelry-product-sidebar__description {
    margin-bottom: 40px;
    color: var(--jewelry-gray);
    line-height: 1.6;
    font-size: 1.1rem;
}

.jewelry-product-sidebar__description p {
    margin: 0;
}

/* 详细信息链接 */
.jewelry-product-sidebar__details-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}


/* 入口采用横线样式（去盒子） */
.jewelry-product-sidebar__detail-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--jewelry-black);
    cursor: pointer;
    transition: var(--jewelry-transition);
    text-align: left;
    width: auto;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--jewelry-black);
}

.jewelry-product-sidebar__detail-link:hover {
    border-bottom-color: var(--jewelry-black);
    transform: translateY(-1px);
}

/* 简化图标样式，配合横线风格 */
.jewelry-product-sidebar__detail-icon {
    display: none;
}

.jewelry-product-sidebar__detail-text {
    flex: 1;
    font-weight: 500;
}

.jewelry-product-sidebar__detail-arrow {
    font-size: 1.2rem;
    color: var(--jewelry-black);
    transition: var(--jewelry-transition);
}

.jewelry-product-sidebar__detail-link:hover .jewelry-product-sidebar__detail-arrow {
    transform: translateX(4px);
}

/* 侧边栏详情面板 */
.jewelry-product-sidebar__panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 400px;
    height: 100vh;
    background: var(--jewelry-white);
    z-index: 1000;
    transition: var(--jewelry-transition);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.jewelry-product-sidebar__panel.active {
    right: 0;
}

.jewelry-product-sidebar__panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid var(--jewelry-light-gray);
    background: linear-gradient(135deg, var(--jewelry-gold-light) 0%, var(--jewelry-white) 100%);
}

.jewelry-product-sidebar__panel-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--jewelry-black);
    margin: 0;
}

.jewelry-product-sidebar__panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--jewelry-transition);
    color: var(--jewelry-gray);
}

.jewelry-product-sidebar__panel-close:hover {
    background: var(--jewelry-light-gray);
    color: var(--jewelry-black);
}

.jewelry-product-sidebar__panel-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

@media screen and (min-width: 960px) {

    /* 桌面端：左右边框加粗，增强视觉承托 */
    .jewelry-product-sidebar__panel-content {
        border-left: 2px solid rgba(0, 0, 0, 0.12);
        border-right: 2px solid rgba(0, 0, 0, 0.12);
    }
}

.jewelry-product-sidebar__detail-section {
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--jewelry-transition);
}

.jewelry-product-sidebar__detail-section.active {
    opacity: 1;
    transform: translateY(0);
}

.jewelry-product-sidebar__detail-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--jewelry-black);
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--jewelry-gold);
    position: relative;
}

.jewelry-product-sidebar__detail-section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--jewelry-gold-dark);
}

.jewelry-product-sidebar__detail-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.jewelry-product-sidebar__detail-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--jewelry-light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--jewelry-gold);
    transition: var(--jewelry-transition);
}

.jewelry-product-sidebar__detail-item:hover {
    background: var(--jewelry-gold-light);
    transform: translateX(4px);
}

.jewelry-product-sidebar__detail-label {
    font-weight: 600;
    color: var(--jewelry-black);
    min-width: 80px;
    margin-right: 16px;
}

.jewelry-product-sidebar__detail-value {
    color: var(--jewelry-gray);
    font-weight: 500;
}

/* 遮罩层 */
.jewelry-product-sidebar__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--jewelry-transition);
}

.jewelry-product-sidebar__overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .jewelry-product-sidebar__main {
        flex-direction: column;
        padding: 24px;
        gap: 24px;
    }

    .jewelry-product-sidebar__media,
    .jewelry-product-sidebar__info {
        max-width: 100%;
    }

    .jewelry-product-sidebar__main-image {
        height: 400px;
    }

    .jewelry-product-sidebar__title {
        font-size: 2rem;
    }

    .jewelry-product-sidebar__panel {
        width: 100%;
        right: -100%;
    }
}

/* 桌面端宽度按视口的 33.33%，1920px 下为 640px */
@media screen and (min-width: 960px) {
    .jewelry-product-sidebar__panel {
        width: min(40vw, 768px);
    }
}

@media (max-width: 768px) {
    .jewelry-product-sidebar__container {
        margin: 0;
        border-radius: 0;
    }

    .jewelry-product-sidebar__main {
        padding: 16px;
    }

    .jewelry-product-sidebar__main-image {
        height: 300px;
    }

    .jewelry-product-sidebar__title {
        font-size: 1.8rem;
    }

    .jewelry-product-sidebar__price-sale,
    .jewelry-product-sidebar__price-regular {
        font-size: 1.5rem;
    }

    .jewelry-product-sidebar__price-compare {
        font-size: 1.2rem;
    }

    .jewelry-product-sidebar__detail-link {
        padding: 16px 20px;
        font-size: 1rem;
    }

    .jewelry-product-sidebar__detail-icon {
        width: 36px;
        height: 36px;
        margin-right: 12px;
    }

    .jewelry-product-sidebar__panel-header {
        padding: 20px 24px;
    }

    .jewelry-product-sidebar__panel-content {
        padding: 24px;
    }

    .jewelry-product-sidebar__detail-section-title {
        font-size: 1.2rem;
    }

    .jewelry-product-sidebar__detail-item {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .jewelry-product-sidebar__detail-label {
        min-width: auto;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .jewelry-product-sidebar__thumbnails {
        gap: 8px;
    }

    .jewelry-product-sidebar__thumbnail {
        width: 60px;
        height: 60px;
    }

    .jewelry-product-sidebar__title {
        font-size: 1.5rem;
    }

    .jewelry-product-sidebar__details-links {
        gap: 12px;
    }

    .jewelry-product-sidebar__detail-link {
        padding: 14px 16px;
    }
}

/* 动画效果 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jewelry-product-sidebar__panel.active {
    animation: slideInRight 0.3s ease-out;
}

.jewelry-product-sidebar__detail-section.active {
    animation: fadeIn 0.4s ease-out;
}

/* 滚动条样式 */
.jewelry-product-sidebar__panel-content::-webkit-scrollbar {
    width: 6px;
}

.jewelry-product-sidebar__panel-content::-webkit-scrollbar-track {
    background: var(--jewelry-light-gray);
}

.jewelry-product-sidebar__panel-content::-webkit-scrollbar-thumb {
    background: var(--jewelry-gold);
    border-radius: 3px;
}

.jewelry-product-sidebar__panel-content::-webkit-scrollbar-thumb:hover {
    background: var(--jewelry-gold-dark);
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .jewelry-product-sidebar {
        --jewelry-gold: #000000;
        --jewelry-gold-light: #f0f0f0;
        --jewelry-gold-dark: #000000;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .jewelry-product-sidebar * {
        transition: none !important;
        animation: none !important;
    }
}