/* Collection page article: magazine-style buying guide (loaded by collections.php only).
   Fonts: Fraunces (headings) + Source Serif 4 (body), linked in collections.php. */

.collectionArticle {
    --ca-ink: #1f2a37;
    --ca-text: #36404d;
    --ca-muted: #6b7684;
    --ca-accent: #2f6fd6;
    --ca-accent-2: #1f2a37;
    --ca-warm: #f6f1ea;
    --ca-soft: #f5f7fb;
    --ca-line: #e6e9ef;
    --ca-radius: 16px;
    --ca-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --ca-display: 'Fraunces', Georgia, serif;
    --ca-sans: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;

    max-width: 760px;
    margin: 64px auto 56px auto;
    padding: 0 20px;
    font-family: var(--ca-serif);
    font-size: 1.16rem;
    line-height: 1.75;
    color: var(--ca-text);
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

.collectionArticle *, .collectionArticle *::before, .collectionArticle *::after { box-sizing: border-box; }

/* Kicker above the article */
.collectionArticle::before {
    content: 'Buying guide';
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 14px;
    font-family: var(--ca-sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ca-accent);
    background: #edf3fd;
    border-radius: 999px;
}

.collectionArticle p { margin: 0 0 1.3em 0; }

/* Lead paragraph + drop cap (first paragraph after the first H2) */
.collectionArticle > h2:first-of-type + p {
    font-size: 1.32rem;
    line-height: 1.6;
    color: var(--ca-ink);
}

.collectionArticle > h2:first-of-type + p::first-letter {
    float: left;
    font-family: var(--ca-display);
    font-size: 4.1em;
    line-height: 0.82;
    font-weight: 600;
    margin: 0.06em 0.1em 0 0;
    color: var(--ca-accent);
}

/* Headings */
.collectionArticle h2 {
    font-family: var(--ca-display);
    font-size: 2.1rem;
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--ca-ink);
    margin: 2.4em 0 0.7em 0;
    scroll-margin-top: 90px;
}

.collectionArticle > h2:first-of-type { margin-top: 0.2em; font-size: 2.5rem; }

.collectionArticle h3 {
    font-family: var(--ca-sans);
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: -0.005em;
    color: var(--ca-ink);
    margin: 1.9em 0 0.5em 0;
    line-height: 1.4;
}

/* Links */
.collectionArticle a,
.collectionHeaderContainer p a {
    color: #2f6fd6;
    text-decoration: underline;
    text-decoration-color: rgba(47, 111, 214, 0.35);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
    transition: color .15s, text-decoration-color .15s;
}

.collectionArticle a:hover,
.collectionHeaderContainer p a:hover { color: #1b4fa8; text-decoration-color: currentColor; }

.collectionArticle strong { color: var(--ca-ink); font-weight: 700; }

/* Table of contents (built by collection-article.js) */
.collectionArticle .caToc {
    margin: 0 0 2.6em 0;
    padding: 26px 30px;
    background: var(--ca-warm);
    border-radius: var(--ca-radius);
    font-family: var(--ca-sans);
}

.collectionArticle .caToc strong {
    display: block;
    margin-bottom: 12px;
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8a6d46;
}

.collectionArticle .caToc ol { margin: 0; padding: 0; counter-reset: toc; columns: 2; column-gap: 32px; }
.collectionArticle .caToc li {
    counter-increment: toc;
    break-inside: avoid;
    padding: 5px 0 5px 30px !important;
    margin: 0 !important;
    background: none !important;
    font-size: 0.95rem;
    line-height: 1.45;
}
.collectionArticle .caToc li::before {
    content: counter(toc, decimal-leading-zero) !important;
    position: absolute; left: 0; top: 6px !important;
    width: auto !important; height: auto !important;
    background: none !important;
    font-size: 0.8rem !important; font-weight: 700;
    color: #b08a57 !important; line-height: 1.6 !important;
}
.collectionArticle .caToc a { color: var(--ca-ink); text-decoration: none; }
.collectionArticle .caToc a:hover { color: var(--ca-accent); text-decoration: underline; }

/* Lifestyle images: full bleed beyond the text column */
.collectionArticle > img,
.collectionArticle p > img {
    display: block;
    width: calc(100% + 120px);
    max-width: calc(100vw - 40px);
    height: auto;
    margin: 2.4em -60px;
    border-radius: 20px;
    box-shadow: 0 24px 50px -20px rgba(31, 42, 55, 0.35);
}

/* Product pictures: centred editorial card */
.collectionArticle figure.productPic {
    display: block;
    clear: both;
    float: none;
    width: 100%;
    margin: 2.2em auto;
    padding: 28px 28px 22px 28px;
    background: #fff;
    border: 1px solid var(--ca-line);
    border-radius: 20px;
    box-shadow: 0 18px 40px -24px rgba(31, 42, 55, 0.35);
    text-align: center;
}

.collectionArticle figure.productPic > a { display: block; }

.collectionArticle figure.productPic img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 360px;
    margin: 0 auto 20px auto;
    object-fit: contain;
    transition: transform .3s ease;
}

