/*
 * Artboardplus Single Post Styles
 * Add this to your theme's style.css or enqueue separately
 */

/* ===== Article Layout ===== */
.article-single {
    background: var(--bg-soft, #f8fcfc);
    padding: 48px 0 80px;
}

.article-layout {
    width: min(var(--container, 1200px), calc(100% - 84px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
}

.article-layout--full {
    grid-template-columns: 1fr;
}

/* ===== Main Article ===== */
.article-main {
    background: var(--white, #ffffff);
    border-radius: var(--radius-xl, 30px);
    border: 1px solid var(--line, rgba(23,57,58,0.1));
    box-shadow: var(--shadow-md, 0 14px 34px rgba(23,57,58,0.08));
    overflow: hidden;
}

/* Hero Image */
.article-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    overflow: hidden;
}

.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(23,57,58,0.6) 100%);
}

/* Article Header */
.article-header {
    padding: 40px 48px 32px;
    border-bottom: 1px solid var(--line, rgba(23,57,58,0.1));
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted, #6b8f90);
}

.breadcrumb a {
    color: var(--brand-3, #2fb1b3);
    font-weight: 600;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-sep {
    opacity: 0.5;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(70,205,207,.12);
    color: var(--brand-3, #2fb1b3);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 999px;
}

.article-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--muted, #6b8f90);
}

.article-date svg {
    width: 16px;
    height: 16px;
}

.article-title {
    margin: 0;
    font-family: "Montserrat", "Noto Sans TC", sans-serif;
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--ink, #17393a);
    letter-spacing: -0.02em;
}

/* Article Body */
.article-body {
    padding: 48px;
    min-height: 400px;
}

.article-body p {
    margin: 0 0 24px;
    font-size: 17px;
    line-height: 1.85;
    color: var(--text, #315455);
}

.article-body p:last-child {
    margin-bottom: 0;
}

.article-body h2 {
    margin: 48px 0 20px;
    font-family: "Montserrat", "Noto Sans TC", sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--ink, #17393a);
    line-height: 1.3;
    position: relative;
    padding-left: 16px;
}

.article-body h3 {
    margin: 32px 0 16px;
    font-family: "Montserrat", "Noto Sans TC", sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--ink, #17393a);
}

.article-body ul,
.article-body ol {
    margin: 0 0 24px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.7;
}

.article-body li::marker {
    color: var(--brand-3, #2fb1b3);
}

.article-body blockquote {
    margin: 32px 0;
    padding: 24px 32px;
    background: linear-gradient(135deg, rgba(70,205,207,.08), rgba(151,227,228,.12));
    border-left: 4px solid var(--brand, #46CDCF);
    border-radius: 0 var(--radius-m, 18px) var(--radius-m, 18px) 0;
    font-style: italic;
    color: var(--ink, #17393a);
}

.article-body blockquote p {
    margin: 0;
    font-size: 18px;
    line-height: 1.7;
}

.article-body img {
    width: 100%;
    border-radius: var(--radius-m, 18px);
    margin: 32px 0;
}

.article-body .wp-block-image {
    margin: 32px 0;
}

.article-body .wp-block-image img {
    border-radius: var(--radius-m, 18px);
}

/* Article Footer */
.article-footer {
    padding: 32px 48px;
    border-top: 1px solid var(--line, rgba(23,57,58,0.1));
    background: var(--bg-soft, #f8fcfc);
}

.tags-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tags-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--muted, #6b8f90);
}

.tag-link {
    padding: 8px 16px;
    background: var(--white, #ffffff);
    border: 1px solid var(--line, rgba(23,57,58,0.1));
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text, #315455);
    transition: all .28s ease;
}

.tag-link:hover {
    border-color: var(--brand-3, #2fb1b3);
    color: var(--brand-3, #2fb1b3);
    transform: translateY(-2px);
}

/* Share Section */
.share-section {
    margin: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.share-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--muted, #6b8f90);
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: var(--white, #ffffff);
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink, #1a1a2e);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
    border: 1px solid var(--line, rgba(23,57,58,0.1));
    border-radius: 12px;
    cursor: pointer;
    transition: all .28s ease;
}

.share-btn:hover {
    background: var(--brand, #46CDCF);
    border-color: var(--brand, #46CDCF);
    color: var(--white, #ffffff);
    transform: translateY(-2px);
}

/* Author Card */
.author-card {
    margin-top: 32px;
    padding: 28px;
    background: var(--white, #ffffff);
    border: 1px solid var(--line, rgba(23,57,58,0.1));
    border-radius: var(--radius-l, 24px);
    display: flex;
    gap: 20px;
    align-items: center;
}

.author-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
    color: var(--ink, #17393a);
}

.author-info p {
    margin: 0;
    font-size: 14px;
    color: var(--muted, #6b8f90);
    line-height: 1.6;
}

/* ===== Sidebar ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-card {
    background: var(--white, #ffffff);
    border: 1px solid var(--line, rgba(23,57,58,0.1));
    border-radius: var(--radius-l, 24px);
    box-shadow: var(--shadow-sm, 0 8px 20px rgba(23,57,58,0.05));
    overflow: hidden;
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--line, rgba(23,57,58,0.1));
    background: linear-gradient(135deg, rgba(70,205,207,.08), rgba(151,227,228,.12));
}

.sidebar-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--ink, #17393a);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-body {
    padding: 20px 24px;
}

/* Table of Contents */
.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-list li {
    margin-bottom: 4px;
}

.toc-list a {
    display: block;
    padding: 6px 0;
    border-radius: var(--radius-s, 12px);
    font-size: 14px;
    font-weight: 500;
    color: var(--text, #315455);
    transition: all .28s ease;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--brand-3, #2fb1b3);
    font-weight: 700;
}

/* Related Articles */
.related-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line, rgba(23,57,58,0.1));
}

.related-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-s, 12px);
    background: linear-gradient(135deg, rgba(70,205,207,.3), rgba(151,227,228,.5));
    flex-shrink: 0;
    overflow: hidden;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-content h4 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink, #17393a);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-content:hover h4 {
    color: var(--brand-3, #2fb1b3);
}

.related-date {
    font-size: 12px;
    color: var(--muted, #6b8f90);
}

/* CTA Card */
.cta-card {
    padding: 28px;
    background: linear-gradient(135deg, var(--brand-3, #2fb1b3), var(--brand, #46CDCF));
    border-radius: var(--radius-l, 24px);
    text-align: center;
    color: var(--white, #ffffff);
}

.cta-card h3 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 800;
}

.cta-card p {
    margin: 0 0 20px;
    font-size: 14px;
    opacity: 0.95;
    line-height: 1.6;
}

.cta-card .btn {
    width: 100%;
    background: var(--white, #ffffff);
    color: var(--brand-3, #2fb1b3);
}

.cta-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0,0,0,.2);
}

/* Popular Tags */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    padding: 8px 14px;
    background: var(--bg-soft, #f8fcfc);
    border: 1px solid var(--line, rgba(23,57,58,0.1));
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text, #315455);
    transition: all .28s ease;
}

.tag-pill:hover {
    background: rgba(70,205,207,.12);
    border-color: var(--brand-3, #2fb1b3);
    color: var(--brand-3, #2fb1b3);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .article-single {
        padding: 24px 0 48px;
    }
    
    .article-layout {
        width: calc(100% - 32px);
    }
    
    .article-header {
        padding: 28px 24px 24px;
    }
    
    .article-body {
        padding: 28px 24px;
    }
    
    .article-body h2 {
        font-size: 22px;
    }
    
    .article-footer {
        padding: 24px;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .author-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Post Navigation */
.post-nav {
    margin: 40px 0 0;
}

.post-nav-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.post-nav-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 24px;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    background: #fff;
}

.post-nav-item:hover {
    border-color: var(--brand, #46CDCF);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(70,205,207,.1);
}

.post-nav-prev .post-nav-title,
.post-nav-next .post-nav-title {
    font-size: 22px;
    color: var(--ink, #1a1a2e);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-nav-next {
    text-align: right;
}

.post-nav-dir {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand, #46CDCF);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-nav-empty {
    opacity: 0.35;
    cursor: default;
}

@media (max-width: 760px) {
    .post-nav-inner {
        grid-template-columns: 1fr;
    }

    .post-nav-next {
        text-align: left;
    }
}

/* 相關商品 */
section.related, section.upsells{
    background: none!important;
}
.article-body h2{
    margin-top: 0!important;
}
section.related > h2, section.related > ul.products, section.upsells > h2, section.upsells > ul.products{
    max-width: 100%!important;
    padding: 0!important;
}
section.related h2.woocommerce-loop-product__title{
    text-align: left;
}
section.related h2::after{
    display: none;
}
.article-body section.related img{
    border-radius: 0!important;
}

.woocommerce a.added_to_cart{
    text-align: center;
    display: block;
    width: 100%;
}