/* =====================================================================
   Winghorizon — Page-specific styles
   ===================================================================== */

/* ---------- HERO ---------- */
.hero {
    position: relative;
    padding: 5rem 1rem 4rem;
    text-align: center;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 50% 40%, rgba(255,26,26,.2) 0%, transparent 60%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><path d='M0 0h40v40H0z' fill='none'/><path d='M0 20h40M20 0v40' stroke='%23ffffff' stroke-opacity='.025'/></svg>");
    z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 900;
    background: linear-gradient(180deg, var(--white) 30%, var(--red-1) 120%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 60px var(--red-glow);
    margin-bottom: 1rem;
    letter-spacing: .05em;
}
.hero-sub {
    font-family: var(--font-thai);
    font-size: clamp(1rem, 2vw, 1.35rem);
    color: var(--gray-1);
    margin-bottom: .35rem;
}
.hero-sub.en {
    font-family: var(--font-body);
    color: var(--gray-2);
    font-style: italic;
    letter-spacing: .05em;
}
.hero-cta {
    margin-top: 2rem;
    display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap;
}
.hero-banner {
    margin-top: 3rem;
    max-width: 760px;
    margin-left: auto; margin-right: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,.6));
}

/* ---------- WHY US ---------- */
.whyus-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}
@media (max-width: 768px) { .whyus-grid { grid-template-columns: 1fr; } }

.whyus-item {
    text-align: center;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,.05);
    background: rgba(255,255,255,.02);
    border-radius: var(--radius);
    transition: all var(--transition);
}
.whyus-item:hover {
    border-color: rgba(255,26,26,.3);
    background: rgba(255,26,26,.04);
    transform: translateY(-3px);
}
.whyus-item i {
    font-size: 2.4rem;
    color: var(--red-1);
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 12px var(--red-glow));
}

/* ---------- ABOUT ---------- */
.about-wrap {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
    align-items: center;
}
@media (max-width: 768px) {
    .about-wrap { grid-template-columns: 1fr; }
}
.about-text p {
    color: var(--gray-1);
    font-family: var(--font-thai);
    font-size: 1.05rem;
    line-height: 1.85;
}

/* ---------- CONTACT ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: var(--radius);
    background: linear-gradient(160deg, var(--bg-3) 0%, var(--bg-2) 100%);
    border: 1px solid rgba(255,255,255,.06);
    transition: all var(--transition);
}
.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,.5), 0 0 22px rgba(255,26,26,.15);
    border-color: var(--red-2);
}
.contact-card img { max-height: 120px; margin-bottom: 1rem; }
.contact-card i {
    font-size: 3rem;
    color: var(--red-1);
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 12px var(--red-glow));
}
.contact-card h5 {
    font-family: var(--font-display);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* ---------- LEGAL PAGES ---------- */
.legal-content {
    max-width: 920px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(160deg, var(--bg-3) 0%, var(--bg-2) 100%);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.06);
}
.legal-content h1 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    border-bottom: 2px solid var(--red-2);
    padding-bottom: .8rem;
    margin-bottom: 1.5rem;
}
.legal-content h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--red-1);
    margin-top: 2rem;
    margin-bottom: .8rem;
}
.legal-content p, .legal-content li {
    color: var(--gray-1);
    font-family: var(--font-thai);
    line-height: 1.85;
}
.legal-content ul { padding-left: 1.4rem; }

/* ---------- MEMBER PAGE ---------- */
.member-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 768px) { .member-grid { grid-template-columns: 1fr; } }

.profile-card {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(160deg, var(--bg-3) 0%, var(--bg-2) 100%);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius);
}
.profile-card .avatar {
    width: 90px; height: 90px;
    margin: 0 auto 1rem;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red-2), var(--red-3));
    color: var(--white);
    font-size: 2.5rem;
    box-shadow: 0 6px 22px var(--red-glow);
}
.profile-card .info-list {
    list-style: none; padding: 0; margin: 1rem 0 0; text-align: left;
}
.profile-card .info-list li {
    padding: .55rem 0;
    border-top: 1px dashed rgba(255,255,255,.07);
    color: var(--gray-1);
    font-family: var(--font-thai);
}
.profile-card .info-list li:first-child { border-top: 0; }
.profile-card .info-list i { color: var(--red-1); margin-right: .5rem; }

/* ---------- GIFT PAGE ---------- */
.gift-instructions {
    background: rgba(255,209,102,.06);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.2rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}
.gift-instructions h5 {
    font-family: var(--font-display);
    color: var(--accent);
    font-size: .9rem;
    letter-spacing: .15em;
    margin-bottom: .6rem;
}
.gift-instructions ol {
    padding-left: 1.2rem; color: var(--gray-1); font-family: var(--font-thai);
}

/* ---------- UNDER CONSTRUCTION (fallback if any) ---------- */
.under-construction {
    text-align: center;
    padding: 5rem 1rem;
}
.under-construction i {
    font-size: 4rem;
    color: var(--red-1);
    filter: drop-shadow(0 0 16px var(--red-glow));
    margin-bottom: 1.5rem;
}

