﻿*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 细节页/移动端修正：解决窄屏下的横向溢出 */
html,
body {
    overflow-x: hidden;
}

.lt-wrap {
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
}

.lt-card,
.ld-stage,
.ld-header-card,
.ld-summary-card,
.ld-seller-card,
.ld-tab-card,
.lt-related {
    min-width: 0;
    max-width: 100%;
}

.ld-stage {
    grid-template-columns: minmax(0, 1fr);
}

.lt-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.lt-tab-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lt-tab-button {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lt-spec-row span,
.lt-spec-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.lt-gallery-main,
.lt-gallery-main picture,
.lt-gallery-main img {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 767px) {
    .lt-wrap {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ld-header-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .lt-scroll-track {
        gap: 10px;
    }

    .lt-rel-card {
        width: 64vw;
    }
}


/* 列表页卡片文字左对齐 */
.listing-index-shell article {
    text-align: left;
}

.listing-index-shell article h3,
.listing-index-shell article p,
.listing-index-shell article .text-\[15px\] {
    text-align: left;
}

/* 移动端位置选择面板：贴住视口两侧，避免左侧内容被裁切 */
@media (max-width: 767px) {
    .oc-location .location-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        top: auto;
        width: auto;
        max-width: none;
        max-height: 70vh;
        overflow-y: auto;
        z-index: 200;
    }

    .oc-location .location-panel select {
        width: 100%;
    }
}

/* 移动端位置选择面板：脱离 details 的定位上下文，挂在导航栏下方整行展开 */
@media (max-width: 767px) {
    .oc-location {
        position: static;
    }

    .oc-location .location-panel {
        position: absolute;
        left: 12px;
        right: 12px;
        top: calc(100% + 8px);
        width: auto;
        max-width: none;
        max-height: 65vh;
        overflow-y: auto;
        z-index: 300;
    }

    .oc-location .location-panel select {
        width: 100%;
    }
}
/* 面板表单栅格 */
.panel-form-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .panel-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.panel-form-full {
    grid-column: 1 / -1;
}

/* 上传缩略图网格 */
.qc-photo-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .qc-photo-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.qc-photo-grid figure {
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    aspect-ratio: 1 / 1;
    background: #f8fafc;
}

.qc-photo-grid figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 主题切换按钮 */
.oc-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #ffffff;
    color: #334155;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.oc-theme-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, 0.24);
}

.oc-theme-toggle .oc-theme-icon {
    width: 1.15rem;
    height: 1.15rem;
}

html[data-theme="dark"] .oc-theme-toggle .icon-sun {
    display: none;
}

html:not([data-theme="dark"]) .oc-theme-toggle .icon-moon {
    display: none;
}

.oc-theme-toggle.is-anim {
    animation: oc-theme-pop 0.35s ease;
}

