/*
 * Media page theme: "National Day" (design: Metronic Theme/Twelve New
 * desgin/Others/"عروض اليوم الوطني - صفحة الحملة"). Dark green/gold Saudi
 * National Day campaign skin. Content (coupon, countdown, products,
 * denominations) is the same real data as the default theme — only the
 * chrome/visuals differ.
 */

.nd-page {
    --nd-bg: #0b100d;
    --nd-surface: #141c17;
    --nd-chip: #1b241e;
    --nd-soft: #17301f;
    --nd-soft2: #10201a;
    --nd-ink: #f2f7f3;
    --nd-ink2: #9aaa9f;
    --nd-ink3: #5e6e63;
    --nd-brand: #3fcc7c;
    --nd-brand-ink: #22a65b;
    --nd-brand-dark: #0f6b38;
    --nd-gold: #ffd05a;
    --nd-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    --nd-shadow2: 0 8px 24px rgba(0, 0, 0, 0.35);

    background: var(--nd-bg);
    color: var(--nd-ink);
    font-family: var(--tw-font, 'IBM Plex Sans Arabic', system-ui, sans-serif);
    overflow-x: hidden;
}

.nd-hero__desc a,
.nd-help a {
    color: inherit;
}

@keyframes ndFall {
    0% { transform: translateY(-6vh) rotate(0); opacity: 0; }
    8% { opacity: 1; }
    100% { transform: translateY(110vh) rotate(500deg); opacity: 0; }
}

@keyframes ndGlow {
    0%, 100% { opacity: .5; transform: scale(1); }
    50% { opacity: .9; transform: scale(1.1); }
}

@keyframes ndTwinkle {
    0%, 100% { opacity: .2; transform: scale(.7); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes ndShine {
    0% { transform: translateX(-140%) skewX(-18deg); }
    100% { transform: translateX(320%) skewX(-18deg); }
}

@keyframes ndRise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

/* ── Hero ───────────────────────────────────────────────────────────── */

.nd-hero {
    position: relative;
    overflow: hidden;
    min-height: 340px;
    padding: 70px 20px 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(110deg, #052a16 0%, #0f6b38 45%, #22a65b 75%, #7fe3a9 100%);
    color: #fff;
}

.nd-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1.5px, transparent 1.5px);
    background-size: 26px 26px;
    opacity: .5;
    pointer-events: none;
}

.nd-hero--has-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.nd-hero__image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(5, 42, 22, .88) 0%, rgba(15, 107, 56, .82) 45%, rgba(34, 166, 91, .72) 75%, rgba(127, 227, 169, .55) 100%);
    pointer-events: none;
}

.nd-hero__glow {
    position: absolute;
    left: -80px;
    top: -80px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .35), transparent 70%);
    animation: ndGlow 6s ease-in-out infinite;
    pointer-events: none;
}

.nd-hero__number {
    position: absolute;
    inset-inline-end: 20px;
    top: 50%;
    transform: translateY(-52%);
    font-size: 260px;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, .14);
    letter-spacing: -6px;
    pointer-events: none;
    user-select: none;
}

.nd-hero__confetti,
.nd-hero__stars {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.nd-confetti-piece {
    position: absolute;
    top: 0;
    left: var(--x);
    width: 8px;
    height: 12px;
    border-radius: 2px;
    background: #3fcc7c;
    opacity: 0;
    animation: ndFall var(--dur) linear var(--delay) infinite;
}

.nd-confetti-piece[data-hue="1"] { background: #ffffff; }
.nd-confetti-piece[data-hue="2"] { background: #b8e986; }
.nd-confetti-piece[data-hue="3"] { background: #ffd05a; }

.nd-star {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fff;
    animation: ndTwinkle var(--dur) ease-in-out var(--delay) infinite;
}

.nd-hero__inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 720px;
}

.nd-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 99px;
    padding: 6px 16px;
    backdrop-filter: blur(6px);
    animation: ndRise .7s both;
}

.nd-kicker__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #b8e986;
}

.nd-hero__title {
    margin: 0;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 6px 30px rgba(0, 0, 0, .35);
    animation: ndRise .8s .1s both;
}

.nd-hero__desc {
    margin: 0;
    font-size: 15px;
    opacity: .92;
    animation: ndRise .8s .2s both;
}

.nd-hero__desc p {
    margin: 0;
}

/* ── Top cards (countdown + coupon) ───────────────────────────────── */

.nd-topcards {
    position: relative;
    z-index: 3;
    margin-top: -90px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.nd-card {
    background: var(--nd-surface);
    border-radius: 22px;
    padding: 22px 24px;
    box-shadow: var(--nd-shadow);
    animation: ndRise .8s .3s both;
}

.nd-countdown-card__label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--nd-brand);
    margin-bottom: 14px;
}

.nd-countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    direction: ltr;
}

.nd-time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.nd-time-value {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--nd-soft);
    display: grid;
    place-items: center;
    font-size: 26px;
    font-weight: 700;
    color: var(--nd-brand);
    font-variant-numeric: tabular-nums;
}