/* ---------- BREADCRUMB / PAGE HEAD ---------- */
.page-head {
    padding: 4rem 1rem 2rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(255,26,26,.08) 0%, transparent 100%);
}
.page-head h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    background: linear-gradient(180deg, var(--white) 40%, var(--red-1) 130%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* =====================================================================
   Wallet Hero (Profile page)
   ===================================================================== */
.wallet-hero {
    position: relative;
    background: linear-gradient(135deg, rgba(255,26,26,.15) 0%, rgba(20,20,20,.8) 60%, rgba(0,0,0,.9) 100%);
    border: 1px solid rgba(255,26,26,.25);
    overflow: hidden;
    padding: 0;
}
.wallet-hero::before {
    content: '';
    position: absolute;
    top: -40%; right: -10%;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(255,26,26,.35) 0%, transparent 65%);
    filter: blur(8px);
    pointer-events: none;
}
.wallet-hero::after {
    content: '\f51e'; /* fa-coins */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: -30px; right: 20px;
    font-size: 9rem;
    color: rgba(255,26,26,.07);
    pointer-events: none;
}
.wallet-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem 2rem;
    flex-wrap: wrap;
}
.wallet-hero-balance { flex: 1 1 240px; }
.wallet-label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: var(--gray-2);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: .3rem;
    font-family: var(--font-display, sans-serif);
}
.wallet-label i {
    color: var(--red-1);
    filter: drop-shadow(0 0 8px var(--red-glow));
}
.wallet-amount {
    font-family: var(--font-display, sans-serif);
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(180deg, var(--white) 40%, var(--red-1) 130%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 0 40px rgba(255,26,26,.4);
}
.wallet-amount small {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-1);
    margin-left: .5rem;
    -webkit-text-fill-color: var(--gray-1);
    text-shadow: none;
}
.wallet-hero-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}
.wallet-hero-actions .btn {
    min-width: 170px;
    text-align: center;
}

@media (max-width: 640px) {
    .wallet-hero-inner { padding: 1.5rem; flex-direction: column; align-items: stretch; text-align: center; }
    .wallet-hero-actions { justify-content: center; }
    .wallet-hero-actions .btn { flex: 1 1 auto; }
}

/* =====================================================================
   Donate / QR PromptPay
   ===================================================================== */
.donate-wrap {
    max-width: 960px;
    margin: 0 auto;
}

.donate-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.balance-chip {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: linear-gradient(135deg, rgba(255,26,26,.15), rgba(255,26,26,.05));
    border: 1px solid rgba(255,26,26,.3);
    border-radius: 12px;
    padding: .75rem 1.25rem;
}
.balance-chip i {
    font-size: 1.6rem;
    color: var(--red-1);
    filter: drop-shadow(0 0 8px var(--red-glow));
}
.balance-chip .balance-label {
    display: block;
    font-size: .8rem;
    color: var(--gray-2);
    font-family: var(--font-display, sans-serif);
}
.balance-chip .balance-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
}

.donate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.donate-qr {
    text-align: center;
}
.donate-qr img {
    width: 100%;
    max-width: 280px;
    margin: 1rem auto;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.4), 0 0 0 4px rgba(255,255,255,.04);
    background: #fff;
    padding: .5rem;
}
.donate-timer-label {
    font-size: .85rem;
    color: var(--gray-2);
    margin-top: 1rem;
    margin-bottom: .2rem;
}
.donate-timer {
    font-family: 'Consolas', monospace;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--red-1);
    text-shadow: 0 0 16px var(--red-glow);
    margin: 0;
    letter-spacing: 2px;
}
.donate-timer.expired {
    color: var(--gray-2);
    text-shadow: none;
}

.poll-status {
    margin-top: 1rem;
    padding: .6rem 1rem;
    background: rgba(30,126,52,.12);
    border: 1px solid rgba(30,126,52,.3);
    border-radius: 10px;
    color: #6ee7a3;
    font-size: .82rem;
    text-align: center;
}
.poll-status i { color: #6ee7a3; margin-right: .3rem; }
.poll-status small { display: block; margin-top: .15rem; opacity: .6; font-size: .7rem; }

.donate-info .info-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}
.donate-info .info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .7rem 0;
    border-bottom: 1px dashed rgba(255,255,255,.08);
}
.donate-info .info-list li:last-child { border-bottom: 0; }
.donate-info .info-list span {
    color: var(--gray-2);
    font-size: .9rem;
}
.donate-info .info-list strong {
    font-weight: 700;
    color: var(--white);
}

.donate-amount-box {
    background: rgba(255,26,26,.08);
    border: 1px dashed rgba(255,26,26,.4);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    margin: 1rem 0;
}
.donate-amount-box .amount-label {
    display: block;
    font-size: .85rem;
    color: var(--gray-2);
    margin-bottom: .3rem;
}
.donate-amount-box .amount-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--red-1);
    text-shadow: 0 0 12px var(--red-glow);
}
.donate-amount-box .amount-value small {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-1);
    margin-left: .3rem;
}
.donate-amount-box .amount-warn {
    margin: .8rem 0 0;
    font-size: .82rem;
    color: #ffb84d;
}

.donate-steps {
    margin: 1rem 0;
    padding-left: 1.2rem;
    line-height: 1.9;
    color: var(--gray-1);
}
.donate-steps li::marker {
    color: var(--red-1);
    font-weight: 700;
}

.donate-note {
    background: rgba(255,255,255,.03);
    border-radius: 10px;
    padding: 1rem;
    color: var(--gray-1);
    font-size: .92rem;
    margin: 1rem 0 0;
    line-height: 1.7;
}
.donate-note i {
    color: #ffd966;
    margin-right: .4rem;
}

.donate-quick {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin: .5rem 0;
}
.donate-quick .btn {
    flex: 1 1 60px;
    min-width: 60px;
}

/* ---------- Pay methods (PromptPay + Bank list) ---------- */
.pay-method {
    background: rgba(255,255,255,.025);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}
.pay-method-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .5rem;
    font-family: var(--font-display, sans-serif);
}
.pay-method-head small {
    font-size: .75rem;
    font-weight: 400;
    color: var(--gray-2);
}

