/* ============================================================
   Single Post — TaylorMade editorial style
   ============================================================ */

:root {
    --sp-dark   : #0a0a0a;
    --sp-body   : #1a1a1a;
    --sp-muted  : #666666;
    --sp-border : #e8e8e8;
    --sp-bg     : #f5f5f5;
    --sp-red    : #cc0000;
    --sp-white  : #ffffff;
    --sp-col    : 740px;
}

/* Balance Astra footer stub */
.sp-content-stub { display: none !important; }

/* ── Page wrapper ──────────────────────────────────────────── */
.sp-wrap {
    width: 100%;
    background: var(--sp-white);
}

/* ── Centered column helper ────────────────────────────────── */
.sp-container {
    max-width: var(--sp-col);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ── Hero image ────────────────────────────────────────────── */
.sp-hero {
    position: relative;
    width: 100%;
    height: 540px;
    overflow: hidden;
    background: #111;
}

.sp-hero--no-img {
    height: 64px;
}

.sp-hero__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.sp-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, .55) 0%,
        rgba(0, 0, 0, .08) 45%,
        transparent 100%
    );
    pointer-events: none;
}

/* ── Category nav bar (full-width strip between hero & header) ─ */
.sp-cat-bar {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sp-cat-bar__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    overflow-x: auto;
    scrollbar-width: none;
}

.sp-cat-bar__inner::-webkit-scrollbar { display: none; }

/* Override na-cat-nav margin when inside sp-cat-bar */
.sp-cat-bar .na-cat-nav {
    margin-bottom: 0;
    flex-wrap: nowrap;
    padding: 8px 0;
    gap: 2px;
}

.sp-cat-bar .na-cat-nav__item {
    padding: 7px 16px;
    font-size: 11px;
}

@media (max-width: 767px) {
    .sp-cat-bar__inner { padding: 0 16px; }
}

/* ── Article header ────────────────────────────────────────── */
.sp-header {
    background: var(--sp-white);
    padding: 48px 0 36px;
    border-bottom: 1px solid var(--sp-border);
}

/* Back → Tin tức */
.sp-breadcrumb {
    margin-bottom: 28px;
}

.sp-breadcrumb__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sp-muted);
    text-decoration: none;
    transition: color .15s;
}

.sp-breadcrumb__back:hover { color: var(--sp-dark); }

.sp-breadcrumb__back svg { flex-shrink: 0; transition: transform .2s; }
.sp-breadcrumb__back:hover svg { transform: translateX(-4px); }

/* Category badges */
.sp-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.sp-cat-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--sp-white) !important;
    background: var(--sp-red);
    text-decoration: none !important;
    border-radius: 2px;
    transition: opacity .15s;
}

.sp-cat-badge:hover { opacity: .8; }

/* Headline */
.sp-title {
    font-size: clamp(26px, 3.8vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: var(--sp-dark);
    margin: 0 0 24px;
}

/* Meta */
.sp-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    color: var(--sp-muted);
    line-height: 1.4;
    gap: 0;
}

.sp-meta__dot {
    margin: 0 8px;
    color: #ccc;
}

.sp-meta time { color: inherit; }

/* ── Article body ──────────────────────────────────────────── */
.sp-body {
    padding: 52px 0 64px;
}

/* Reset first child margin */
.sp-body .sp-container > *:first-child { margin-top: 0; }

/* Paragraphs */
.sp-body p {
    font-size: 17px;
    line-height: 1.9;
    color: #2a2a2a;
    margin: 0 0 26px;
}

/* Headings inside content */
.sp-body h2 {
    font-size: clamp(21px, 2.4vw, 28px);
    font-weight: 800;
    line-height: 1.25;
    color: var(--sp-dark);
    margin: 52px 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--sp-dark);
    letter-spacing: -.01em;
}

.sp-body h3 {
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 700;
    line-height: 1.35;
    color: var(--sp-dark);
    margin: 40px 0 12px;
}

