/**
 * Product detail page redesign — DRAFT ONLY.
 *
 * Status: NOT enqueued anywhere. The parent reviews, refines, and wires it
 * in (it must load AFTER storefront-polish.php for the cascade to behave).
 *
 * Scope: single download pages only (body.single-download). CSS ONLY — no
 * HTML, no JS, no text changes, no URL/slug/title changes.
 *
 * Hard rules honored here:
 * - NOTHING is hidden: there is no display:none anywhere in this file.
 *   Every section, field, button, and heading stays on the page.
 * - No generated text: there is no `content:` rule, so no label, badge, or
 *   claim is added or renamed. SAVE amounts keep coming from the plugin.
 * - Theme colors only: navy #0b1120, indigo #6366f1, violet #8b5cf6,
 *   purple #7c3aed/#6d28d9, gold #f59e0b, neutral grays.
 * - Overrides of existing plugin rules use the body.single-download prefix
 *   (higher specificity) instead of !important, except .emc-direct-save,
 *   whose layout lives in inline styles and can only be beaten with
 *   !important. Only layout properties use !important there — never colors
 *   or text.
 */

/* ============ 1. Page canvas ============
   The detail page is one centered column (theme .ef-container, max
   1290px). On a soft canvas the white section cards read as a designed
   surface instead of fragments floating in empty white space. */
body.single-download main.ef-content {
    background: #f8fafc;
    padding-bottom: 3.5rem;
}

/* ============ 2. Hero ============
   Title, lead, and rating row. The lead stays capped for readability —
   long text lines must never span the full 1290px. */
body.single-download .ef-pd-hero {
    margin: 0 0 2rem;
}

body.single-download .ef-pd-hero h1 {
    font-size: clamp(2rem, 3.4vw, 2.9rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #0b1120;
    margin: 0.5rem 0 1rem;
}

body.single-download .ef-pd-hero .ef-pd-lead {
    max-width: 860px;
    font-size: 17.5px;
    line-height: 1.85;
    color: #475569;
    margin: 0 0 22px;
}

/* Rating row as one tidy pill: stars + rating + sales + version. */
body.single-download .ef-pd-hero .ef-pd-hero__meta {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 10px 20px;
    margin: 0 0 30px;
    box-shadow: 0 2px 12px rgba(11, 17, 32, 0.05);
}

/* ============ 3. Product zone: gallery + buy card ============
   Gallery slightly larger than the buy card; both start at the top. */
body.single-download .ef-product {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    align-items: start;
}

body.single-download .ef-product .ef-product__gallery {
    min-width: 0;
}

body.single-download .ef-product .ef-product__gallery img {
    border-radius: 20px;
}

body.single-download .ef-product .ef-product__info {
    padding: 28px;
    min-width: 0;
}

/* Price, Buy button, demo/docs buttons, guarantees: keep the existing
   plugin styling (green buy, outline secondary). Only spacing is tuned. */
body.single-download .ef-product .ef-product__price {
    margin-bottom: 20px;
}

body.single-download .ef-product .ef-buybox__note {
    margin-top: 16px;
}

body.single-download .ef-product .ef-product__guarantees {
    margin-top: 22px;
}

/* ============ 4. Section system ============
   This is the core fix for the "amateur" feel. The theme defines NO
   .ef-pd-section rule at all, so sections previously stacked with only
   heading margins — uneven gaps, no rhythm. Every section now gets the
   same card, the same padding, and the same gap from its neighbour. */
body.single-download .ef-pd-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 2px 16px rgba(11, 17, 32, 0.05);
    padding: 30px 32px;
    margin-top: 28px;
}

body.single-download .ef-pd-section h2 {
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #0b1120;
    margin: 10px 0 22px;
}

/* Section labels keep the theme's purple pill exactly as-is. */
body.single-download .ef-pd-section .ef-eyebrow {
    margin-bottom: 0;
}

/* ============ 5. Description ============
   Full-width readable prose inside the card (the old 720px/760px caps
   are what used to strand text on the left with blank space right). */
body.single-download .ef-pd-description .ef-prose {
    font-size: 17.5px;
    line-height: 1.85;
    color: #334155;
    max-width: 100%;
}

body.single-download .ef-pd-description .ef-prose p {
    margin: 0 0 1.15em;
}

body.single-download .ef-pd-description .ef-prose strong {
    color: #0b1120;
}

body.single-download .ef-pd-description .ef-prose a {
    text-underline-offset: 3px;
}

/* SAVE callout ("SAVE $12 — Buy direct…"). Its colors/padding live in
   inline styles, so only layout is adjusted here, with !important. The
   pill and the text sit on one aligned row and wrap cleanly on mobile. */
