/* ========================================
   念方堂 | 药材图鉴 专属样式
   ======================================== */

/* --- 页面容器 --- */
.yc-page {
    padding-top: 72px;
    background: var(--color-bg);
    min-height: 100vh;
}

/* --- Hero --- */
.yc-hero {
    background: linear-gradient(160deg, #3a4a3f 0%, #4a6650 25%, #2d3a2f 60%, #5c7862 100%);
    padding: 90px 0 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: #fff;
}
.yc-hero-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(180, 210, 140, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(220, 200, 140, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    pointer-events: none;
}
.yc-hero-label {
    font-family: var(--font-sans);
    font-size: 14px;
    letter-spacing: 6px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 16px;
    text-transform: uppercase;
}
.yc-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: 8px;
    color: #fff;
}
.yc-hero-subtitle {
    font-family: var(--font-serif);
    font-size: 18px;
    color: rgba(255,255,255,0.75);
    letter-spacing: 4px;
    margin-bottom: 24px;
}
.yc-hero-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    line-height: 2;
    max-width: 500px;
    margin: 0 auto;
}

/* --- 工具栏 --- */
.yc-toolbar {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 20px 0;
    position: relative;
    z-index: 100;
    transition: box-shadow 0.3s;
}
.yc-toolbar.yc-toolbar-sticky {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    box-shadow: var(--shadow-md);
    border-bottom-color: transparent;
}
.yc-toolbar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* 搜索框 */
.yc-search-box {
    position: relative;
    flex-shrink: 0;
    width: 220px;
}
.yc-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}
.yc-search-box input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    border: 1px solid var(--color-border);
    border-radius: 24px;
    font-size: 14px;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: #fafaf7;
    transition: var(--transition);
    outline: none;
}
.yc-search-box input:focus {
    border-color: #8a9f7a;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(138, 159, 122, 0.1);
}
.yc-search-box input::placeholder {
    color: #bbb;
}

/* 筛选按钮组 */
.yc-filter-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.yc-filter-btn {
    padding: 7px 16px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 13px;
    font-family: var(--font-sans);
    color: #666;
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    user-select: none;
}
.yc-filter-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-primary);
    background: #fdfaf5;
}
.yc-filter-btn.active {
    background: #3a4a3f;
    color: #fff;
    border-color: #3a4a3f;
}

