/* GRANADO ESPADA M — PC Download (ธีมเดียวกับ thank-you / เว็บหลัก) */
:root {
    --bg: #120c07;
    --gold: #d6a64a;
    --gold-hi: #f6d98f;
    --gold-deep: #8a5a1c;
    --gold-line: rgba(214, 166, 74, 0.45);
    --ink: #f2e6d0;
    --ink-2: #d4c3a6;
    --muted: #a8936f;
    --grad-gold: linear-gradient(180deg, #fbe7b0 0%, #e2b35c 48%, #a8702a 100%);
    --grad-gold-text: linear-gradient(180deg, #fff3cc 0%, #f1c872 50%, #b9802f 100%);
    --panel: linear-gradient(180deg, rgba(36, 24, 14, 0.78), rgba(12, 8, 4, 0.9));
    --font-body: "IBM Plex Sans Thai", "Prompt", system-ui, sans-serif;
    --font-head: "Prompt", "IBM Plex Sans Thai", sans-serif;
}

html {
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    background-image:
        linear-gradient(180deg, rgba(8, 5, 3, 0.78) 0%, rgba(18, 12, 7, 0.7) 30%, rgba(8, 5, 3, 0.92) 70%, rgba(8, 5, 3, 0.96) 100%),
        url("../../official/assets/img/bg-hero.webp");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    color: var(--ink);
}

.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.page-wrapper > .footer-custom {
    margin-top: auto;
    flex-shrink: 0;
}

/* ---------- แถบบน ---------- */
.page-top {
    padding: 0.75rem 0;
    background: rgba(12, 8, 4, 0.72);
    border-bottom: 1px solid rgba(214, 166, 74, 0.3);
    backdrop-filter: blur(6px);
}

.page-top__logo img {
    display: block;
    width: auto;
    height: 44px;
}

.page-top__back {
    font-family: var(--font-head);
    font-size: 0.9rem;
    color: var(--ink-2);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.page-top__back:hover,
.page-top__back:focus {
    color: var(--gold-hi);
}

/* ---------- หัวหน้า ---------- */
.page-main {
    padding: 2.5rem 0 4rem;
}

.page-main > .container {
    max-width: 1000px;
}

.dl-hero {
    margin-bottom: 2.25rem;
}

.dl-logo {
    width: min(100%, 320px);
    height: auto;
    margin-bottom: 1rem;
}

.dl-eyebrow {
    margin: 0 0 0.35rem;
    font-family: var(--font-head);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
}

.dl-title {
    margin: 0 0 0.75rem;
    font-family: var(--font-head);
    font-size: clamp(1.4rem, 3.6vw, 2.1rem);
    font-weight: 600;
    line-height: 1.35;
    background: var(--grad-gold-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.dl-lead {
    margin: 0 auto;
    max-width: 560px;
    color: var(--ink-2);
    font-size: clamp(0.95rem, 2.4vw, 1.05rem);
    line-height: 1.75;
}

/* ---------- การ์ดดาวน์โหลด ---------- */
.dl-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.dl-card,
.dl-table-wrap {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--gold-line);
    border-radius: 6px;
    box-shadow:
        inset 0 0 0 1px rgba(246, 217, 143, 0.08),
        0 22px 56px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
}

.dl-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.75rem 1.9rem;
    text-align: center;
}

.dl-card::before,
.dl-card::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
    border-color: var(--gold-hi);
    border-style: solid;
}

.dl-card::before {
    top: 9px;
    left: 9px;
    border-width: 1px 0 0 1px;
}

.dl-card::after {
    right: 9px;
    bottom: 9px;
    border-width: 0 1px 1px 0;
}

.dl-card__icon {
    font-size: 2.4rem;
    line-height: 1;
    margin-bottom: 0.75rem;
    background: var(--grad-gold-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 6px 16px rgba(214, 166, 74, 0.28));
}

.dl-card__title {
    margin: 0 0 0.5rem;
    font-family: var(--font-head);
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--gold-hi);
}

.dl-card__size {
    margin: 0 0 0.35rem;
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--ink);
}

.dl-card__size .bi {
    color: var(--gold);
    margin-right: 0.25rem;
}

.dl-card__desc {
    margin: 0 0 1.5rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.dl-card__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
    margin-top: auto;
}

.btn-download {
    width: 100%;
    padding: 0.8rem 0.6rem;
    white-space: nowrap;
    font-family: var(--font-head);
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #2a1706;
    background: var(--grad-gold);
    border: 1px solid #fbe3a3;
    border-radius: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 4px 18px rgba(214, 166, 74, 0.28);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-download .bi {
    margin-right: 0.35rem;
}

.btn-download:hover,
.btn-download:focus-visible {
    color: #2a1706;
    transform: translateY(-2px);
    filter: brightness(1.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 0 18px rgba(246, 201, 110, 0.45);
}

.btn-download.is-pending {
    cursor: not-allowed;
    pointer-events: none;
    color: var(--muted);
    background: rgba(10, 6, 3, 0.45);
    border-color: var(--gold-line);
    box-shadow: none;
}

/* ---------- ตาราง ---------- */
.dl-section + .dl-section {
    margin-top: 2.5rem;
}

.dl-section__title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1rem;
    font-family: var(--font-head);
    font-size: clamp(1.2rem, 2.8vw, 1.5rem);
    font-weight: 600;
    color: var(--gold-hi);
}

.dl-section__title .bi {
    color: var(--gold);
}

.dl-table-wrap {
    overflow: hidden;
}

.dl-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--ink-2);
    font-size: 0.98rem;
    line-height: 1.6;
}

.dl-table th,
.dl-table td {
    padding: 0.85rem 1.25rem;
    text-align: center;
    vertical-align: middle;
}

.dl-table thead th {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.03em;
    color: var(--gold-hi);
    background: rgba(214, 166, 74, 0.12);
    border-bottom: 1px solid var(--gold-line);
}

.dl-table tbody th {
    font-weight: 500;
    color: var(--ink);
    width: 32%;
}

.dl-table tbody tr + tr {
    border-top: 1px solid rgba(214, 166, 74, 0.16);
}

.dl-table tbody tr:nth-child(even) {
    background: rgba(246, 217, 143, 0.035);
}

/* ---------- footer ---------- */
.footer-custom {
    padding: 1.6rem 1rem 1.8rem;
    background: rgba(12, 8, 4, 0.82);
    border-top: 1px solid rgba(214, 166, 74, 0.3);
}

.footer-logos-img {
    width: min(420px, 100%);
    margin-bottom: 0.75rem;
}

.footer-copy {
    font-size: 11px;
    line-height: 1.7;
    letter-spacing: 0.02em;
    color: var(--muted);
}

/* ---------- จอเล็ก ---------- */
@media (max-width: 767.98px) {
    body {
        background-attachment: scroll;
    }

    .dl-options {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2.5rem;
    }

    .dl-table th,
    .dl-table td {
        padding: 0.75rem 0.75rem;
        font-size: 0.9rem;
    }

    .dl-table thead th {
        font-size: 0.82rem;
    }
}

@media (max-width: 575.98px) {
    .page-top__logo img {
        height: 36px;
    }

    .page-main {
        padding: 1.75rem 0 3rem;
    }

    .dl-logo {
        width: min(100%, 240px);
    }

    .dl-card {
        padding: 1.6rem 1.25rem 1.5rem;
    }

    .dl-card__actions {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .dl-table th,
    .dl-table td {
        padding: 0.65rem 0.5rem;
    }
}