body.single-download .emc-direct-save {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin: 1.5em 0 0 !important;
    border-radius: 16px !important;
}

/* ============ 6. Highlights ============
   Two-column cards with a soft hover lift; the number becomes a violet
   chip so all six cards share one visual system. */
body.single-download .ef-pd-features {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

body.single-download .ef-pd-feature {
    border-radius: 16px;
    padding: 24px 26px;
    box-shadow: 0 2px 12px rgba(11, 17, 32, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

body.single-download .ef-pd-feature:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(11, 17, 32, 0.1);
}

body.single-download .ef-pd-feature__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f5f3ff;
    color: #6d28d9;
    font-size: 13px;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

body.single-download .ef-pd-feature p {
    font-size: 16.5px;
    line-height: 1.65;
    color: #1f2937;
    margin: 0;
}

/* ============ 7. Compatibility — THE alignment fix ============
   Rows were an inline label + value with a 1rem gap, so every value
   started at a different x position (ragged, unaligned). Rows are now a
   real two-column grid: one fixed label column, one value column, so
   every value lines up vertically. */
body.single-download .ef-pd-compat {
    display: grid;
}

body.single-download .ef-pd-compat__row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 16px;
    align-items: baseline;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

body.single-download .ef-pd-compat__row:last-child {
    border-bottom: none;
}

body.single-download .ef-pd-compat__row span {
    margin-right: 0;
    color: #64748b;
    font-size: 15.5px;
}

body.single-download .ef-pd-compat__row strong {
    color: #0b1120;
    font-size: 16px;
}

/* ============ 8. Requirements ============
   Short lines no longer dangle down the left edge: a two-column grid
   of soft chips that fills the card. */
body.single-download .ef-pd-reqs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

body.single-download .ef-pd-reqs li {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 13px 16px;
    font-size: 16px;
    line-height: 1.55;
    color: #1f2937;
}

/* ============ 9. Changelog ============ */
body.single-download .ef-pd-changelog__entry {
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}

body.single-download .ef-pd-changelog__entry:last-child {
    border-bottom: none;
}

body.single-download .ef-pd-changelog__entry strong {
    color: #0b1120;
    font-size: 16.5px;
}

body.single-download .ef-pd-changelog__entry p {
    margin: 6px 0 0;
    color: #475569;
    line-height: 1.65;
}

/* ============ 10. FAQ ============
   Each question is its own bordered card; an open question gets a soft
   violet tint. All four questions stay visible and usable. */
body.single-download .ef-pd-faq__item {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 12px;
}

body.single-download .ef-pd-faq__item:last-child {
    margin-bottom: 0;
}

body.single-download .ef-pd-faq__item[open] {
    border-color: #ddd6fe;
    background: #faf9ff;
}

body.single-download .ef-pd-faq__item summary {
    font-size: 17px;
    font-weight: 700;
    color: #0b1120;
    cursor: pointer;
}

body.single-download .ef-pd-faq__item summary::marker {
    color: #7c3aed;
}

body.single-download .ef-pd-faq__item p {
    margin: 10px 0 0;
    color: #475569;
    line-height: 1.7;
}

/* ============ 11. Related products ============
   Only the wrapper and heading are touched; the related grid inside
   keeps the theme's own styling. */
body.single-download .ef-related {
    margin-top: 28px;
}

body.single-download .ef-related h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0b1120;
    margin: 0 0 20px;
}

/* ============ 12. Responsive ============ */
@media (max-width: 900px) {
    body.single-download .ef-product {
        grid-template-columns: 1fr;
    }

    body.single-download .ef-pd-section {
        padding: 24px 22px;
    }

    body.single-download .ef-pd-compat__row {
        grid-template-columns: 160px minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    body.single-download .ef-pd-features {
        grid-template-columns: 1fr;
    }

    body.single-download .ef-pd-reqs {
        grid-template-columns: 1fr;
    }

    /* Compat rows stack: label above its value, still left-aligned. */
    body.single-download .ef-pd-compat__row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    body.single-download .ef-pd-section {
        padding: 22px 18px;
    }

    body.single-download .ef-pd-section h2 {
        font-size: 24px;
    }

    body.single-download .ef-product .ef-product__info {
        padding: 22px 18px;
    }

    body.single-download .ef-product .ef-product__price {
        font-size: 30px;
    }

    /* Rating pill becomes a rounded box when it wraps. */
    body.single-download .ef-pd-hero .ef-pd-hero__meta {
        border-radius: 16px;
    }
}