/* 性味按钮颜色区分 */
.yc-filter-btn.nature-btn[data-nature="温"]:not(.active):hover { border-color: #d4896a; color: #c0392b; background: #fef5f3; }
.yc-filter-btn.nature-btn[data-nature="平"]:not(.active):hover { border-color: #95a5a6; color: #7f8c8d; background: #fafafa; }
.yc-filter-btn.nature-btn[data-nature="凉"]:not(.active):hover { border-color: #7fb3d8; color: #2980b9; background: #f5fafe; }
.yc-filter-btn.nature-btn[data-nature="寒"]:not(.active):hover { border-color: #5b9bd5; color: #1a5276; background: #f0f7fc; }
.yc-filter-btn.nature-btn[data-nature="微温"]:not(.active):hover { border-color: #e8b88a; color: #d35400; background: #fefaf6; }
.yc-filter-btn.nature-btn[data-nature="微寒"]:not(.active):hover { border-color: #8fc5d8; color: #2471a3; background: #f5fbfd; }

.yc-toolbar-info {
    margin-top: 12px;
}
.yc-count {
    font-size: 13px;
    color: #999;
    font-family: var(--font-sans);
}

/* --- 卡片网格 --- */
.yc-grid-section {
    padding: 40px 0 80px;
}
.yc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 卡片 */
.yc-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    position: relative;
}
.yc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
    border-color: #d0d8c8;
}
.yc-card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f7f3 0%, #f0efe8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.yc-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.yc-card:hover .yc-card-img img {
    transform: scale(1.05);
}
.yc-card-img-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #e8e5dc 0%, #ddd8cc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.yc-card-img-placeholder span {
    font-family: var(--font-serif);
    font-size: 48px;
    color: rgba(139,69,19,0.2);
    font-weight: 700;
}
.yc-card-body {
    padding: 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.yc-card-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.yc-card-name {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    color: #2d2d2d;
    letter-spacing: 2px;
}
.yc-card-pinyin {
    font-size: 12px;
    color: #aaa;
    font-family: var(--font-sans);
    font-style: italic;
}
.yc-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.yc-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-family: var(--font-sans);
    font-weight: 500;
    letter-spacing: 0.5px;
}
.yc-tag-nature.yc-tag-温, .yc-tag-nature.yc-tag-微温 { background: #fde8e0; color: #c0392b; }
.yc-tag-nature.yc-tag-平 { background: #eaf0e5; color: #5d7a4a; }
.yc-tag-nature.yc-tag-凉 { background: #e0eef8; color: #2980b9; }
.yc-tag-nature.yc-tag-寒, .yc-tag-nature.yc-tag-微寒 { background: #dceaf7; color: #1a5276; }
.yc-tag-taste { background: #f5f0e8; color: #8B4513; }
.yc-tag-cat { background: #f0f0f0; color: #666; }
.yc-card-source {
    font-size: 12px;
    color: #bbb;
    margin-top: auto;
    font-family: var(--font-sans);
}
.yc-card-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #ccc;
    transition: all 0.3s ease;
    opacity: 0;
}
.yc-card:hover .yc-card-arrow {
    opacity: 1;
    color: #8a9f7a;
    right: 12px;
}
.yc-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #999;
}
.yc-empty p {
    font-size: 16px;
    font-family: var(--font-serif);
}

/* --- 弹窗 --- */
.yc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.yc-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.yc-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 660px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    margin: auto;
}
.yc-modal-overlay.active .yc-modal {
    transform: translateY(0);
}
.yc-modal-close {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: var(--transition);
    z-index: 10;
}
.yc-modal-close:hover {
    background: #e8e8e8;
    color: #333;
}
.yc-modal-body {
    padding: 32px;
}

/* 弹窗内 - 图片 */
.yc-detail-image {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #f8f7f3, #f0efe8);
}
.yc-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 弹窗内 - 标题 */
.yc-detail-header {
    margin-bottom: 24px;
}
.yc-detail-name {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 4px;
    color: #1a1a1a;
    margin-bottom: 4px;
}
.yc-detail-latin {
    font-size: 13px;
    color: #aaa;
    font-style: italic;
    margin-bottom: 12px;
}
.yc-detail-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* 弹窗内 - 信息格子 */
.yc-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}
.yc-detail-item {
    background: #fafaf7;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid #f0ede6;
}
.yc-detail-label {
    font-size: 11px;
    color: #999;
    display: block;
    margin-bottom: 4px;
    letter-spacing: 1px;
}
.yc-detail-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 弹窗内 - 描述区域 */
.yc-detail-section {
    margin-bottom: 20px;
}
.yc-detail-section h4 {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
    color: #3a4a3f;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8ece4;
    letter-spacing: 1px;
}
.yc-detail-section p {
    font-size: 14px;
    line-height: 1.9;
    color: #555;
}
.yc-detail-dict {
    font-family: var(--font-serif);
}

/* 搭配 */
.yc-detail-pairings {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.yc-pairing-tag {
    padding: 6px 14px;
    background: #f0f5ec;
    color: #4a6741;
    border-radius: 16px;
    font-size: 13px;
    font-family: var(--font-sans);
    border: 1px solid #dce8d4;
}

/* 注意事项 */
.yc-detail-notes {
    background: #fffdf7;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #f0e8d0;
}
.yc-detail-notes h4 {
    color: #c5932e;
    border-color: #f0e8d0;
}

/* 弹窗免责声明 */
.yc-detail-disclaimer {
    margin-top: 24px;
    padding: 14px 16px;
    background: #fafaf7;
    border-radius: 8px;
    border: 1px solid #eee;
}
.yc-detail-disclaimer p {
    font-size: 12px;
    color: #aaa;
    line-height: 1.8;
    text-align: center;
}

/* --- 底部声明 --- */
.yc-disclaimer {
    padding: 0 0 60px;
}
.yc-disclaimer-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    border: 1px solid #eee;
    text-align: center;
}
.yc-disclaimer-card h3 {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    color: #c5932e;
    margin-bottom: 16px;
    letter-spacing: 2px;
}
.yc-disclaimer-card p {
    font-size: 13px;
    color: #999;
    line-height: 2;
    max-width: 700px;
    margin: 0 auto 8px;
}
.yc-disclaimer-card b {
    color: #888;
}

/* --- 导航高亮 --- */
.nav-highlight {
    position: relative;
}
.nav-highlight::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #3a4a3f;
    border-radius: 50%;
}
.nav-links a.active {
    color: var(--color-primary);
}

/* --- Footer --- */
.footer {
    background: var(--color-bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.footer-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}
.footer-brand-name {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 3px;
}
.footer-brand p {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255,255,255,0.5);
}
.footer-links h4,
.footer-contact h4 {
    font-size: 14px;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: 1px;
}
.footer-links ul li,
.footer-contact ul li {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 8px;
    transition: color 0.2s;
}
.footer-links ul li a:hover {
    color: #fff;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.35);
}
.footer-bottom p { margin-bottom: 4px; }
.footer-icp a { color: rgba(255,255,255,0.35); transition: color 0.2s; }
.footer-icp a:hover { color: rgba(255,255,255,0.7); }

/* --- 回到顶部 --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(139,69,19,0.3);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-3px);
}

/* --- 响应式 --- */
@media (max-width: 768px) {
    .yc-hero { padding: 70px 0 50px; }
    .yc-hero-title { letter-spacing: 4px; }
    .yc-toolbar-row { flex-direction: column; align-items: stretch; }
    .yc-search-box { width: 100%; }
    .yc-filter-group { justify-content: center; }
    .yc-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .yc-card-img { height: 140px; }
    .yc-card-body { padding: 12px 14px; }
    .yc-card-name { font-size: 17px; }
    .yc-detail-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-logo { justify-content: center; }
}

@media (max-width: 480px) {
    .yc-grid { grid-template-columns: 1fr; }
    .yc-modal { margin: 10px; border-radius: 12px; }
    .yc-modal-body { padding: 24px 18px; }
    .yc-detail-image { height: 180px; }
    .yc-detail-name { font-size: 26px; }
    .yc-disclaimer-card { padding: 20px; }
}