.bank-list {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-top: .8rem;
}
.bank-item {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .8rem;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-left: 4px solid var(--bank-color, #888);
    border-radius: 10px;
    transition: all .2s ease;
}
.bank-item:hover {
    background: rgba(255,255,255,.05);
    transform: translateX(2px);
}
.bank-icon {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    background: var(--bank-color, #888);
    color: #fff;
    border-radius: 10px;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.bank-detail { flex: 1; min-width: 0; }
.bank-name {
    font-weight: 700;
    color: var(--white);
    font-size: .95rem;
}
.bank-number {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .2rem 0;
    font-family: 'Consolas', monospace;
    font-size: 1.05rem;
    color: var(--red-1);
    letter-spacing: 1px;
}
.bank-holder {
    font-size: .82rem;
    color: var(--gray-2);
}

.btn-copy {
    background: rgba(255,26,26,.1);
    border: 1px solid rgba(255,26,26,.3);
    color: var(--red-1);
    padding: .3rem .55rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: .8rem;
    transition: all .15s ease;
    font-family: inherit;
}
.btn-copy:hover {
    background: var(--red-1);
    color: var(--white);
}
.btn-copy.copied {
    background: #1e7e34;
    border-color: #1e7e34;
    color: var(--white);
}

@media (max-width: 640px) {
    .donate-timer { font-size: 2rem; }
    .donate-amount-box .amount-value { font-size: 1.6rem; }
    .bank-icon { width: 38px; height: 38px; font-size: 1rem; }
    .bank-number { font-size: .95rem; }
}

/* =====================================================================
   Shop / Product Listing
   ===================================================================== */
.shop-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.shop-cats {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    color: var(--white);
    border-radius: 999px;
    font-size: .85rem;
    text-decoration: none !important;
    transition: all .15s ease;
}
.cat-chip:hover { background: rgba(255,26,26,.12); border-color: rgba(255,26,26,.3); }
.cat-chip.active {
    background: linear-gradient(135deg, var(--red-2), var(--red-3));
    border-color: var(--red-1);
}
.shop-search {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex: 0 0 auto;
}
.shop-search input { min-width: 200px; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.product-card {
    background: linear-gradient(160deg, var(--bg-3) 0%, var(--bg-2) 100%);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 14px;
    overflow: hidden;
    transition: all .25s ease;
    display: flex; flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,26,26,.35);
    box-shadow: 0 14px 36px rgba(0,0,0,.5), 0 0 0 1px rgba(255,26,26,.1);
}
.product-image {
    position: relative;
    display: block;
    aspect-ratio: 1/1;
    background:
        radial-gradient(ellipse at center, rgba(255,26,26,.08) 0%, transparent 70%),
        linear-gradient(160deg, rgba(20,20,20,.6) 0%, rgba(0,0,0,.5) 100%);
    overflow: hidden;
}
.product-image img {
    width: 100%; height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform .4s ease;
}
.product-card:hover .product-image img { transform: scale(1.04); }
.product-image-placeholder {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    color: rgba(255,255,255,.18);
    font-size: 3.5rem;
}
.product-image-placeholder.lg { font-size: 5rem; aspect-ratio: 1/1; }

.product-badge {
    position: absolute;
    top: .6rem;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    backdrop-filter: blur(8px);
}
.product-badge.featured { left: .6rem; background: rgba(255,180,30,.85); color: #000; }
.product-badge.owned    { right: .6rem; background: rgba(30,126,52,.9); color: #fff; }

.product-views {
    position: absolute;
    bottom: .6rem; left: .6rem;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .55rem;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(8px);
    color: #fff;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.product-views i { color: #ffd966; font-size: .68rem; }

.product-body {
    padding: 1rem;
    display: flex; flex-direction: column;
    gap: .5rem;
    flex: 1;
}
.product-cat {
    color: var(--red-1);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.product-title {
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.35;
}
.product-title a { color: var(--white); text-decoration: none !important; }
.product-title a:hover { color: var(--red-1); }
.product-desc {
    color: var(--gray-2);
    font-size: .85rem;
    line-height: 1.5;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-foot {
    display: flex; flex-direction: column; gap: .65rem;
    padding-top: .75rem;
    margin-top: .25rem;
    border-top: 1px dashed rgba(255,255,255,.06);
}
.product-price {
    display: inline-flex; align-items: baseline; gap: .35rem;
    color: var(--white);
    line-height: 1;
}
.product-price i { color: #ffd966; font-size: 1rem; align-self: center; }
.product-price strong { font-size: 1.3rem; font-weight: 800; }
.product-price small { color: var(--gray-2); font-size: .78rem; font-weight: 500; }

.product-foot .btn {
    width: 100%;
    justify-content: center;
    white-space: nowrap;
}

/* Pagination */
.pagination {
    display: flex;
    gap: .35rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px; height: 38px;
    padding: 0 .7rem;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    color: var(--white);
    border-radius: 8px;
    text-decoration: none !important;
    transition: all .15s ease;
}
.page-btn:hover { background: rgba(255,26,26,.15); border-color: rgba(255,26,26,.4); }
.page-btn.active {
    background: linear-gradient(135deg, var(--red-2), var(--red-3));
    border-color: var(--red-1);
    box-shadow: 0 4px 12px rgba(255,26,26,.3);
}

/* =====================================================================
   Product Detail Page
   ===================================================================== */
.product-detail {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 1.1fr;
    gap: 2rem;
    align-items: start;
}
.product-detail-images {
    position: sticky;
    top: 90px;
}
.product-main-image {
    position: relative;
    aspect-ratio: 1/1;
    background:
        radial-gradient(ellipse at center, rgba(255,26,26,.08) 0%, transparent 70%),
        linear-gradient(160deg, rgba(20,20,20,.6) 0%, rgba(0,0,0,.5) 100%);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.06);
}
.product-main-image img {
    width: 100%; height: 100%;
    object-fit: contain;
    object-position: center;
}
.product-thumbs {
    display: flex;
    gap: .5rem;
    margin-top: .8rem;
    flex-wrap: wrap;
}
.thumb {
    width: 70px; height: 70px;
    background: transparent;
    border: 2px solid rgba(255,255,255,.08);
    border-radius: 10px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    transition: all .15s ease;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { border-color: rgba(255,26,26,.4); }
.thumb.active { border-color: var(--red-1); box-shadow: 0 0 0 2px rgba(255,26,26,.3); }

.product-detail-info h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin: .4rem 0 .6rem;
    line-height: 1.2;
}
.product-detail-info .lead {
    color: var(--gray-1);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}
.product-cat-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--red-1);
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-decoration: none !important;
}

.product-price-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    background: linear-gradient(135deg, rgba(255,26,26,.1), rgba(0,0,0,.3));
    border: 1px solid rgba(255,26,26,.25);
    border-radius: 12px;
    margin: 1rem 0;
}
.product-price-label {
    color: var(--gray-2);
    text-transform: uppercase;
    font-size: .8rem;
    letter-spacing: .1em;
}
.product-price-value {
    display: inline-flex;
    align-items: baseline;
    gap: .4rem;
}
.product-price-value i {
    color: #ffd966;
    font-size: 1.4rem;
    filter: drop-shadow(0 0 8px rgba(255,217,102,.4));
}
.product-price-value strong {
    font-family: var(--font-display, sans-serif);
    font-size: 2.2rem;
    line-height: 1;
    background: linear-gradient(180deg, var(--white) 30%, var(--red-1) 130%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.product-price-value small { color: var(--gray-1); font-size: .9rem; }

.product-meta {
    display: flex; gap: .5rem; flex-wrap: wrap;
    margin: 1rem 0;
}
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .8rem;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    font-size: .8rem;
    color: var(--gray-1);
}
.meta-chip i { color: var(--red-1); }
.meta-chip.out { background: rgba(139,0,0,.2); border-color: rgba(139,0,0,.4); color: #ff8888; }

.product-actions {
    display: flex; gap: .6rem; flex-wrap: wrap;
    margin-top: 1.5rem;
}
.product-actions .btn { flex: 1 1 180px; }

.product-long-desc .long-desc-content {
    line-height: 1.8;
    color: var(--gray-1);
}
.product-long-desc img { max-width: 100%; border-radius: 8px; margin: 1rem 0; }
.product-long-desc iframe { max-width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 8px; }

@media (max-width: 800px) {
    .product-detail { grid-template-columns: 1fr; }
    .product-detail-images { position: static; }
}

/* =====================================================================
   Cart
   ===================================================================== */
.cart-wrap, .purchases-wrap { max-width: 1100px; margin: 0 auto; }
.cart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
}
.cart-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}
.cart-items { display: flex; flex-direction: column; gap: .8rem; }
.cart-item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(160deg, var(--bg-3) 0%, var(--bg-2) 100%);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    align-items: center;
}
.cart-item-img {
    width: 90px; height: 90px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,.04);
}
.cart-item-img img, .cart-item-img .product-image-placeholder {
    width: 100%; height: 100%; object-fit: cover;
}
.cart-item-info h4 { margin: 0 0 .3rem; font-size: 1rem; }
.cart-item-info h4 a { color: var(--white); text-decoration: none !important; }
.cart-item-info h4 a:hover { color: var(--red-1); }
.cart-item-meta {
    display: flex; gap: 1rem; flex-wrap: wrap;
    font-size: .85rem; color: var(--gray-2);
    margin-top: .4rem;
}
.cart-item-meta i { color: #ffd966; }
.cart-item-qty {
    background: rgba(255,255,255,.06);
    padding: .1rem .5rem; border-radius: 999px;
    font-weight: 700;
    color: var(--white);
}
.cart-item-side {
    text-align: right;
    display: flex; flex-direction: column; gap: .5rem; align-items: flex-end;
}
.cart-item-subtotal {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
}
.cart-item-subtotal i { color: #ffd966; }

.cart-summary {
    position: sticky;
    top: 90px;
    padding: 1.2rem;
    background: linear-gradient(160deg, var(--bg-3) 0%, var(--bg-2) 100%);
    border: 1px solid rgba(255,26,26,.25);
    border-radius: 12px;
}
.cart-summary h3 { margin: 0 0 1rem; font-size: 1.1rem; }
.summary-row {
    display: flex; justify-content: space-between;
    padding: .5rem 0;
    color: var(--gray-1);
}
.summary-row.total {
    font-size: 1.2rem;
    color: var(--white);
}
.summary-row.total i { color: #ffd966; }
.cart-summary hr {
    border: 0;
    border-top: 1px dashed rgba(255,255,255,.08);
    margin: .5rem 0;
}

@media (max-width: 800px) {
    .cart-grid { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .cart-item { grid-template-columns: 80px 1fr; }
    .cart-item-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; padding-top: .5rem; border-top: 1px dashed rgba(255,255,255,.05); align-items: center; }
}

/* =====================================================================
   My Purchases
   ===================================================================== */
.purchase-list { display: flex; flex-direction: column; gap: .8rem; }
.purchase-item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(160deg, var(--bg-3) 0%, var(--bg-2) 100%);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    transition: border-color .2s ease;
}
.purchase-item:hover { border-color: rgba(255,26,26,.25); }
.purchase-img {
    width: 90px; height: 90px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,.04);
}
.purchase-img img, .purchase-img .product-image-placeholder {
    width: 100%; height: 100%; object-fit: cover;
}
.purchase-info h4 { margin: 0; font-size: 1rem; }
.purchase-info h4 a { color: var(--white); text-decoration: none !important; }
.purchase-info h4 a:hover { color: var(--red-1); }
.purchase-meta {
    display: flex; gap: 1rem; flex-wrap: wrap;
    font-size: .8rem; color: var(--gray-2);
    margin-top: .35rem;
}
.purchase-meta i { color: var(--red-1); }
.purchase-action { text-align: right; }

@media (max-width: 800px) {
    .purchase-item { grid-template-columns: 70px 1fr; }
    .purchase-img { width: 70px; height: 70px; }
    .purchase-action { grid-column: 1 / -1; }
    .purchase-action .btn { width: 100%; }
}

/* =====================================================================
   Navbar Cart Icon
   ===================================================================== */
.nav-cart {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    color: var(--white) !important;
    transition: all .15s ease;
}
.nav-cart:hover {
    background: rgba(255,26,26,.15);
    border-color: rgba(255,26,26,.4);
    transform: translateY(-1px);
}
.nav-cart.active {
    background: linear-gradient(135deg, var(--red-2), var(--red-3));
    border-color: var(--red-1);
}
.nav-cart-badge {
    position: absolute;
    top: -6px; right: -6px;
    min-width: 20px; height: 20px;
    padding: 0 .35rem;
    background: var(--red-1);
    color: #fff;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255,26,26,.5);
}

/* =====================================================================
   Services Catalog
   ===================================================================== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.service-card-lg {
    background: linear-gradient(160deg, var(--bg-3) 0%, var(--bg-2) 100%);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all .25s ease;
}
.service-card-lg:hover {
    transform: translateY(-4px);
    border-color: rgba(255,26,26,.3);
    box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.service-card-img {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, rgba(255,26,26,.08), rgba(0,0,0,.5));
    overflow: hidden;
    display: grid; place-items: center;
}
.service-card-img img { width: 100%; height: 100%; object-fit: cover; }
.service-icon-box {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    font-size: 4rem;
    color: var(--red-1);
    filter: drop-shadow(0 0 16px var(--red-glow));
}
.service-icon-box.lg { aspect-ratio: 4/3; font-size: 6rem; }
.service-card-body { padding: 1.2rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.service-card-title { margin: 0; font-size: 1.2rem; }
.service-card-desc {
    color: var(--gray-1);
    font-size: .92rem;
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.service-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    padding-top: .6rem;
    border-top: 1px dashed rgba(255,255,255,.06);
    flex-wrap: wrap;
}
.service-price-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    color: var(--red-1);
    font-weight: 700;
    font-size: .9rem;
}

/* Service video */
.service-video {
    position: relative;
    aspect-ratio: 16/9;
    margin-bottom: .8rem;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    background: #000;
}
.service-video iframe { width: 100%; height: 100%; border: 0; }

/* =====================================================================
   Ticket List + Thread
   ===================================================================== */
.ticket-list { display: flex; flex-direction: column; gap: .6rem; }
.ticket-row {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: .9rem 1.1rem;
    background: linear-gradient(160deg, var(--bg-3) 0%, var(--bg-2) 100%);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    text-decoration: none !important;
    color: var(--white);
    transition: all .15s ease;
}
.ticket-row:hover { border-color: rgba(255,26,26,.3); transform: translateX(3px); }
.ticket-row.is-unread { border-left: 4px solid var(--red-1); padding-left: calc(1.1rem - 3px); }
.ticket-row-icon {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: 10px;
    color: #fff;
    font-size: 1.3rem;
    box-shadow: 0 6px 16px rgba(0,0,0,.3);
    flex-shrink: 0;
}
.ticket-row-head { display: flex; align-items: center; gap: .5rem; }
.ticket-row-head strong { color: var(--white); font-weight: 600; }
.ticket-row-meta {
    display: flex; gap: .6rem; flex-wrap: wrap;
    font-size: .8rem;
    color: var(--gray-2);
    margin-top: .3rem;
    align-items: center;
}
.ticket-row-arrow { color: var(--gray-2); }
.dot-unread {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 999px;
    background: var(--red-1);
    box-shadow: 0 0 6px var(--red-glow);
}

/* Thread */
.ticket-thread { display: flex; flex-direction: column; gap: .8rem; margin-top: 1rem; }
.ticket-bubble {
    max-width: 78%;
    padding: .9rem 1.1rem;
    border-radius: 14px;
    background: linear-gradient(160deg, var(--bg-3) 0%, var(--bg-2) 100%);
    border: 1px solid rgba(255,255,255,.06);
}
.ticket-bubble.mine {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(255,26,26,.25) 0%, rgba(255,26,26,.08) 100%);
    border-color: rgba(255,26,26,.3);
}
.ticket-bubble.theirs {
    align-self: flex-start;
}
.bubble-head {
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem;
    margin-bottom: .5rem;
    font-size: .82rem;
    color: var(--gray-2);
}
.bubble-head strong { color: var(--white); font-weight: 600; font-size: .9rem; }
.bubble-head strong i { margin-right: .3rem; color: var(--red-1); }
.bubble-body { line-height: 1.6; color: var(--white); white-space: pre-wrap; }
.bubble-attachments {
    display: flex; gap: .5rem; flex-wrap: wrap;
    margin-top: .6rem;
}
.att-thumb {
    display: block;
    width: 100px; height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.1);
}
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }

.meta-table { width: 100%; border-collapse: collapse; }
.meta-table th, .meta-table td {
    padding: .5rem .8rem;
    border-bottom: 1px dashed rgba(255,255,255,.06);
    text-align: left;
    vertical-align: top;
}
.meta-table th {
    color: var(--gray-2);
    font-weight: 600;
    width: 35%;
    font-size: .9rem;
}
.meta-table td { color: var(--white); }

/* Badge mini (unread count) */
.badge-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px; height: 18px;
    padding: 0 .35rem;
    background: var(--red-1);
    color: #fff;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255,26,26,.4);
}