.collectionArticle figure.productPic:hover img { transform: scale(1.03); }

.collectionArticle figure.productPic figcaption {
    max-width: 560px;
    margin: 0 auto;
    padding-top: 18px;
    border-top: 1px solid var(--ca-line);
    font-family: var(--ca-sans);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ca-muted);
    text-align: center;
}

.collectionArticle figure.productPic figcaption a {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ca-ink);
    text-decoration: none;
}

.collectionArticle figure.productPic figcaption a::after {
    content: '\2192';
    display: inline-block;
    margin-left: 6px;
    color: var(--ca-accent);
    transition: transform .2s;
}

.collectionArticle figure.productPic figcaption a:hover { color: var(--ca-accent); }
.collectionArticle figure.productPic figcaption a:hover::after { transform: translateX(4px); }

/* Bullet lists */
.collectionArticle ul { list-style: none; padding: 0; margin: 0 0 1.6em 0; }

.collectionArticle ul li {
    position: relative;
    padding-left: 34px;
    margin-bottom: 0.75em;
}

.collectionArticle ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #edf3fd url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%232f6fd6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/15px no-repeat;
}

/* Numbered lists: step cards */
.collectionArticle ol { list-style: none; counter-reset: ca-step; padding: 0; margin: 0 0 1.8em 0; }

.collectionArticle ol li {
    counter-increment: ca-step;
    position: relative;
    padding: 18px 20px 18px 74px;
    margin-bottom: 12px;
    background: #faf7f2;
    border-left: 3px solid #e4d6c1;
    border-radius: 4px 14px 14px 4px;
    line-height: 1.6;
}

.collectionArticle ol li::before {
    content: counter(ca-step, decimal-leading-zero);
    position: absolute;
    left: 20px;
    top: 13px;
    font-family: var(--ca-display);
    font-weight: 600;
    font-size: 1.7rem;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #b08a57;
}

/* Tables: clean comparison style */
.collectionArticle .caTableWrap {
    margin: 2.2em -40px 2.6em -40px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--ca-line);
    box-shadow: 0 18px 40px -26px rgba(31, 42, 55, 0.4);
    overflow-x: auto;
}

.collectionArticle table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--ca-sans);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.collectionArticle .caTableWrap > table { margin: 0; }

.collectionArticle thead th {
    padding: 18px 20px;
    background: #fafbfd;
    border-bottom: 2px solid var(--ca-ink);
    text-align: left;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ca-ink);
    white-space: nowrap;
}

.collectionArticle td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--ca-line);
    vertical-align: top;
    color: var(--ca-text);
}

