/* ==========================================================================
   Lumié – single blog article ("Cẩm nang")
   ========================================================================== */

.site-main--article { background: var(--c-bg); }
.site-main--article .breadcrumb { background: var(--c-cream); padding-bottom: 0; }

/* Reading progress --------------------------------------------------------- */
.read-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 120; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c-primary), var(--c-sale)); transition: width .1s linear; }

/* Hero ------------------------------------------------------------------------ */
.article-hero {
	background: var(--c-cream) url("../img/leaf-pattern.svg") no-repeat right -30px bottom -50px / 240px;
	padding: 16px 0 28px;
	border-bottom: 1px solid var(--c-line);
}
.article-hero__inner { max-width: calc(860px + var(--gutter) * 2); }
.article-hero__cat {
	display: inline-block;
	margin-bottom: 12px;
	padding: 4px 14px;
	border-radius: 999px;
	background: var(--c-primary);
	color: var(--c-white);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.article-hero__cat:hover { background: var(--c-primary-dark); color: var(--c-white); }
.article-hero__title {
	margin: 0 0 12px;
	font-family: var(--font-heading);
	font-size: clamp(26px, 4.4vw, 42px);
	font-weight: 700;
	line-height: 1.22;
	color: #2e3a2a;
}
.article-hero__lead { margin: 0 0 18px; font-size: 17px; line-height: 1.6; color: var(--c-muted); }
.article-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.article-author { display: flex; align-items: center; gap: 10px; }
.article-author img { width: 40px; height: 40px; padding: 4px; border-radius: 50%; background: var(--c-white); box-shadow: 0 0 0 1px var(--c-line); object-fit: contain; }
.article-author strong { display: block; font-size: 14px; line-height: 1.2; }
.article-author small { color: var(--c-muted); font-size: 12px; }
.article-hero__facts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--c-muted); }
.article-hero__facts > * { display: inline-flex; align-items: center; gap: 5px; color: inherit; }
.article-hero__facts .icon { width: 15px; height: 15px; color: var(--c-primary-dark); }
.article-hero .share { width: 100%; }

/* Share -------------------------------------------------------------------- */
.share { display: flex; align-items: center; gap: 8px; }
.share__label { font-size: 13px; font-weight: 600; color: var(--c-muted); }
.share__btn {
	position: relative;
	display: grid; place-items: center;
	width: 36px; height: 36px;
	padding: 0;
	border: 1px solid var(--c-line);
	border-radius: 50%;
	background: var(--c-white);
	color: var(--c-primary-dark);
	transition: background .15s, color .15s, border-color .15s;
}
.share__btn .icon { width: 17px; height: 17px; }
.share__btn:hover { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-white); }
.share__btn--fb:hover { background: #1877f2; border-color: #1877f2; }
.share__btn.is-done::after {
	content: attr(data-done);
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	padding: 3px 8px;
	border-radius: 6px;
	background: var(--c-text);
	color: var(--c-white);
	font-size: 12px;
	white-space: nowrap;
}

/* Layout --------------------------------------------------------------------- */
.article-layout { display: grid; gap: 24px; padding-top: 24px; align-items: start; }
.article { min-width: 0; }
.article-sidebar { display: none; }

.article__cover { margin: 0 0 20px; }
.article__cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; box-shadow: var(--shadow); }
.article__cover figcaption { margin-top: 8px; font-size: 13px; color: var(--c-muted); text-align: center; font-style: italic; }