.nd-time-unit span {
    font-size: 11.5px;
    color: var(--nd-ink2);
    font-weight: 600;
}

.nd-sep {
    font-size: 20px;
    font-weight: 700;
    color: var(--nd-ink3);
    margin-bottom: 22px;
}

.nd-coupon-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nd-coupon-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
}

.nd-coupon-code-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px dashed var(--nd-brand-ink);
    background: var(--nd-soft2);
    border-radius: 16px;
    padding: 10px 12px;
    cursor: pointer;
}

.nd-coupon-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(145deg, #22a65b, #0f6b38);
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 10px 24px rgba(34, 166, 91, .35);
}

.nd-coupon-code-text {
    flex: 1;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 2px;
    color: var(--nd-brand);
    direction: ltr;
    text-align: center;
}

.nd-coupon-copy-btn {
    height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: 12px;
    background: var(--nd-brand-dark);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.nd-coupon-copy-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
    animation: ndShine 2.4s ease-in-out infinite 1s;
}

.nd-coupon-hint {
    font-size: 11px;
    color: var(--nd-ink2);
    text-align: center;
}

/* ── Product tabs ─────────────────────────────────────────────────── */

.nd-content {
    position: relative;
    z-index: 2;
    padding-bottom: 60px;
}

.nd-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 30px 0 26px;
}

.nd-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
    height: 72px;
    padding: 0 16px;
    border: none;
    border-radius: 18px;
    background: var(--nd-chip);
    color: var(--nd-ink);
    cursor: pointer;
    transition: transform .15s, box-shadow .2s, background .2s, color .2s;
    text-align: start;
}

.nd-tab.active {
    background: linear-gradient(135deg, #22a65b, #0f6b38);
    color: #fff;
    box-shadow: 0 14px 30px rgba(34, 166, 91, .35);
}

.nd-tab__thumb {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.nd-tab__meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.nd-tab__name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nd-tab__count {
    font-size: 11.5px;
    opacity: .75;
}

/* ── Denomination grid ────────────────────────────────────────────── */

.nd-denominations {
    display: none;
}

.nd-denominations.active {
    display: block;
    animation: ndRise .4s both;
}

.nd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.nd-denom-card {
    position: relative;
    min-height: 190px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(160deg, #111813, #0a0f0b);
    color: #fff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .25);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
}

.nd-denom-card__link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.nd-denom-card__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .35;
}

.nd-denom-card__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 20, 10, .95) 30%, rgba(5, 20, 10, .2));
}

.nd-denom-card__ghost {
    position: absolute;
    inset-inline-end: -6px;
    bottom: -18px;
    font-size: 64px;
    font-weight: 700;
    color: rgba(255, 255, 255, .06);
    line-height: 1;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
}

.nd-denom-card__top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.nd-denom-card__title {
    font-size: 13px;
    font-weight: 700;
    background: rgba(0, 0, 0, .5);
    backdrop-filter: blur(8px);
    padding: 6px 10px;
    border-radius: 10px;
}

.nd-denom-card__badge {
    flex-shrink: 0;
    direction: ltr;
    font-size: 10.5px;
    font-weight: 700;
    background: #22a65b;
    padding: 5px 9px;
    border-radius: 99px;
}

.nd-denom-card__tags {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
    margin-top: 8px;
}

.nd-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    background: rgba(255, 255, 255, .14);
    padding: 4px 9px;
    border-radius: 8px;
}

.nd-tag img {
    width: 14px;
    height: 10px;
    object-fit: cover;
    border-radius: 2px;
}

.nd-denom-card__bottom {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.nd-denom-card__price {
    display: flex;
    flex-direction: column;
}

.nd-denom-card__old {
    font-size: 11px;
    color: #b8b8b8;
    text-decoration: line-through;
    direction: ltr;
}

.nd-denom-card__now {
    font-size: 20px;
    font-weight: 700;
    color: #b8e986;
    direction: ltr;
}

.nd-denom-card__now small {
    font-size: 11px;
    font-weight: 600;
}

.nd-denom-card__buy {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    color: var(--nd-brand-ink);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

/* ── Empty state & help ───────────────────────────────────────────── */

.nd-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--nd-ink2);
}

.nd-empty__icon {
    font-size: 40px;
    color: var(--nd-ink3);
    margin-bottom: 14px;
}

.nd-empty h4 {
    color: var(--nd-ink);
    margin-bottom: 8px;
}

.nd-help {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 40px;
    padding: 18px 20px;
    border-radius: 16px;
    background: var(--nd-soft2);
    border: 1px solid rgba(63, 204, 124, .2);
    color: var(--nd-ink2);
    font-size: 13.5px;
}

.nd-help i {
    color: var(--nd-brand);
    margin-top: 3px;
}

/* ── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .nd-topcards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nd-hero {
        padding: 50px 16px 110px;
        min-height: 260px;
    }

    .nd-hero__title {
        font-size: 30px;
    }

    .nd-hero__number {
        font-size: 150px;
    }

    .nd-time-value {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }

    .nd-tab {
        min-width: 0;
        flex: 1 1 45%;
    }
}