.collectionArticle tbody tr:last-child td { border-bottom: 0; }
.collectionArticle tbody tr { transition: background .15s; }
.collectionArticle tbody tr:hover { background: #f7f9fe; }

.collectionArticle tbody td:first-child {
    font-weight: 700;
    color: var(--ca-ink);
    white-space: nowrap;
}

.collectionArticle thead th:first-child:empty { background: #fafbfd; }

/* FAQ accordion (built by collection-article.js) */
.collectionArticle .caFaq {
    margin: 0 0 12px 0;
    border: 1px solid var(--ca-line);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow .2s;
}

.collectionArticle .caFaq[open] { box-shadow: 0 14px 30px -20px rgba(31, 42, 55, 0.35); }

.collectionArticle .caFaq summary {
    list-style: none;
    cursor: pointer;
    position: relative;
    padding: 20px 60px 20px 24px;
    font-family: var(--ca-sans);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ca-ink);
    line-height: 1.45;
}

.collectionArticle .caFaq summary::-webkit-details-marker { display: none; }

.collectionArticle .caFaq summary::after {
    content: '+';
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px; height: 30px; line-height: 28px;
    text-align: center;
    border-radius: 50%;
    background: #edf3fd;
    color: var(--ca-accent);
    font-size: 1.3rem;
    font-weight: 400;
    transition: transform .2s;
}

.collectionArticle .caFaq[open] summary::after { content: '\2212'; }
.collectionArticle .caFaq > div { padding: 0 24px 6px 24px; }

/* Callouts */
.collectionArticle blockquote {
    margin: 2em 0;
    padding: 6px 0 6px 26px;
    border-left: 3px solid var(--ca-accent);
    font-family: var(--ca-display);
    font-size: 1.45rem;
    line-height: 1.45;
    color: var(--ca-ink);
}

.collectionArticle::after { content: ''; display: table; clear: both; }

/* Tablet */
@media (max-width: 900px) {
    .collectionArticle > img, .collectionArticle p > img { width: 100%; margin: 2em 0; }
    .collectionArticle .caTableWrap { margin-left: 0; margin-right: 0; }
}

/* Phone */
@media (max-width: 640px) {
    .collectionArticle { margin: 40px auto; padding: 0 16px; font-size: 1.06rem; }
    .collectionArticle h2 { font-size: 1.6rem; }
    .collectionArticle > h2:first-of-type { font-size: 1.85rem; }
    .collectionArticle > h2:first-of-type + p { font-size: 1.15rem; }
    .collectionArticle .caToc { padding: 22px; }
    .collectionArticle .caToc ol { columns: 1; }
    .collectionArticle figure.productPic { padding: 20px 18px 16px 18px; }
    .collectionArticle > img, .collectionArticle p > img { border-radius: 14px; }
    .collectionArticle ol li { padding-left: 64px; }

    /* Tables become stacked cards; labels come from data-label (collection-article.js) */
    .collectionArticle .caTableWrap { border: 0; box-shadow: none; background: none; overflow: visible; }
    .collectionArticle table, .collectionArticle tbody, .collectionArticle tr, .collectionArticle td { display: block; width: 100%; }
    .collectionArticle thead { display: none; }
    .collectionArticle tbody tr {
        margin-bottom: 14px;
        padding: 6px 0;
        background: #fff;
        border: 1px solid var(--ca-line);
        border-radius: 14px;
        box-shadow: 0 10px 24px -18px rgba(31, 42, 55, 0.4);
    }
    .collectionArticle tbody td { border: 0; padding: 8px 18px; white-space: normal; }
    .collectionArticle tbody td:first-child {
        font-family: var(--ca-display);
        font-size: 1.1rem;
        padding-top: 12px;
        border-bottom: 1px solid var(--ca-line);
        margin-bottom: 4px;
    }
    .collectionArticle tbody td[data-label]:not(:first-child)::before {
        content: attr(data-label);
        display: block;
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--ca-muted);
    }
}