@media (max-width: 700px) {
    .ticket-bubble { max-width: 92%; }
}

/* =====================================================================
   Donate — Stripe (บัตรเครดิต/เดบิต ต่างประเทศ)
   ===================================================================== */
.stripe-pay {
    border: 1px solid rgba(99,91,255,.35);
    background: linear-gradient(135deg, rgba(99,91,255,.10), var(--bg-1) 60%);
}
.stripe-pay-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.stripe-pay-head h3 {
    margin: 0 0 .2rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: .5px;
}
.stripe-pay-head p { margin: 0; font-size: .9rem; }
.stripe-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #7b73ff, #635bff);
    box-shadow: 0 6px 16px rgba(99,91,255,.35);
}
.stripe-pay-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
}
.stripe-amount { font-size: 1.4rem; font-weight: 700; }
.stripe-receive {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    text-align: center;
    padding: 1rem;
    border-radius: var(--radius);
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(255,26,26,.25);
}
.stripe-receive-label { color: var(--gray-2); font-size: .85rem; }
.stripe-receive-amt {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--red-1);
    text-shadow: 0 0 12px var(--red-glow);
}
.stripe-receive-amt small { font-size: .9rem; color: var(--gray-1); text-shadow: none; }
.stripe-receive-rate { color: var(--gray-3); font-size: .8rem; }
.btn.stripe-btn {
    color: #fff;
    border: 0;
    background: linear-gradient(135deg, #7b73ff, #635bff);
    box-shadow: 0 8px 22px rgba(99,91,255,.4);
}
.btn.stripe-btn:hover:not(:disabled) { box-shadow: 0 10px 28px rgba(99,91,255,.6); transform: translateY(-1px); }
.btn.stripe-btn:disabled { background: var(--bg-4); color: var(--gray-3); box-shadow: none; cursor: not-allowed; }
.stripe-note { margin: .75rem 0 0; text-align: center; font-size: .8rem; color: var(--gray-3); }
.stripe-note i { color: #34c759; }
.stripe-note a { color: var(--red-1); }
@media (max-width: 640px) {
    .stripe-pay-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Register — chip อีเมลที่รองรับ (กัน tempmail)
   ===================================================================== */
.email-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem;
    margin-top: .55rem;
    font-size: .8rem;
}
.email-hint-head { flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.email-hint-label { color: #5bc0de; font-weight: 500; }
.email-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .18rem .55rem;
    border-radius: 999px;
    color: var(--gray-1);
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    cursor: help;
    transition: border-color .2s, background .2s;
}
.email-chip i { color: var(--chip); }
.email-chip:hover { border-color: var(--chip); background: rgba(255,255,255,.08); }
.email-hint-note { flex-basis: 100%; color: var(--gray-3); font-size: .75rem; }
.field-error { margin: .4rem 0 0; font-size: .85rem; color: #ff6b6b; }
.field-error[hidden] { display: none; }

/* chip เป็นปุ่ม (เปิด modal) */
button.email-chip { font: inherit; cursor: pointer; }
.email-chip-more { color: #5bc0de; border-style: dashed; border-color: rgba(91,192,222,.45); --chip: #5bc0de; }

/* =====================================================================
   Modal (native <dialog>) — ใช้ซ้ำได้: <dialog class="wh-modal">
   ===================================================================== */
.wh-modal {
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 1px solid rgba(255,26,26,.35);
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(160deg, #1d1d1d, #111 70%);
    box-shadow: 0 24px 60px rgba(0,0,0,.7), 0 0 40px rgba(255,26,26,.15);
    overflow: hidden;
}
.wh-modal[open] { display: flex; flex-direction: column; animation: whModalIn .22s ease-out; }
.wh-modal::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
@keyframes whModalIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.wh-modal-head {
    display: flex; align-items: center; gap: .85rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
    background: linear-gradient(90deg, rgba(255,26,26,.12), transparent);
}
.wh-modal-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .5px; }
.wh-modal-head p { margin: .15rem 0 0; font-size: .82rem; color: var(--gray-2); }
.wh-modal-icon {
    flex: 0 0 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; font-size: 1.25rem; color: #fff;
    background: linear-gradient(135deg, #ff1a1a, #a30000);
    box-shadow: 0 6px 18px rgba(255,26,26,.4);
}
.wh-modal-x {
    margin-left: auto; flex: 0 0 36px; height: 36px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04);
    color: var(--gray-1); cursor: pointer; transition: all .2s;
}
.wh-modal-x:focus-visible { outline: 2px solid var(--red-1); outline-offset: 2px; }
.wh-modal-x:hover { color: #fff; border-color: var(--red-1); background: rgba(255,26,26,.15); }
.wh-modal-body { padding: 1rem 1.25rem; overflow-y: auto; display: grid; gap: .7rem; }
.wh-modal-foot { padding: .9rem 1.25rem 1.1rem; border-top: 1px solid rgba(255,255,255,.07); }

/* กลุ่มโดเมนใน modal อีเมล */
.mail-group {
    padding: .75rem .9rem;
    border-radius: 12px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-left: 3px solid var(--chip);
}
.mail-group-head { display: flex; align-items: center; gap: .55rem; margin-bottom: .55rem; }
.mail-group-icon {
    width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
    color: var(--chip); background: rgba(255,255,255,.06);
}
.mail-group-head small { margin-left: auto; color: var(--gray-3); font-size: .75rem; }
.mail-domains { display: flex; flex-wrap: wrap; gap: .35rem; }
.mail-domain {
    padding: .2rem .6rem; border-radius: 999px; font-size: .8rem;
    color: var(--gray-1); background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.08);
}
.mail-warn {
    display: flex; gap: .6rem; align-items: flex-start;
    padding: .7rem .9rem; border-radius: 12px; font-size: .82rem; line-height: 1.55;
    color: #ffd2d2; background: rgba(255,26,26,.08); border: 1px solid rgba(255,26,26,.3);
}
.mail-warn i { color: var(--red-1); margin-top: .2rem; }

/* =====================================================================
   Cookie Consent — banner ล่างจอ + modal ตั้งค่า (partials/footer.php)
   ===================================================================== */
.footer-legal {
    display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem 1.4rem;
    margin-bottom: .8rem; font-size: .82rem;
}
.footer-legal a { color: var(--gray-2); transition: color var(--transition); }
.footer-legal a:hover { color: var(--red-1); }
.footer-legal i { margin-right: .3rem; }

.cookie-banner {
    position: fixed; z-index: 9990;
    left: 50%; bottom: 18px;
    width: min(980px, calc(100vw - 32px));
    display: flex; align-items: center; gap: 1.1rem;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(255,26,26,.35); border-radius: 16px;
    background: linear-gradient(160deg, rgba(29,29,29,.97), rgba(12,12,12,.97));
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 50px rgba(0,0,0,.7), 0 0 30px rgba(255,26,26,.15);
    transform: translate(-50%, 140%); opacity: 0;
    transition: transform .35s cubic-bezier(.2,.9,.3,1.2), opacity .3s;
}
.cookie-banner.show { transform: translate(-50%, 0); opacity: 1; }
.cookie-banner::before {   /* เส้นแดง glow ด้านบน */
    content: ''; position: absolute; left: 16px; right: 16px; top: -1px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--red-1), transparent);
}
.cookie-banner-icon {
    flex: 0 0 52px; height: 52px; border-radius: 14px;
    display: grid; place-items: center; font-size: 1.5rem; color: #fff;
    background: linear-gradient(135deg, #ff1a1a, #a30000);
    box-shadow: 0 0 18px var(--red-glow);
}
.cookie-banner-text { flex: 1; min-width: 0; }
.cookie-banner-text h4 { margin: 0 0 .2rem; font-family: var(--font-display); font-size: .95rem; letter-spacing: .5px; color: #fff; }
.cookie-banner-text p { margin: 0; font-size: .84rem; line-height: 1.55; color: var(--gray-2); }
.cookie-banner-text a { color: var(--red-1); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.cookie-banner-actions .btn, .cookie-modal-foot .btn { white-space: nowrap; }

.cookie-cat {
    display: block; padding: .85rem 1rem; border-radius: 12px;
    background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
    transition: border-color .2s;
}
label.cookie-cat { cursor: pointer; }
label.cookie-cat:hover { border-color: rgba(255,26,26,.35); }
.cookie-cat-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.cookie-cat-title { font-weight: 600; color: #fff; font-size: .92rem; }
.cookie-cat-title i { color: var(--red-1); margin-right: .4rem; width: 1.1em; text-align: center; }
.cookie-cat p { margin: .45rem 0 0; font-size: .8rem; line-height: 1.55; color: var(--gray-2); }
.cookie-always {
    font-size: .72rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px;
    color: #7dffa8; background: rgba(40,200,100,.12); border: 1px solid rgba(40,200,100,.35);
}
.cookie-switch { position: relative; flex: 0 0 44px; height: 24px; }
.cookie-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cookie-switch span {
    position: absolute; inset: 0; border-radius: 999px; pointer-events: none;
    background: var(--bg-4); border: 1px solid rgba(255,255,255,.12); transition: all .2s;
}
.cookie-switch span::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
    border-radius: 50%; background: #fff; transition: transform .2s;
}
.cookie-switch input:checked + span { background: linear-gradient(135deg, var(--red-2), var(--red-1)); box-shadow: 0 0 10px var(--red-glow); }
.cookie-switch input:checked + span::after { transform: translateX(20px); }
.cookie-switch input:focus-visible + span { outline: 2px solid var(--red-1); outline-offset: 2px; }
.cookie-modal-foot { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }

.cookie-table { width: 100%; border-collapse: collapse; margin: .8rem 0 1rem; font-size: .85rem; }
.cookie-table th, .cookie-table td { padding: .55rem .7rem; border: 1px solid rgba(255,255,255,.1); text-align: left; vertical-align: top; }
.cookie-table th { background: rgba(255,26,26,.12); color: #fff; font-weight: 600; }
.cookie-table code { color: var(--accent); }
.cookie-table-wrap { overflow-x: auto; }

@media (max-width: 760px) {
    .cookie-banner { flex-wrap: wrap; bottom: 12px; padding: .9rem; gap: .8rem; }
    .cookie-banner-icon { flex-basis: 42px; height: 42px; font-size: 1.2rem; }
    .cookie-banner-text { flex-basis: calc(100% - 60px); }
    .cookie-banner-actions { width: 100%; }
    .cookie-banner-actions .btn { flex: 1 1 auto; }
    .cookie-modal-foot .btn { flex: 1 1 auto; }
}

/* =====================================================================
   Popup เอกสาร (TOS / Privacy / Data Deletion) — wh.js [data-legal]
   ===================================================================== */
.legal-modal { width: min(820px, calc(100vw - 32px)); }
.legal-modal-body { display: block; }
.legal-modal-body .legal-content { max-width: none; padding: 0; background: none; border: 0; }
.legal-modal-body .legal-content h3:first-child { margin-top: 0; }
.legal-modal-loading { padding: 3rem 0; text-align: center; color: var(--gray-2); }
.legal-modal-foot { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }

/* =====================================================================
   Profile — ลบบัญชี (danger zone + modal)
   ===================================================================== */
.danger-zone { border: 1px solid rgba(255,26,26,.35); background: linear-gradient(160deg, rgba(139,0,0,.18), rgba(20,20,20,.9) 60%); }
.danger-zone .card-title { color: var(--red-1); }
.del-pending {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding: .9rem 1rem; border-radius: 12px;
    background: rgba(168,103,0,.12); border: 1px solid rgba(255,190,60,.35);
}
.del-pending-icon {
    flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    font-size: 1.2rem; color: #fff; background: linear-gradient(135deg, #e0a000, #a86700);
}
.del-pending > div { flex: 1; min-width: 200px; }
.del-pending-title { font-weight: 600; color: #ffd98a; }
.del-pending-sub { font-size: .82rem; color: var(--gray-2); margin-top: .15rem; }

.delete-modal > form { display: flex; flex-direction: column; flex: 1; min-height: 0; margin: 0; }
.delete-modal .wh-modal-body { flex: 1; min-height: 0; }
.delete-modal .form-group { margin-bottom: 0; }
.del-warn {
    display: flex; gap: .7rem; align-items: flex-start;
    padding: .8rem 1rem; border-radius: 12px; font-size: .84rem; line-height: 1.6;
    color: #ffd2d2; background: rgba(255,26,26,.08); border: 1px solid rgba(255,26,26,.3);
}
.del-warn > i { color: var(--red-1); margin-top: .25rem; }
.del-warn ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.del-ack { align-items: flex-start; font-size: .86rem; color: var(--gray-1); cursor: pointer; }
.del-ack input { margin-top: .3rem; accent-color: var(--red-2); }

/* =====================================================================
   ระบบโค้ด — ช่องโค้ด (ตะกร้า/เติม Point) + หน้า /redeem
   ===================================================================== */
.code-box { display: flex; gap: .5rem; align-items: stretch; }
.code-box .form-control { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .08em; font-family: var(--font-display); font-size: .85rem; }
.code-box .form-control::placeholder { text-transform: none; letter-spacing: 0; font-family: var(--font-thai); }
.code-box .btn { white-space: nowrap; }
.cart-summary .code-box { margin-top: 1rem; }
.code-result {
    margin: .5rem 0 0; padding: .55rem .8rem; border-radius: 10px; font-size: .84rem; line-height: 1.5;
}
.code-result.ok  { color: #9dffbf; background: rgba(40,200,100,.1); border: 1px solid rgba(40,200,100,.35); }
.code-result.err { color: #ffc2c2; background: rgba(255,26,26,.08); border: 1px solid rgba(255,26,26,.3); }
.code-result i { margin-right: .3rem; }
.code-applied {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 1rem 0 0;
    padding: .55rem .5rem .55rem .8rem; border-radius: 10px; font-size: .84rem;
    color: #9dffbf; background: rgba(40,200,100,.1); border: 1px dashed rgba(40,200,100,.45);
}
.code-applied i { margin-right: .3rem; }
.code-err { margin: .45rem 0 0; font-size: .8rem; color: #ff8a8a; }
.code-discount-row strong, .code-discount-row span { color: #7dffa8; }

.redeem-wrap { max-width: 760px; margin: 0 auto; }
.redeem-card { text-align: center; padding: 2rem 1.5rem; position: relative; overflow: hidden; }
.redeem-card::before {
    content: ''; position: absolute; inset: -40% -20% auto; height: 70%;
    background: radial-gradient(closest-side, rgba(180,77,255,.18), transparent); pointer-events: none;
}
.redeem-icon {
    width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 20px; display: grid; place-items: center;
    font-size: 2rem; color: #fff; background: linear-gradient(135deg, #b44dff, #6a1bb3);
    box-shadow: 0 0 28px rgba(180,77,255,.45);
}
.redeem-form { display: flex; gap: .6rem; max-width: 520px; margin: 1.2rem auto 0; }
.redeem-input {
    flex: 1; min-width: 0; text-align: center; text-transform: uppercase; letter-spacing: .15em;
    font-family: var(--font-display); font-size: 1.05rem;
}
.redeem-input::placeholder { letter-spacing: .1em; opacity: .45; }
.redeem-hints { display: grid; gap: .35rem; margin-top: 1.2rem; font-size: .82rem; color: var(--gray-2); }
.redeem-hints i { color: var(--red-1); margin-right: .3rem; }
.redeem-hints a { color: var(--red-1); }
.table-wrap { overflow-x: auto; }
.code-history { width: 100%; border-collapse: collapse; font-size: .86rem; }
.code-history th, .code-history td { padding: .6rem .7rem; border-bottom: 1px solid rgba(255,255,255,.07); text-align: left; }
.code-history th { color: var(--gray-2); font-weight: 600; font-size: .78rem; }
.code-history code { color: var(--accent); }
@media (max-width: 560px) {
    .redeem-form { flex-direction: column; }
}