/* Content typography --------------------------------------------------------- */
.article__content {
	padding: 24px 20px;
	border-radius: 16px;
	background: var(--c-white);
	box-shadow: 0 0 0 1px var(--c-line);
	font-size: 17px;
	line-height: 1.8;
	color: #3a4651;
}
.article__content > :first-child { margin-top: 0; }
.article__content > p:first-of-type { font-size: 18px; color: var(--c-text); }
.article__content h2,
.article__content h3 { scroll-margin-top: calc(var(--header-h) + 20px); color: var(--c-text); }
.article__content h2 {
	position: relative;
	margin: 1.8em 0 .6em;
	padding-left: 16px;
	font-size: 23px;
	line-height: 1.35;
}
.article__content h2::before {
	content: "";
	position: absolute;
	left: 0; top: .2em; bottom: .2em;
	width: 5px;
	border-radius: 3px;
	background: linear-gradient(var(--c-primary), var(--c-pink));
}
.article__content h3 { margin: 1.5em 0 .5em; font-size: 19px; color: var(--c-primary-dark); }
.article__content a { color: var(--c-sale); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article__content a:hover { color: var(--c-sale-dark); }
.article__content strong { color: var(--c-text); }
.article__content ul { list-style: none; padding-left: 4px; }
.article__content ul > li { position: relative; padding-left: 24px; margin-bottom: .45em; }
.article__content ul > li::before {
	content: "";
	position: absolute;
	left: 4px; top: .7em;
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--c-primary);
	box-shadow: 0 0 0 3px var(--c-primary-soft);
}
.article__content ol { counter-reset: step; list-style: none; padding-left: 4px; }
.article__content ol > li { position: relative; padding-left: 40px; margin-bottom: .7em; counter-increment: step; }
.article__content ol > li::before {
	content: counter(step);
	position: absolute;
	left: 0; top: .15em;
	width: 28px; height: 28px;
	border-radius: 50%;
	background: var(--c-primary);
	color: var(--c-white);
	font-size: 14px;
	font-weight: 700;
	line-height: 28px;
	text-align: center;
}
.article__content blockquote {
	position: relative;
	margin: 1.6em 0;
	padding: 20px 22px 20px 58px;
	border: 0;
	border-radius: 14px;
	background: var(--c-cream);
	font-size: 18px;
	font-style: italic;
	color: var(--c-text);
}
.article__content blockquote::before {
	content: "“";
	position: absolute;
	left: 16px; top: 2px;
	font-family: var(--font-heading);
	font-size: 64px;
	line-height: 1;
	color: var(--c-primary);
}
.article__content blockquote p:last-child { margin-bottom: 0; }
.article__content img,
.article__content .wp-block-image img { border-radius: 12px; }
.article__content figure { margin: 1.5em 0; }
.article__content figcaption { font-size: 13px; color: var(--c-muted); text-align: center; }
.article__content table { font-size: 15px; border-radius: 10px; overflow: hidden; }
.article__content th { background: var(--c-cream); color: var(--c-primary-dark); text-align: left; }
.article__content hr { border: 0; height: 1px; background: var(--c-line); margin: 2em 0; }

/* Table of contents ------------------------------------------------------------ */
.toc__title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 700; font-size: 15px; }
.toc__title .icon { width: 18px; height: 18px; color: var(--c-primary-dark); }
.toc__list { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc__item a {
	display: block;
	padding: 6px 10px 6px 12px;
	border-left: 2px solid var(--c-line);
	color: var(--c-muted);
	font-size: 14px;
	line-height: 1.45;
}
.toc__item--h3 a { padding-left: 26px; font-size: 13px; }
.toc__item a:hover { color: var(--c-primary-dark); }
.toc__item a.is-active { border-left-color: var(--c-primary); color: var(--c-primary-dark); font-weight: 600; background: var(--c-cream); }

.toc-mobile { margin-bottom: 16px; border-radius: 14px; background: var(--c-white); box-shadow: 0 0 0 1px var(--c-line); }
.toc-mobile summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-weight: 700; cursor: pointer; list-style: none; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary .icon:first-child { color: var(--c-primary-dark); width: 18px; height: 18px; }
.toc-mobile summary .icon:last-child { margin-left: auto; transition: transform .2s; }
.toc-mobile[open] summary .icon:last-child { transform: rotate(180deg); }
.toc-mobile .toc { padding: 0 16px 14px; }
.toc-mobile .toc__title { display: none; }
.toc-mobile:not(:has(.toc)) { display: none; }

/* Footer of article --------------------------------------------------------- */
.article__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 16px 0 0;
	padding: 14px 18px;
	border-radius: 14px;
	background: var(--c-white);
	box-shadow: 0 0 0 1px var(--c-line);
}
.article__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.article__tags span { font-weight: 600; color: var(--c-muted); margin-right: 2px; }
.article__tags a { padding: 3px 12px; border-radius: 999px; background: var(--c-cream); color: var(--c-text); }
.article__tags a:hover { background: var(--c-primary); color: var(--c-white); }

.article-section-title { font-size: 20px; margin: 0 0 14px; text-transform: uppercase; }

.article-products { margin-top: 28px; }
.article-products ul.products.product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.article-cta {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 14px 16px;
	align-items: center;
	margin-top: 28px;
	padding: 20px;
	border-radius: 18px;
	background: linear-gradient(135deg, #fff5f7 0%, var(--c-cream) 100%);
	border: 1px dashed var(--c-pink);
}
.article-cta img { width: 64px; height: 64px; padding: 6px; border-radius: 50%; background: var(--c-white); object-fit: contain; }
.article-cta p { margin: 0; font-size: 14px; color: var(--c-muted); }
.article-cta__title { font-size: 17px !important; font-weight: 700; color: var(--c-text) !important; margin-bottom: 2px !important; }
.article-cta__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.article-cta__actions .btn { flex: 1; min-width: 150px; }
.article-cta__actions .icon { width: 18px; height: 18px; }

.article-nav { display: grid; gap: 12px; margin-top: 28px; }
.article-nav__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border-radius: 14px;
	background: var(--c-white);
	box-shadow: 0 0 0 1px var(--c-line);
	color: var(--c-text);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.4;
	transition: box-shadow .2s;
}
.article-nav__link:hover { box-shadow: var(--shadow-lg); color: var(--c-primary-dark); }
.article-nav__link img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.article-nav__link small { display: block; margin-bottom: 2px; color: var(--c-muted); font-weight: 500; font-size: 12px; }
.article-nav__link--next { flex-direction: row-reverse; text-align: right; }

