/* ============================================
   美得因文创 - 扩展样式（v2 新增组件）
   ============================================ */

/* ---------- Logo 图片 ---------- */
.nav-logo-img {
    height: 38px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

/* ---------- 首屏自定义设计图覆盖 ---------- */
.hero-custom-img {
    width: 100%;
    max-width: 900px;
    max-height: 75vh;
    min-height: 200px;
    margin: 0 auto;
}

/* ---------- 首屏遮罩：加深，避免占位图透出深色块 ---------- */
.hero-mask {
    background: linear-gradient(135deg, rgba(250,247,242,.94) 0%, rgba(250,247,242,.88) 50%, rgba(250,247,242,.94) 100%) !important;
}

/* ---------- 首屏标题字号（数据驱动） ---------- */
.hero-title .title-sm { font-size: 1.5rem; font-weight: 400; }
.hero-title .title-md { font-size: 2.5rem; font-weight: 600; }
.hero-title .title-lg { font-size: 3.8rem; font-weight: 700; }
.hero-title .title-xl { font-size: 5.5rem; font-weight: 900; }

@media (max-width: 768px) {
    .hero-title .title-sm { font-size: 1.2rem; }
    .hero-title .title-md { font-size: 1.8rem; }
    .hero-title .title-lg { font-size: 2.5rem; }
    .hero-title .title-xl { font-size: 3.2rem; }
}

/* ---------- 系列详情页：本系列产品横向滚动 ---------- */
.sp-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
}
.sp-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0;
    flex: 1;
    min-width: 0;
}
.sp-track::-webkit-scrollbar { display: none; }
.sp-card {
    flex: 0 0 260px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .35s ease, box-shadow .35s ease;
    border: 1px solid rgba(0,0,0,.06);
}
.sp-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 36px rgba(139,58,58,.14);
}
.sp-card-img {
    width: 100%;
    height: 200px;
}
.sp-card-info {
    padding: 16px 18px;
}
.sp-card-info h3 {
    font-family: var(--font-serif, 'Noto Serif SC', serif);
    font-size: 1.1rem;
    color: #2C2416;
    margin-bottom: 6px;
}
.sp-card-info p {
    font-size: .85rem;
    color: #999;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sp-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sp-card-price {
    color: #8B3A3A;
    font-weight: 600;
    font-size: .95rem;
}
.sp-card-arrow {
    font-size: .8rem;
    color: #C5A572;
}
.sp-arrow {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.1);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s;
    color: #2C2416;
}
.sp-arrow:hover {
    background: #8B3A3A;
    color: #fff;
    border-color: #8B3A3A;
    transform: scale(1.08);
}
.sp-arrow svg {
    width: 20px;
    height: 20px;
}
@media (max-width: 768px) {
    .sp-card { flex: 0 0 200px; }
    .sp-card-img { height: 150px; }
    .sp-arrow { flex: 0 0 36px; width: 36px; height: 36px; }
}

/* ---------- 编辑器：图片尺寸提示 ---------- */
.img-size-hint {
    display: inline-block;
    font-size: .75rem;
    color: #C5A572;
    background: rgba(197,165,114,.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-weight: 500;
}

/* ---------- 编辑器：行编辑项（标题行/按钮/统计） ---------- */
.line-edit-item {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.line-edit-item input,
.line-edit-item select {
    margin: 0;
    flex: 0 0 auto;
}
.line-edit-item input[type="text"],
.line-edit-item input[type="number"] {
    flex: 1;
    min-width: 120px;
}

/* ---------- 编辑器：系列产品选择 ---------- */
.series-prod-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sel-prod-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: .85rem;
    transition: all .2s;
    background: #fff;
}
.sel-prod-item:hover {
    border-color: #C5A572;
}
.sel-prod-item.checked {
    background: rgba(139,58,58,.06);
    border-color: #8B3A3A;
    color: #8B3A3A;
}
.sel-prod-item input[type="checkbox"] {
    margin: 0;
}

/* ---------- 编辑器：复选框标签 / 占位色切换 ----------
   修复 form-group label display:block 把 checkbox 挤到单独一行的问题 */
.form-group .cb-label,
.form-group .img-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: .9rem;
    color: var(--text-primary);
    margin-bottom: 0;
}
.form-group input[type="checkbox"] {
    width: auto !important;
    height: auto;
    padding: 0;
    border: none;
    background: transparent;
    appearance: auto;
    -webkit-appearance: auto;
    margin: 0;
    flex-shrink: 0;
}