.sp-body h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--sp-dark);
    margin: 32px 0 10px;
}

/* Lists */
.sp-body ul,
.sp-body ol {
    font-size: 17px;
    line-height: 1.8;
    color: #2a2a2a;
    margin: 0 0 26px;
    padding-left: 24px;
}

.sp-body li { margin-bottom: 8px; }

/* Links */
.sp-body a {
    color: var(--sp-red);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity .15s;
}

.sp-body a:hover { opacity: .72; }

/* Blockquote */
.sp-body blockquote {
    position: relative;
    margin: 40px 0;
    padding: 24px 32px;
    border-left: 4px solid var(--sp-red);
    background: var(--sp-bg);
    font-size: 20px;
    font-style: italic;
    line-height: 1.65;
    color: #333;
}

.sp-body blockquote p {
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    margin: 0;
}

.sp-body blockquote cite {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sp-muted);
}

/* Images */
.sp-body img {
    max-width: 100%;
    height: auto;
    display: block;
}

.sp-body figure {
    margin: 36px 0;
}

.sp-body figcaption {
    font-size: 13px;
    color: var(--sp-muted);
    text-align: center;
    padding-top: 10px;
    font-style: italic;
    line-height: 1.5;
}

/* Full-width & wide image breakout */
.sp-body .alignfull,
.sp-body .wp-block-image.alignfull img {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    border-radius: 0;
}

.sp-body .alignwide,
.sp-body .wp-block-image.alignwide img {
    margin-left: -100px;
    margin-right: -100px;
    max-width: calc(100% + 200px);
    width: calc(100% + 200px);
}

/* Horizontal rule */
.sp-body hr {
    border: none;
    border-top: 1px solid var(--sp-border);
    margin: 48px 0;
}

/* Tables */
.sp-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    margin: 32px 0;
}

.sp-body th,
.sp-body td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--sp-border);
}

.sp-body th {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sp-muted);
    background: var(--sp-bg);
}

/* ── Tags strip ────────────────────────────────────────────── */
.sp-tags-wrap {
    padding: 28px 0 36px;
    border-top: 1px solid var(--sp-border);
    background: var(--sp-white);
}

.sp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sp-tag {
    display: inline-block;
    padding: 5px 14px;
    border: 1px solid var(--sp-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--sp-muted);
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
    border-radius: 20px;
}

.sp-tag:hover {
    border-color: var(--sp-dark);
    color: var(--sp-dark);
    background: var(--sp-bg);
}

/* ── Related articles ──────────────────────────────────────── */
.sp-related {
    background: var(--sp-bg);
    padding: 60px 0 72px;
}

.sp-related__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.sp-related__heading {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sp-dark);
    margin: 0 0 32px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--sp-dark);
    display: inline-block;
}

.sp-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .sp-related__inner { padding: 0 24px; }
    .sp-related__grid  { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 767px) {
    .sp-hero { height: 280px; }

    .sp-header { padding: 28px 0 24px; }

    .sp-body { padding: 32px 0 48px; }

    .sp-body p,
    .sp-body ul,
    .sp-body ol { font-size: 16px; line-height: 1.8; }

    .sp-body blockquote { font-size: 18px; padding: 18px 22px; }

    .sp-body .alignwide,
    .sp-body .wp-block-image.alignwide img {
        margin-left: -24px;
        margin-right: -24px;
        max-width: calc(100% + 48px);
        width: calc(100% + 48px);
    }

    .sp-related { padding: 40px 0 52px; }
    .sp-related__inner { padding: 0 16px; }
    .sp-related__grid  { grid-template-columns: 1fr; gap: 16px; }
}

/* ── Post featured product block override ──────────────────── */
/* The sv2-post-product block is injected via the_content() filter.
   Override border-radius to match editorial flat aesthetic. */
.sp-body .sv2-post-product {
    margin: 48px 0;
    border-radius: 0;
    border: 1px solid var(--sp-border);
}