/* Sidebar ----------------------------------------------------------------------- */
.article-sidebar__sticky { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 16px; }
.toc--sidebar,
.side-box { padding: 16px; border-radius: 16px; background: var(--c-white); box-shadow: 0 0 0 1px var(--c-line); }
.toc--sidebar .toc__list { max-height: 42vh; overflow-y: auto; }
.side-box__title { margin: 0 0 10px; font-weight: 700; font-size: 15px; }
.side-products { list-style: none; margin: 0; display: grid; gap: 10px; }
.side-products a { display: flex; gap: 10px; align-items: center; color: var(--c-text); }
.side-products img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--c-cream); }
.side-products__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 500; line-height: 1.35; }
.side-products__price { display: block; color: var(--c-sale); font-size: 14px; font-weight: 700; }
.side-products__price del { display: none; }
.side-products__price ins { text-decoration: none; }
.side-box--help { display: flex; align-items: center; gap: 12px; background: var(--c-primary); box-shadow: none; color: var(--c-white); }
.side-box--help .icon { width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.side-box--help p { margin: 0; font-size: 13px; line-height: 1.3; }
.side-box--help a { display: block; color: var(--c-white); font-size: 19px; font-weight: 700; }

/* Related posts ------------------------------------------------------------------- */
.article-related { margin-top: 36px; padding: 28px 0 8px; background: var(--c-white); border-top: 1px solid var(--c-line); }
.post-grid--related { grid-template-columns: 1fr; }

/* Comments ------------------------------------------------------------------------ */
.article .comments-area { margin-top: 28px; padding: 20px; border-radius: 16px; background: var(--c-white); box-shadow: 0 0 0 1px var(--c-line); }
.comments-title,
.comment-reply-title { font-size: 19px; margin: 0 0 12px; }
.comment-reply-title small { margin-left: 8px; font-size: 13px; font-weight: 400; }
.comment-list .comment-body { display: grid; gap: 4px; }
.comment-list .comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-list .avatar { border-radius: 50%; }
.comment-list .says { display: none; }
.comment-list .comment-metadata { font-size: 12px; }
.comment-list .comment-metadata a { color: var(--c-muted); }
.comment-list .comment-content { padding: 10px 14px; border-radius: 12px; background: var(--c-cream); }
.comment-list .comment-content p:last-child { margin: 0; }
.comment-list .children { list-style: none; margin: 10px 0 0 24px; padding: 0; }
.comment-list .reply a { font-size: 13px; font-weight: 600; }
.comment-form { display: grid; gap: 4px 14px; }
.comment-form p { margin: 0 0 10px; }
.comment-notes { font-size: 13px; color: var(--c-muted); }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--c-muted); }
.comment-form-cookies-consent label { font-weight: 400; margin: 0; }
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"] { background: var(--c-bg); }
.comment-form .form-submit { margin: 0; }

/* Tablet ------------------------------------------------------------------------ */
@media (min-width: 768px) {
	.article-hero { padding: 24px 0 36px; }
	.article-hero .share { width: auto; margin-left: auto; }
	.article__content { padding: 36px 44px; }
	.article-products ul.products.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.article-cta { grid-template-columns: auto 1fr auto; padding: 22px 26px; }
	.article-cta__actions { grid-column: auto; flex-direction: column; }
	.article-nav { grid-template-columns: 1fr 1fr; }
	.post-grid--related { grid-template-columns: repeat(3, 1fr); }
	.comment-form { grid-template-columns: 1fr 1fr; }
	.comment-form > :not(.comment-form-author):not(.comment-form-email) { grid-column: 1 / -1; }
	.article .comments-area { padding: 28px 32px; }
}

/* Desktop ------------------------------------------------------------------------- */
@media (min-width: 1024px) {
	.article-hero__inner { max-width: calc(var(--container) + var(--gutter) * 2); }
	.article-hero__title,
	.article-hero__lead,
	.article-hero__meta { max-width: 820px; }
	.article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; padding-top: 32px; }
	.article-sidebar { display: block; align-self: stretch; }
	.toc-mobile { display: none; }
}