/* ---------- 编辑器：分割线 / 提示 ---------- */
.cb-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .9rem;
}
.edit-divider {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 24px 0;
}
.edit-hint {
    font-size: .8rem;
    color: #999;
    margin-top: 4px;
    line-height: 1.5;
}

/* ---------- 编辑器：编辑区 h4 ---------- */
.edit-section h4 {
    font-size: 1rem;
    color: #2C2416;
    margin: 16px 0 10px;
    font-weight: 600;
}

/* ---------- 详情页：空缺角提示（本系列产品为空时） ---------- */
.sp-empty {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: .9rem;
}

/* ---------- 页脚备案信息 ---------- */
.footer-icp {
    display: inline-block;
    margin-top: 8px;
    font-size: .75rem;
    color: var(--text-on-dark-secondary);
    text-decoration: none;
}
.footer-icp:hover { color: var(--accent-gold); }

/* ---------- 精选展示：选择列表 ---------- */
.selected-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.selected-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all .2s;
    background: #fff;
}
.selected-item:hover { border-color: #C5A572; }
.selected-item.checked {
    background: rgba(139,58,58,.05);
    border-color: #8B3A3A;
}
.selected-item input[type="checkbox"] { flex-shrink: 0; }
.sel-thumb { width: 48px; height: 48px; border-radius: 4px; background-size: cover; background-position: center; flex-shrink: 0; }
.sel-info { display: flex; flex-direction: column; font-size: .85rem; }
.sel-name { font-weight: 500; color: #2C2416; }
.sel-series { color: #999; font-size: .75rem; }
.sel-price { color: #8B3A3A; font-size: .8rem; }

/* ---------- 右侧浮动联系条（QQ / 公众号 / 电话） ---------- */
#floating-bar-slot {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
}
.floating-bar {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #fff;
    border-radius: 10px 0 0 10px;
    box-shadow: -3px 0 24px rgba(44,36,22,.14);
    overflow: visible;
}
.floating-item {
    position: relative;
    width: 52px;
    height: 52px;
    overflow: hidden;
    cursor: pointer;
    transition: width .32s cubic-bezier(.4,0,.2,1), height .32s cubic-bezier(.4,0,.2,1), background .25s;
    background: #fff;
    color: #8B3A3A;
    display: flex;
    align-items: center;
}
.floating-item:first-child { border-top-left-radius: 10px; }
.floating-item:last-child { border-bottom-left-radius: 10px; }
.floating-item:hover {
    background: #8B3A3A;
    color: #fff;
}
.floating-qq:hover, .floating-phone:hover { width: 240px; }
.floating-wechat:hover { width: 196px; height: 244px; flex-direction: column; align-items: stretch; }

.floating-icon-wrap {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.floating-wechat:hover .floating-icon-wrap { width: 100%; height: 50px; }
.floating-icon-wrap svg { width: 24px; height: 24px; }

.floating-detail {
    flex: 1;
    min-width: 0;
    opacity: 0;
    transition: opacity .12s .18s;
    overflow: hidden;
}
.floating-item:hover .floating-detail { opacity: 1; }

/* QQ / 电话 横向展开 */
.floating-qq .floating-detail, .floating-phone .floating-detail {
    padding-right: 16px;
    white-space: nowrap;
    font-size: .88rem;
    font-weight: 500;
}
.fd-info-line { display: block; line-height: 1.4; }
.fd-info-label { font-size: .72rem; opacity: .75; display: block; margin-bottom: 2px; }

/* 公众号 纵向展开 */
.floating-wechat .floating-detail {
    text-align: center;
    padding: 2px 12px 12px;
    width: 100%;
}
.fd-qrcode {
    width: 150px;
    height: 150px;
    margin: 0 auto 8px;
    border-radius: 8px;
    background: linear-gradient(135deg,#F0EBE3,#E5DFD3);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: .72rem;
}
.fd-qrcode img { width: 100%; height: 100%; border-radius: 8px; object-fit: cover; }
.fd-wechat-text {
    font-size: .78rem;
    line-height: 1.4;
    color: rgba(255,255,255,.92);
}

@media (max-width: 768px) {
    .floating-item { width: 46px; height: 46px; }
    .floating-icon-wrap { width: 46px; height: 46px; }
    .floating-qq:hover, .floating-phone:hover { width: 210px; }
    .floating-wechat:hover { width: 176px; height: 220px; }
    .fd-qrcode { width: 130px; height: 130px; }
}


/* ============================================
   Founder section optimization: 3:4 portrait + text harmony
   ============================================ */
.founder-section { grid-template-columns: 430px 1fr !important; gap: 52px !important; align-items: stretch; }
.cofounder-section { grid-template-columns: 1fr 430px !important; }
.founder-visual { display: flex; align-items: center; }
.founder-avatar {
    width: 100% !important;
    max-width: 405px !important;
    height: auto !important;
    aspect-ratio: 9 / 16;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 16px 48px rgba(62,58,54,.2) !important;
    background-size: cover !important;
    background-position: center 18% !important;
    margin: 0 auto;
    transition: transform .4s ease, box-shadow .4s ease;
}
@supports not (aspect-ratio: 9/16) {
    .founder-avatar { height: 640px !important; }
}
.founder-avatar:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 58px rgba(62,58,54,.28) !important;
}
.founder-avatar:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 54px rgba(62,58,54,.26) !important;
}

/* Right text column harmony */
.founder-info { display: flex; flex-direction: column; justify-content: center; padding: 8px 4px; }
.founder-tag { letter-spacing: 5px; }
.founder-name { font-size: 1.9rem; letter-spacing: 3px; margin-bottom: 6px; }
.founder-title { font-size: 1rem; letter-spacing: 1px; margin-bottom: 22px; }
.founder-bio {
    font-size: .95rem;
    line-height: 1.9;
    margin-bottom: 10px;
}
.founder-quote { margin-top: 24px; font-size: 1.02rem; line-height: 1.8; }

/* Mobile */
@media (max-width: 768px) {
    .founder-section, .cofounder-section { grid-template-columns: 1fr !important; padding: 32px 24px; }
    .founder-avatar { max-width: 320px !important; }
    .founder-section .founder-visual, .cofounder-section .founder-visual { order: -1; }
    .founder-info { text-align: left; }
}

/* NAVBAR-TRANSLUCENT v2: full-width bar bg, transparent inner container */
.navbar { background: rgba(250,247,242,.92) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(60,45,30,.08); }
.navbar.scrolled { background: rgba(250,247,242,.97) !important; }
.nav-container { background: transparent !important; }


/* HERO-CUSTOM-IMG v3: centered, blue-box size */
/* flex only for custom-image mode (class toggled by JS); text mode keeps original block layout */
.hero-content.hero-flex-img { max-width: none !important; width: 100%; display: flex !important; align-items: center; justify-content: center; }
.hero-custom-img {
    display: block !important;
    max-width: 62vw !important;
    max-height: 72vh !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    box-shadow: 0 10px 40px rgba(60,45,30,.15);
}
@media (max-width: 768px) {
    .hero-custom-img { max-width: 92vw !important; max-height: 60vh !important; }
}

/* HERO-TEXT-PANEL: readable bg behind text when slides show real images */
.hero-text-panel {
    background: rgba(250,247,242,.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 14px;
    padding: 48px 56px !important;
    box-shadow: 0 8px 32px rgba(60,45,30,.12);
    border: 1px solid rgba(255,255,255,.6);
    max-width: 760px;
    margin: 0 auto;
}
@media (max-width: 768px) {
    .hero-text-panel { padding: 28px 20px !important; max-width: 94vw; }
}

/* COFOUNDERS-GRID: cards in a row, photo top + text below */
.cofounders-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin-bottom: 60px;
    padding: 48px 40px;
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.cofounder-card { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cofounder-card-visual { width: 100%; max-width: 240px; margin-bottom: 18px; }
.cofounder-card-visual .founder-avatar { width: 100% !important; max-width: 240px !important; aspect-ratio: 3 / 4; margin: 0 auto; }
.cofounder-card .founder-tag { margin-bottom: 10px; }
.cofounder-card .founder-name { font-size: 1.3rem; margin-bottom: 4px; }
.cofounder-card .founder-title { font-size: .85rem; margin-bottom: 10px; }
.cofounder-card-bio { font-size: .88rem; color: var(--text-secondary); line-height: 1.8; }
@media (max-width: 1024px) { .cofounders-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cofounders-grid { grid-template-columns: 1fr; padding: 32px 20px; } .cofounder-card-visual { max-width: 200px; } }

/* COFOUNDERS-SMART: centered within founder width + 2-person pair layout */
.cofounders-grid { max-width: 1200px; margin-left: auto; margin-right: auto; }
.cofounder-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 48px 40px;
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.cofounder-pair-item { display: flex; gap: 24px; align-items: center; }
.cofounder-pair-item .founder-visual { flex: 0 0 42%; max-width: 220px; }
.cofounder-pair-item .founder-avatar { width: 100% !important; max-width: 220px !important; aspect-ratio: 3/4; }
.cofounder-pair-item .founder-info { flex: 1; text-align: left; }
.cofounder-pair-item .founder-bio { font-size: .85rem; }
@media (max-width: 900px) { .cofounder-pair { grid-template-columns: 1fr; } .cofounder-pair-item { flex-direction: column; text-align: center; } .cofounder-pair-item .founder-info { text-align: center; } }

/* EDITOR-READABILITY: darker text for editor form labels & hints */
.editor-body { --text-secondary: #4A4036; --text-light: #6B5E4F; }
.editor-body .edit-item label,
.editor-body .form-group label,
.editor-body .editor-label { color: #3E3529 !important; font-weight: 500; }
.edit-hint { color: #7A6E5F !important; }
.edit-desc { color: #5C5245 !important; }
.img-size-hint { color: #7A6E5F !important; }
.editor-tab { color: #4A4036 !important; }
.editor-tab.active { color: var(--accent) !important; }
.edit-item-head { color: #2C2416 !important; }
.form-group input,
.form-group textarea,
.edit-item input[type="text"],
.edit-item textarea,
.edit-item select { color: #2C2416 !important; }
.form-group input::placeholder,
.edit-item input::placeholder,
.edit-item textarea::placeholder { color: #8A7E6F !important; opacity: 1 !important; }

/* MOBILE-FIX-V2 */
@media (max-width: 768px) {
    /* hero text panel: compact, let slides show around it */
    .hero-text-panel {
        background: rgba(250,247,242,.72);
        padding: 22px 18px !important;
        max-width: 88vw;
        border-radius: 12px;
    }
    .hero-text-panel .hero-badge { font-size: .7rem; padding: 3px 10px; }
    .hero-text-panel .hero-title .title-sm { font-size: 1rem; }
    .hero-text-panel .hero-title .title-md { font-size: 1.3rem; }
    .hero-text-panel .hero-title .title-lg { font-size: 1.8rem; }
    .hero-text-panel .hero-title .title-xl { font-size: 2.2rem; }
    .hero-text-panel .hero-desc { font-size: .82rem; line-height: 1.7; }
    .hero-text-panel .btn { font-size: .8rem; padding: 8px 18px; }
    .hero-text-panel .stat-num { font-size: 1.3rem; }
    .hero-text-panel .stat-label { font-size: .68rem; }
    /* global smaller text */
    body { font-size: 14px; }
    .section-title { font-size: 1.4rem !important; }
    .section-desc { font-size: .85rem !important; }
    .section-tag { font-size: .65rem; letter-spacing: 2px; }
    .category-name { font-size: 1.15rem; }
    .category-desc { font-size: .82rem; }
    .category-number { font-size: 2.2rem; }
    .founder-name { font-size: 1.25rem; }
    .founder-bio { font-size: .84rem; line-height: 1.8; }
    .founder-quote { font-size: .88rem; }
    .contact-item { font-size: .84rem; }
    /* cofounders grid: force responsive columns (beat inline style) */
    .cofounders-grid { grid-template-columns: 1fr !important; }
    .cofounder-pair { grid-template-columns: 1fr !important; }
    .cofounder-card-bio { font-size: .8rem; }
    .cofounder-card .founder-name { font-size: 1.05rem; }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .cofounders-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* grid base columns by count (desktop), CSS-only responsive */
.cofounders-grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
.cofounders-grid[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }
