/**
 * 产品详情面板样式 - 与 Liora 主风格一致
 */

/* 产品信息按钮 */
.pi-trigger-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-mono);
    transition: all 0.2s ease;
    z-index: 1000;
}

.pi-trigger-btn:hover {
    border-color: var(--color-memory);
    color: var(--color-memory);
    background: var(--color-memory-light);
}

/* ============================================
   页面加载动画
   ============================================ */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.page-loader-logo {
    width: 64px;
    height: 64px;
    animation: loaderPulse 1.8s ease-in-out infinite;
}

@keyframes loaderPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.92); opacity: 0.7; }
}

.page-loader-text {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--color-text-secondary);
    letter-spacing: 1px;
}

.page-loader-bar {
    width: 120px;
    height: 2px;
    background: var(--color-border-light);
    overflow: hidden;
    border-radius: 1px;
}

.page-loader-progress {
    width: 40%;
    height: 100%;
    background: var(--color-memory);
    animation: loaderSlide 1.2s ease-in-out infinite;
}

@keyframes loaderSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

/* ============================================
   欢迎弹窗（首次访问）
   ============================================ */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.welcome-overlay.show {
    opacity: 1;
    visibility: visible;
}

.welcome-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: 460px;
    max-width: calc(100vw - 32px);
    max-height: 90vh;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.welcome-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.welcome-content {
    padding: 32px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.welcome-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-light);
}

.welcome-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: contain;
}

.welcome-title {
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font-serif);
    color: var(--color-text);
    letter-spacing: 1px;
}

.welcome-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-text-secondary);
    font-family: var(--font-sans);
}

.welcome-lead {
    font-size: 15px;
    color: var(--color-text);
    font-weight: 500;
}

.welcome-highlight {
    color: var(--color-memory);
    font-weight: 600;
}

.welcome-closing {
    font-style: italic;
    color: var(--color-text);
    font-family: var(--font-serif);
    padding-top: 8px;
    border-top: 1px dashed var(--color-border-light);
}

.welcome-close-btn {
    width: 100%;
    padding: 12px;
    background: var(--color-memory);
    color: #fff;
    border: none;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-transform: uppercase;
    flex-shrink: 0;
}

.welcome-close-btn:hover {
    background: #6a5b7a;
}

/* 移动端欢迎弹窗 */
@media (max-width: 768px) {
    .welcome-content {
        padding: 24px;
    }

    .welcome-title {
        font-size: 16px;
    }

    .welcome-body {
        font-size: 13px;
    }
}

/* 移动端位置调整 */
@media (max-width: 768px) {
    .pi-trigger-btn {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .pi-panel {
        width: 100%;
        max-width: 100%;
    }
}

/* 遮罩层 */
.pi-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.pi-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 产品详情面板 */
.pi-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: var(--color-bg);
    border-left: 1px solid var(--color-border);
    z-index: 1002;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.pi-panel.active {
    transform: translateX(0);
}

/* 面板头部 */
.pi-header {
    padding: 20px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-secondary);
    flex-shrink: 0;
}

.pi-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pi-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pi-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--color-memory);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
}

.pi-logo-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.pi-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}

.pi-close-btn:hover {
    background: var(--color-bg);
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

/* 面板内容 */
.pi-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* 标语区 */
.pi-hero {
    text-align: center;
    padding: 16px 0 20px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 20px;
}

.pi-hero h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 6px 0;
}

.pi-hero p {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* 功能列表 */
.pi-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pi-feature {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
}

.pi-feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: var(--color-memory-light);
    color: var(--color-memory);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.pi-feature-content {
    flex: 1;
    min-width: 0;
}

.pi-feature-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 4px 0;
}

.pi-feature-desc {
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* 底部 */
.pi-footer {
    text-align: center;
    padding: 16px 0;
    margin-top: 20px;
    border-top: 1px solid var(--color-border);
}

.pi-footer p {
    font-size: 11px;
    color: var(--color-text-muted);
    margin: 0 0 4px 0;
    font-family: var(--font-mono);
}

.pi-footer-quote {
    font-style: italic;
    color: var(--color-memory) !important;
}

/* 自定义滚动条 */
.pi-panel::-webkit-scrollbar {
    width: 6px;
}

.pi-panel::-webkit-scrollbar-track {
    background: transparent;
}

.pi-panel::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.pi-panel::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* ============================================
   公告弹窗
   ============================================ */
.announcement-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.announcement-overlay.show {
    opacity: 1;
    visibility: visible;
}

.announcement-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: 400px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 12px;
    z-index: 3001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.announcement-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.announcement-content {
    padding: 28px 32px 24px;
    text-align: center;
}

.announcement-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.announcement-icon {
    font-size: 24px;
}

.announcement-title {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
}

.announcement-body {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 24px;
}

.announcement-body p {
    margin: 0 0 8px;
}

.announcement-btn {
    display: inline-block;
    padding: 10px 36px;
    background: #8B7355;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.announcement-btn:hover {
    background: #6F5B42;
}

.announcement-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.announcement-btn-secondary {
    background: transparent;
    color: #8B7355;
    border: 1px solid #8B7355;
}

.announcement-btn-secondary:hover {
    background: #F5F0E8;
    color: #6F5B42;
}

@media (max-width: 420px) {
    .announcement-actions {
        flex-direction: column-reverse;
    }

    .announcement-actions .announcement-btn {
        width: 100%;
    }
}