@keyframes oc-theme-pop {
    0% { transform: scale(1) rotate(0deg); }
    40% { transform: scale(0.86) rotate(-18deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* 暗色主题 */
html[data-theme="dark"] {
    color-scheme: dark;
    background: #0b1220;
}

html[data-theme="dark"] body {
    background: #0b1220;
    color: #e2e8f0;
}

html[data-theme="dark"] .market-nav-surface {
    background: rgba(13, 20, 36, 0.94);
    border-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .oc-search {
    background: #111c31;
    border-color: rgba(148, 163, 184, 0.2);
}

html[data-theme="dark"] .oc-search-input {
    color: #e2e8f0;
}

html[data-theme="dark"] .oc-search-input::placeholder {
    color: #94a3b8;
}

html[data-theme="dark"] .oc-search-submit {
    background: #1e293b;
    color: #e2e8f0;
}

html[data-theme="dark"] .oc-pill,
html[data-theme="dark"] .oc-account-trigger,
html[data-theme="dark"] .oc-theme-toggle {
    background: #111c31;
    border-color: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

html[data-theme="dark"] .oc-account-panel {
    background: #0f1a2d;
    border-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .oc-account-link {
    color: #cbd5e1;
}

html[data-theme="dark"] .oc-account-link:hover {
    background: #17233a;
    color: #f8fafc;
}

html[data-theme="dark"] .oc-category-row {
    border-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .oc-category-pill,
html[data-theme="dark"] .oc-category-link {
    color: #94a3b8;
}

html[data-theme="dark"] .bg-white,
html[data-theme="dark"] [class*="bg-white/"] {
    background-color: #0f1a2d !important;
}

html[data-theme="dark"] .bg-slate-50,
html[data-theme="dark"] [class*="bg-slate-50"] {
    background-color: #111c31 !important;
}

html[data-theme="dark"] article,
html[data-theme="dark"] .qc-card,
html[data-theme="dark"] .qc-panel,
html[data-theme="dark"] .listings-dashboard-card,
html[data-theme="dark"] .listings-dashboard-stat,
html[data-theme="dark"] .listings-dashboard-filter-shell {
    background-color: #0f1a2d !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
}

html[data-theme="dark"] .text-slate-950,
html[data-theme="dark"] .text-slate-900,
html[data-theme="dark"] .text-slate-800 {
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .text-slate-700,
html[data-theme="dark"] .text-slate-600 {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .text-slate-500,
html[data-theme="dark"] .text-slate-400 {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .border-slate-200,
html[data-theme="dark"] [class*="border-slate-200"] {
    border-color: rgba(148, 163, 184, 0.18) !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background-color: #111c31 !important;
    color: #e2e8f0 !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
}

html[data-theme="dark"] footer {
    background: #0b1220 !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
    color: #94a3b8 !important;
}

html[data-theme="dark"] footer h3,
html[data-theme="dark"] footer h4 {
    color: #f1f5f9 !important;
}

/* 主题切换图标尺寸 */
.oc-theme-toggle .oc-theme-icon {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 auto;
}

html[data-theme="dark"] .brand-text {
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .oc-account-name,
html[data-theme="dark"] .oc-header-icon,
html[data-theme="dark"] .oc-location-label,
html[data-theme="dark"] .oc-account-chevron,
html[data-theme="dark"] .oc-theme-toggle {
    color: #cbd5e1 !important;
}


/* 顶栏高度对齐 */
@media (min-width: 768px) {
    .oc-search { height: 44px; min-height: 44px; }
    .oc-search-input { height: 42px; }
    .oc-pill, .oc-account-trigger, .oc-cta, .oc-theme-toggle { height: 44px; min-height: 44px; }
}

/* 上传照片网格 */
.qc-photos-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.qc-photos-head h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #0f172a;
}

.qc-photos-head span {
    color: #64748b;
    font-size: 0.95rem;
}

.qc-photo-grid--slots {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 640px) {
    .qc-photo-grid--slots {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.qc-photo-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 1rem;
    overflow: hidden;
    background: #eef2f7;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

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

.qc-photo-empty {
    cursor: pointer;
    transition: background 0.2s ease;
}

.qc-photo-empty:hover {
    background: #e2e8f0;
}

.qc-photo-cover {
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    padding: 0.2rem 0.45rem;
    border-radius: 0.4rem;
}

.qc-photo-remove {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    display: grid;
    place-items: center;
    font-size: 1rem;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

html[data-theme="dark"] .qc-photo-tile {
    background: #111c31;
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .qc-photo-empty:hover {
    background: #17233a;
}


/* 顶栏统一高度 */
@media (min-width: 768px) {
    .oc-search {
        height: 44px !important;
        min-height: 44px !important;
    }

    .oc-search-input {
        height: 42px;
    }

    .oc-pill,
    .oc-account-trigger,
    .oc-cta,
    .oc-theme-toggle {
        height: 44px !important;
        min-height: 44px !important;
    }
}


/* 顶栏控件严格等高 */
@media (min-width: 768px) {
    .oc-nav-main .oc-actions {
        align-items: center;
    }

    .oc-nav-main .oc-search {
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .oc-nav-main .oc-search-input {
        height: 42px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .oc-nav-main .oc-pill,
    .oc-nav-main .oc-account-trigger,
    .oc-nav-main .oc-cta,
    .oc-nav-main .oc-theme-toggle,
    .oc-nav-main .oc-header-icon {
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
    }
}


/* 顶栏搜索与按钮基线对齐 */
@media (min-width: 768px) {
    .oc-nav-main .oc-search {
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        align-self: center !important;
    }

    .oc-nav-main .oc-actions {
        align-self: center !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .oc-nav-main {
        align-items: center !important;
    }
}


/* 固定顶栏 + 毛玻璃 */
.market-nav-surface {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    z-index: 80 !important;
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

html[data-theme="dark"] .market-nav-surface {
    background: rgba(11, 18, 32, 0.72) !important;
    border-bottom-color: rgba(148, 163, 184, 0.14);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

body {
    padding-top: var(--oc-nav-h, 0px);
}


/* 成功提示弹窗 */
.oc-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.oc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: oc-modal-fade 0.18s ease;
}

.oc-modal-panel {
    position: relative;
    width: min(92vw, 380px);
    border-radius: 1.5rem;
    background: #ffffff;
    padding: 1.6rem 1.4rem 1.4rem;
    text-align: center;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
    animation: oc-modal-pop 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.oc-modal-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.9rem;
    border-radius: 9999px;
    display: grid;
    place-items: center;
    background: #dcfce7;
    color: #16a34a;
}

.oc-modal-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.oc-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.oc-modal-text {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #64748b;
}

.oc-modal-button {
    margin-top: 1.2rem;
    width: 100%;
    border-radius: 9999px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    transition: background 0.2s ease, transform 0.15s ease;
}

.oc-modal-button:hover {
    background: #1d4ed8;
}

.oc-modal-button:active {
    transform: scale(0.98);
}

.oc-modal.is-closing {
    animation: oc-modal-fade-out 0.18s ease forwards;
}

html[data-theme="dark"] .oc-modal-panel {
    background: #0f1a2d;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .oc-modal-title {
    color: #f1f5f9;
}

html[data-theme="dark"] .oc-modal-text {
    color: #94a3b8;
}

html[data-theme="dark"] .oc-modal-icon {
    background: rgba(22, 163, 74, 0.18);
    color: #4ade80;
}

@keyframes oc-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes oc-modal-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes oc-modal-pop {
    from { opacity: 0; transform: translateY(10px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}


/* 失败提示弹窗配色 */
.oc-modal-icon.is-error {
    background: #fee2e2;
    color: #dc2626;
}

.oc-modal-button.is-error {
    background: #dc2626;
}

.oc-modal-button.is-error:hover {
    background: #b91c1c;
}

html[data-theme="dark"] .oc-modal-icon.is-error {
    background: rgba(220, 38, 38, 0.18);
    color: #f87171;
}


/* 举报面板 */
.ld-report {
    margin-top: 0.9rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 0.9rem;
}

.ld-report-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    list-style: none;
    font-size: 0.86rem;
    font-weight: 600;
    color: #64748b;
    transition: color 0.2s ease;
}

.ld-report-trigger::-webkit-details-marker {
    display: none;
}

.ld-report-trigger:hover {
    color: #0f172a;
}

.ld-report-flag {
    width: 1rem;
    height: 1rem;
}

.ld-report-chevron {
    width: 0.95rem;
    height: 0.95rem;
    transition: transform 0.2s ease;
}

.ld-report[open] .ld-report-chevron {
    transform: rotate(180deg);
}

.ld-report-form {
    margin-top: 0.9rem;
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.1rem;
    background: #f8fafc;
}

.ld-report-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.ld-report-field {
    display: grid;
    gap: 0.35rem;
}

.ld-report-field > span {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
}

.ld-report-select,
.ld-report-textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    background: #ffffff;
    padding: 0.65rem 0.8rem;
    font-size: 0.88rem;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ld-report-textarea {
    resize: vertical;
    min-height: 4.5rem;
}

.ld-report-select:focus,
.ld-report-textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.ld-report-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.2rem;
}

.ld-report-cancel,
.ld-report-submit {
    flex: 1 1 0;
    border-radius: 9999px;
    padding: 0.62rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.ld-report-cancel {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
}

.ld-report-cancel:hover {
    border-color: #cbd5e1;
    color: #0f172a;
}

.ld-report-submit {
    border: 1px solid transparent;
    background: #0f172a;
    color: #ffffff;
}

.ld-report-submit:hover {
    background: #1e293b;
}

.ld-report-cancel:active,
.ld-report-submit:active {
    transform: scale(0.985);
}

html[data-theme="dark"] .ld-report {
    border-top-color: rgba(148, 163, 184, 0.16);
}

html[data-theme="dark"] .ld-report-form {
    background: #111c31;
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .ld-report-title,
html[data-theme="dark"] .ld-report-trigger:hover {
    color: #f1f5f9;
}

html[data-theme="dark"] .ld-report-select,
html[data-theme="dark"] .ld-report-textarea {
    background: #0f1a2d;
    border-color: rgba(148, 163, 184, 0.22);
    color: #e2e8f0;
}

html[data-theme="dark"] .ld-report-cancel {
    background: #0f1a2d;
    border-color: rgba(148, 163, 184, 0.22);
    color: #cbd5e1;
}

html[data-theme="dark"] .ld-report-submit {
    background: #2563eb;
}


/* 收藏卡片图片比例 */
.favorite-media {
    aspect-ratio: 4 / 3;
    width: 100%;
    overflow: hidden;
}

.favorite-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
