/* Artikel & Tutorial — Ahrartech Store */

.article-breadcrumb {
    font-size: 13px;
}

.article-breadcrumb a {
    color: #005eb8;
    text-decoration: none;
}

/* ---------- Daftar artikel ---------- */
.article-category-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.article-category-nav::-webkit-scrollbar {
    display: none;
}

.article-category-nav a {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(0, 61, 122, 0.15);
    color: #003d7a;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.article-category-nav a.active,
.article-category-nav a:hover {
    background: #003d7a;
    border-color: #003d7a;
    color: #fff;
}

.article-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.article-card-cover {
    display: block;
    aspect-ratio: 16 / 9;
    background: #eef3f9;
    overflow: hidden;
}

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

.article-card-cover img.is-placeholder {
    object-fit: contain;
    padding: 18%;
    opacity: 0.5;
}

.article-card-category {
    position: relative;
    z-index: 2;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #005eb8;
    text-decoration: none;
    margin-bottom: 4px;
}

.article-card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Halaman artikel ---------- */
.article-header h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #1f2a44;
    font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
    line-height: 1.25;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 14px;
    color: #6c757d;
}

.article-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    background: #eef3f9;
}

.article-content {
    font-size: 17px;
    line-height: 1.75;
    color: #2b3445;
    overflow-wrap: break-word;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #1f2a44;
    scroll-margin-top: 90px;
}

.article-content h2 {
    font-size: 1.5rem;
    margin: 2.2rem 0 0.9rem;
}

.article-content h3 {
    font-size: 1.2rem;
    margin: 1.8rem 0 0.7rem;
}

.article-content p,
.article-content ul,
.article-content ol {
    margin-bottom: 1.1rem;
}

.article-content img {
    display: block;
    height: auto;
    margin: 1.4rem auto;
}

.article-content a {
    color: #005eb8;
}

.article-content blockquote {
    border-left: 4px solid #ffc107;
    background: #fffaf0;
    padding: 12px 18px;
    margin: 1.4rem 0;
    border-radius: 0 8px 8px 0;
}

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

.article-content :not(pre) > code {
    background: #eef3f9;
    color: #b02a37;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.article-content .table-responsive {
    margin: 1.4rem 0;
}

.article-content table {
    font-size: 15px;
    margin-bottom: 0;
}

.article-content th {
    background: #f1f5f9;
}

/* Blok kode + tombol salin */
.code-block {
    position: relative;
    margin: 1.4rem 0;
}

.code-block pre {
    margin: 0;
    border-radius: 10px;
    padding: 18px 16px;
    font-size: 14px;
    line-height: 1.6;
    max-height: 560px;
    overflow: auto;
}

.code-block .code-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.code-block .code-copy:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* Kartu produk di tengah artikel */
.article-product-card {
    display: grid;
    grid-template-columns: 84px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    margin: 1.4rem 0;
    border: 1px solid rgba(0, 61, 122, 0.12);
    border-left: 4px solid #003d7a;
    border-radius: 10px;
    background: #fff;
    line-height: 1.4;
}

.article-product-thumb img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f5f9;
    margin: 0;
}

.article-product-name {
    display: block;
    font-weight: 600;
    color: #1f2a44 !important;
    text-decoration: none;
    margin-bottom: 2px;
}

.article-product-price {
    font-weight: 700;
    color: #003d7a;
    margin-bottom: 4px;
}

.article-product-action {
    width: 170px;
}

@media (max-width: 575px) {
    .article-product-card {
        grid-template-columns: 64px 1fr;
    }

    .article-product-thumb img {
        width: 64px;
        height: 64px;
    }

    .article-product-action {
        grid-column: 1 / -1;
        width: auto;
    }
}

/* Daftar belanja proyek */
.shopping-list {
    border: 2px solid #003d7a;
    border-radius: 14px;
    overflow: hidden;
    scroll-margin-top: 90px;
}

.shopping-list-header {
    background: #003d7a;
    color: #fff;
    padding: 14px 18px;
}

.shopping-item {
    display: grid;
    grid-template-columns: auto 56px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid #eef1f6;
}

.shopping-item.is-unchecked {
    opacity: 0.55;
}

.shopping-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f5f9;
}

.shopping-item-name {
    font-weight: 600;
    color: #1f2a44;
    text-decoration: none;
}

.shopping-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shopping-item-controls .qty-input {
    width: 70px;
}

.shopping-item-subtotal {
    min-width: 96px;
    text-align: right;
    font-weight: 700;
    color: #003d7a;
}

.shopping-list-footer {
    background: #f7f9fc;
    padding: 14px 18px;
}

@media (max-width: 767px) {
    .shopping-item {
        grid-template-columns: auto 48px 1fr;
        padding: 12px 14px;
    }

    .shopping-item img {
        width: 48px;
        height: 48px;
    }

    .shopping-item-controls {
        grid-column: 2 / -1;
        flex-wrap: wrap;
    }

    .shopping-item-subtotal {
        margin-left: auto;
    }
}

/* Sidebar artikel (hanya desktop; tidak memakai d-none d-lg-block karena .d-none di design system memakai !important) */
.article-aside {
    display: none;
}

@media (min-width: 992px) {
    .article-aside {
        display: block;
    }
}

.article-sidebar {
    position: sticky;
    top: 90px;
}

.article-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.article-toc li a {
    display: block;
    padding: 5px 0 5px 10px;
    border-left: 2px solid transparent;
    color: #495057;
    text-decoration: none;
}

.article-toc li.toc-h3 a {
    padding-left: 24px;
    font-size: 13px;
}

.article-toc li a:hover,
.article-toc li a.active {
    color: #003d7a;
    border-left-color: #ffc107;
    font-weight: 600;
}

.article-tags a {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 6px 6px 0;
    border-radius: 999px;
    background: #eef3f9;
    color: #003d7a;
    font-size: 13px;
    text-decoration: none;
}

.article-tags a:hover {
    background: #003d7a;
    color: #fff;
}

.share-buttons .btn {
    border-radius: 999px;
}

/* Navbar sticky di HP lebih tinggi (ada kolom pencarian), jadi lompatan anchor perlu jarak lebih besar */
@media (max-width: 991px) {
    .article-content h2,
    .article-content h3,
    .article-content h4,
    .shopping-list {
        scroll-margin-top: 180px;
    }
}
