/* Script detail page (script.html). Taken from the imported theme prototype (its pages.css), product page parts only. */

/* Description, written as HTML in the Tebex panel */

.pkg-desc {
    max-width: 860px;
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
}

.pkg-desc h1, .pkg-desc h2, .pkg-desc h3, .pkg-desc h4, .pkg-desc h5 { color: #fff; letter-spacing: -0.01em; margin: 1.6em 0 0.5em; }
.pkg-desc p { margin: 0 0 0.9em; }
.pkg-desc a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.pkg-desc img { max-width: 100%; height: auto; border-radius: 14px; }
.pkg-desc hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.pkg-desc ul { padding-left: 1.2em; }
.pkg-desc iframe { max-width: 100%; border-radius: 14px; }

/* ---------- Package page: the home hero for one script ---------- */

.pkg-back {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 4px;
    margin-bottom: 22px;
    padding: 7px 14px 7px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.pkg-back:hover { color: var(--text); background: rgba(255, 255, 255, 0.12); }
.pkg-back svg { width: 16px; height: 16px; }

.pkg-hero [data-tagline]:empty,
.pkg-hero [data-fw]:empty,
.pkg-hero .eyebrow:empty { display: none; }

.pkg-hero .card img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.pkg-hero .card.is-active .card__name,
.pkg-hero .card:hover .card__name { opacity: 1; }
.pkg-hero .tabs__list .tab { cursor: default; }
.pkg-hero .sound { margin-left: 4px; }

/* Sections under the hero */

.pkg-section { padding: clamp(56px, 6vw, 120px) var(--gutter) 0; }
.pkg-section[hidden] { display: none; }

.pkg-section__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.pkg-section__eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }

.pkg-section__title {
    margin: 14px 0 0;
    font-size: clamp(30px, 3vw, 56px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.04;
}

.pkg-section__text {
    max-width: 560px;
    margin: 14px 0 28px;
    font-size: clamp(15px, 1vw, 18px);
    line-height: 1.55;
    color: var(--muted);
}

.pkg-demo { margin-top: 0; }

.pkg-overview {
    display: grid;
    grid-template-columns: clamp(330px, 26vw, 420px) minmax(0, 1fr); /* room for the buy card */
    gap: clamp(32px, 4vw, 96px);
    align-items: start;
}

.pkg-overview__side { position: sticky; top: 40px; }
.pkg-overview__side .rcard__btn { margin-top: 28px; }

.pkg-overview .pkg-desc {
    max-width: none;
    padding: clamp(24px, 2.4vw, 44px);
    border: 1px solid rgba(196, 166, 255, 0.12);
    border-radius: 28px;
    /* Soft purple tint, a little stronger in the top corner, like the buy card. */
    background:
        radial-gradient(90% 50% at 100% 0%, rgba(167, 123, 255, 0.12), transparent 70%),
        linear-gradient(180deg, rgba(120, 90, 220, 0.07), rgba(120, 90, 220, 0.03));
}

.pkg-overview .pkg-desc > :first-child { margin-top: 0; }

.pkg-perks {
    display: grid;
    gap: 12px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
    color: var(--muted);
}

.pkg-perks li { display: flex; gap: 12px; }
.pkg-perks li::before { content: "✓"; color: #3ee08f; font-weight: 700; }

.pkg-more { padding-bottom: clamp(56px, 6vw, 120px); }

.pkg-more__row {
    display: flex;
    gap: clamp(8px, 0.8vw, 16px);
    margin-top: 22px;
    padding: 10px 4px 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.pkg-more .card { opacity: 1; filter: none; animation: none; }
.pkg-more .card img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.pkg-more .card:hover { outline-color: rgba(255, 255, 255, 0.85); }
.pkg-more .card:hover .card__name { opacity: 1; }

@media (max-width: 960px) {
    .pkg-overview { grid-template-columns: 1fr; }
    .pkg-overview__side { position: static; }
}

.btn[hidden] { display: none; }

/* Description layout built by package.js */

.pkg-desc__intro { font-size: 17px; color: rgba(255, 255, 255, 0.82); }

.pkg-desc__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px 0 16px !important;
    font-size: 20px;
}

.pkg-desc__heading small {
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(167, 123, 255, 0.18);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.feats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0 !important;
    list-style: none;
}

.feat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid rgba(196, 166, 255, 0.1);
    border-radius: 14px;
    background: rgba(140, 110, 230, 0.06);
    line-height: 1.45;
}

.feat[hidden] { display: none; }
.feat b { font-size: 15px; font-weight: 600; color: #fff; }
.feat span { font-size: 14px; color: var(--muted); }

.pkg-more-btn {
    margin-top: 16px;
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 14px;
    font-weight: 600;
}

.pkg-more-btn:hover { background: rgba(255, 255, 255, 0.12); }

.pkg-desc__rest { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 18px; }
.pkg-desc__rest summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.pkg-desc__rest summary:hover { color: var(--text); }
.pkg-desc__rest > div { margin-top: 16px; }

.pkg-desc.is-clamped {
    max-height: 420px;
    overflow: hidden;
    -webkit-mask: linear-gradient(180deg, #000 70%, transparent);
    mask: linear-gradient(180deg, #000 70%, transparent);
}

@media (max-width: 760px) {
    .feats { grid-template-columns: 1fr; }
}

.feat--link a { color: #fff; font-weight: 600; text-decoration: none; }
.feat--link:hover { border-color: rgba(255, 255, 255, 0.24); }

/* Video card while YouTube's start overlay keeps the trailer hidden */

.card.is-buffering .card__label svg { display: none; }

.card.is-buffering .card__label::before {
    content: "";
    width: 10px;
    height: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }


.pkg-hero .cards[hidden], .pkg-hero .hints[hidden] { display: none; }

/* Included scripts: bundle and subscription contents */

.incs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin: 0 0 6px;
    padding: 0 !important;
    list-style: none;
}

.inc {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 8px 14px 8px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

a.inc:hover { border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.06); }
span.inc { padding-left: 14px; }
.inc > svg { flex: none; width: 12px; height: 12px; margin-left: 6px; color: #ff5a5a; }
.inc--product img { flex: none; width: 64px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }

/* Shown when the browser blocks the trailer from starting on its own */

.hero-play {
    position: absolute;
    top: 42%;
    right: calc(var(--hero-img) / 2);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 26px 0 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: rgba(10, 11, 18, 0.45);
    backdrop-filter: blur(16px);
    font-size: 16px;
    font-weight: 700;
    transform: translate(50%, -50%);
    transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.hero-play[hidden] { display: none; }
.hero-play:hover { background: rgba(255, 255, 255, 0.18); transform: translate(50%, -50%) scale(1.05); }
.hero-play svg { width: 18px; height: 18px; }

.catalog__sort {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 44px;
    background: rgba(255, 255, 255, 0.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") right 18px center / 16px no-repeat;
    cursor: pointer;
}

/* Trailer lightbox: last resort when the hero player cannot start */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 4vw;
    background: rgba(5, 6, 10, 0.86);
    backdrop-filter: blur(10px);
}

.lightbox iframe { width: min(1280px, 100%); aspect-ratio: 16 / 9; border: 0; border-radius: 18px; background: #000; }

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 26px;
    line-height: 1;
}

/* Product hero without a media row: no need to fill the screen */

.pkg-hero--compact { min-height: min(100svh, 760px); }


.buy-box {
    display: grid;
    gap: 10px;
    margin-top: 28px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(18, 19, 28, 0.62);
    backdrop-filter: blur(20px);
}

.buy-box .price { margin: 0 0 4px; }
.buy-box .deal { margin: 0 0 6px; }
.buy-box .btn { justify-content: center; width: 100%; }
.buy-box__docs { margin-top: 4px; text-align: center; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

.buy-bar {
    position: fixed;
    left: 50%;
    bottom: 20px;
    z-index: 45;
    display: flex;
    align-items: center;
    gap: 16px;
    width: min(760px, calc(100% - 32px));
    padding: 8px 8px 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(16, 17, 26, 0.88);
    backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 16px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.buy-bar.is-in { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.buy-bar img { width: 64px; height: 40px; object-fit: cover; border-radius: 999px; }
.buy-bar__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.buy-bar__price { font-size: 18px; font-weight: 800; }

@media (max-width: 760px) {
    .buy-bar { bottom: 12px; }
    .buy-bar img, .buy-bar__name { display: none; }
    .buy-bar__price { padding-left: 12px; margin-right: auto; }
}

body:has(.buy-bar.is-in) .float-ui__top { opacity: 0; pointer-events: none; }

.pkg-hero .card__name { display: none; }

/* No category tiles here: the back button sits right under the top bar, the script details stay at the
   bottom of the hero above the media row. */
.pkg-hero .info { padding-top: clamp(24px, 3vw, 56px); }
.pkg-hero .info .pkg-back { margin-bottom: auto; }
.pkg-hero .info .pkg-back + * { margin-top: 14px; } /* a gap even when the column is full (short screens) */

/* Showcase video card: a round play button in the middle (fades away while the video is the active card). */
.card__play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(10, 11, 18, 0.45);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
    pointer-events: none;
}

.card__play svg { width: 22px; height: 22px; margin-left: -1px; } /* the triangle already sits right of centre in its icon box */
.card:hover .card__play { background: rgba(255, 255, 255, 0.2); transform: translate(-50%, -50%) scale(1.08); }
.card.is-active .card__play { opacity: 0; }

/* Media stage: the picture or showcase video in a framed 16:9 box on the right of the hero. The full-screen
   background behind it only keeps the blurred copy of the same picture. */
.pkg-hero .hero-layer__main { display: none; }

.pkg-stage {
    position: absolute;
    top: clamp(110px, 7.25vw, 150px);
    right: var(--gutter); /* lines up with the right edge of the top bar (currency button) */
    z-index: 0;
    width: 47.4vw;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: clamp(14px, 1.2vw, 22px);
    background: rgba(10, 11, 18, 0.5);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.pkg-stage > * {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    animation: stageIn 0.5s var(--ease);
}

@keyframes stageIn { from { opacity: 0; filter: blur(10px); } }

/* Keep the details clear of the stage on desktop; on narrow screens the stage sits above them. */
@media (min-width: 961px) {
    .pkg-hero .info { max-width: calc(100vw - 47.4vw - var(--gutter) - 40px); }
    /* The Scripts back button lines up with the top of the stage (top is measured in script.js). */
    .pkg-hero .info .pkg-back { position: relative; z-index: 1; } /* shifted only, the details below stay put */
}

@media (max-width: 960px) {
    .pkg-stage { position: relative; top: auto; right: auto; width: auto; margin: 16px var(--gutter) 0; order: 1; }
    .pkg-hero .info, .pkg-hero .shelf, .pkg-hero .hints { order: 2; }
}

/* ---------- Buy card (overview side) ----------
   A glass card: the cover art on top with the brand and name over its lower edge, then a 2 x 2 list of what
   you get, the CodeM Plus option, and at the bottom the price, countdown and buy button. A soft purple glow from the top corner. */
.buy-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background:
        radial-gradient(120% 60% at 100% 0%, rgba(167, 123, 255, 0.16), transparent 60%),
        rgba(18, 17, 30, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.buy-card__art { position: relative; aspect-ratio: 16 / 9; }
.buy-card__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.buy-card__art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(18, 17, 30, 0.96) 100%); }

.buy-card__head { position: absolute; left: 22px; right: 22px; bottom: 14px; z-index: 1; }
.buy-card__brand { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #c4a6ff; }
.buy-card__name { margin: 4px 0 0; font-size: clamp(22px, 1.7vw, 30px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }

.buy-card__body { display: grid; gap: 12px; padding: 18px 22px 22px; }
.buy-card__body .price { margin: 0; }
.buy-card__body .deal { margin: 0; }
.buy-card__body .btn { justify-content: center; width: 100%; height: 52px; font-size: 16px; }

.buy-card__perks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    margin: 0;
    padding: 0 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    list-style: none;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

.buy-card__perks li { display: flex; align-items: center; gap: 8px; }
.buy-card__perks svg { flex: none; width: 16px; height: 16px; padding: 3px; border-radius: 50%; background: rgba(62, 224, 143, 0.14); color: #3ee08f; }

.buy-card__docs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    margin-top: 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.buy-card__docs:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.22); }

/* ---------- More from the series ----------
   A heading with its own arrows, then a row of store tiles: picture (discount in the corner), name, price. */
.more-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.more-head__title { margin: 0; font-size: clamp(26px, 2.2vw, 40px); font-weight: 800; letter-spacing: -0.03em; }
.more-head__sub { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.more-head__nav { margin-left: 0; }

.more-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(220px, 19vw, 320px);
    gap: clamp(14px, 1.2vw, 22px);
    /* Room inside the scroller for the hover lift and shadow (a scroller clips both ways), given back with
       negative margins so the layout does not move. */
    margin: 6px calc(var(--gutter) * -1) -30px;
    padding: 18px var(--gutter) 44px;
    scroll-padding-inline: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Tiles fade out at the left and right edges instead of being cut. */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
}

.more-row::-webkit-scrollbar { display: none; }

.more-tile { display: grid; gap: 10px; scroll-snap-align: start; }

.more-tile__art {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background: #1b1d25;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.more-tile__art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }

.more-tile__art em {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--gold);
    color: #1a1406;
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
}

.more-tile__art em.is-free { background: #a77bff; color: #fff; } /* free scripts: purple tag in the same spot as a discount */

.more-tile:hover .more-tile__art { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(196, 166, 255, 0.5), 0 18px 40px rgba(0, 0, 0, 0.45); }
.more-tile:hover .more-tile__art img { transform: scale(1.05); }

.more-tile__name { padding: 0 2px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.more-tile__price { display: flex; align-items: baseline; gap: 8px; padding: 0 2px; margin-top: -4px; }
.more-tile__price b { font-size: 15px; font-weight: 800; }
.more-tile__price s { font-size: 13px; color: var(--faint); }

/* Prev / next arrows (media row and the More row): small glass circles. */
.row-nav { display: flex; gap: 6px; flex: none; margin-left: auto; }
.row-nav[hidden] { display: none; }

.row-nav__btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text);
    background: rgba(10, 11, 18, 0.35);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    transition: background 0.3s var(--ease), transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.row-nav__btn svg { width: 16px; height: 16px; }
.row-nav__btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); transform: scale(1.06); }
.row-nav__btn:disabled { opacity: 0.35; cursor: default; }

/* Media row: more room between cards, and hover reads differently from the selected card.
   Selected = white ring with the light beams; hover = the card just lifts and brightens, no ring. */
.pkg-hero .cards { gap: clamp(20px, 1.6vw, 28px); } /* wide enough for the selected ring; no margin change, so nothing shifts while the row glides */
.pkg-hero .card:hover { transform: translateY(-5px); }
.pkg-hero .card:not(.is-active):hover::before,
.pkg-hero .card:not(.is-active):hover::after { opacity: 0; animation-play-state: paused; }
.pkg-hero .card.is-active:hover { transform: none; }

/* The hero ends in the page colour, so the blurred artwork fades into the Overview below instead of
   stopping at a hard edge (the background also lags on scroll and would show that edge). */
.pkg-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    height: 48vh;
    background: linear-gradient(180deg, rgba(11, 12, 18, 0) 0%, rgba(11, 12, 18, 0.03) 10%, rgba(11, 12, 18, 0.1) 20%, rgba(11, 12, 18, 0.22) 30%, rgba(11, 12, 18, 0.38) 40%, rgba(11, 12, 18, 0.55) 50%, rgba(11, 12, 18, 0.71) 60%, rgba(11, 12, 18, 0.84) 70%, rgba(11, 12, 18, 0.93) 80%, rgba(11, 12, 18, 0.98) 90%, var(--bg) 100%);
    pointer-events: none;
}

/* ---------- CodeM Plus inclusion ----------
   Buy card: a row with a gold-to-purple border (gem, tiers, price per month).
   Hero: a small pill under the price. Tier colours: Gold yellow, Platinum teal, Diamond lilac. */
.plus-incl[hidden], .plus-pill[hidden] { display: none; }

.plus-incl {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 16px;
    background:
        linear-gradient(rgba(20, 18, 32, 0.96), rgba(20, 18, 32, 0.96)) padding-box,
        linear-gradient(120deg, rgba(242, 196, 90, 0.7), rgba(167, 123, 255, 0.7)) border-box;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.plus-incl:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(167, 123, 255, 0.18); }

.plus-incl__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border-radius: 12px;
    background: #1b1d25;
}

.plus-incl__icon img { width: 100%; height: 100%; object-fit: cover; }
.plus-incl__text { display: grid; gap: 5px; flex: 1; min-width: 0; }
.plus-incl__text small { font-size: 12px; font-weight: 600; color: var(--muted); }
.plus-incl__tiers { display: flex; flex-wrap: wrap; gap: 5px; }
.plus-incl__price { display: grid; justify-items: end; line-height: 1.1; }
.plus-incl__price b { font-size: 17px; font-weight: 800; }
.plus-incl__price small { font-size: 11px; color: var(--muted); }

.tier { padding: 2px 8px; border-radius: 999px; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; }
.tier--gold { background: rgba(242, 196, 90, 0.16); color: #f2c45a; }
.tier--platinum { background: rgba(95, 224, 208, 0.14); color: #7fe6d8; }
.tier--diamond { background: rgba(196, 166, 255, 0.18); color: #d4bfff; }

.plus-pill {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 5px 12px 5px 5px;
    border: 1px solid transparent;
    border-radius: 999px;
    background:
        linear-gradient(rgba(18, 16, 30, 0.7), rgba(18, 16, 30, 0.7)) padding-box,
        linear-gradient(120deg, rgba(242, 196, 90, 0.6), rgba(167, 123, 255, 0.6)) border-box;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    font-size: 13px;
    color: var(--muted);
    transition: transform 0.3s var(--ease);
}

.plus-pill:hover { transform: translateY(-1px); }
.plus-pill b { color: #fff; }
.plus-pill__icon { display: block; width: 24px; height: 24px; overflow: hidden; border-radius: 50%; background: #1b1d25; }
.plus-pill__icon img { width: 100%; height: 100%; object-fit: cover; }
.plus-pill__tiers { padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, 0.15); font-weight: 700; color: #d4bfff; }

/* Hero: the sale countdown and the Plus pill side by side (they wrap on narrow screens). */
.pkg-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.pkg-badges .deal, .pkg-badges .plus-pill { flex: none; margin: 0; }
.pkg-badges .deal { display: inline-flex; }
.pkg-badges:empty { display: none; }

/* ---------- Escrow / Open Source toggle (only when the script has an open source version) ----------
   Two-option switch with a sliding thumb; the note under it says what you get. */
[data-variant-slot]:empty { display: none; }
[data-variant-slot] { margin-top: 16px; }
.buy-card__body [data-variant-slot] { margin-top: 0; }

.variant {
    position: relative;
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.buy-card .variant { display: grid; width: 100%; }

.variant__opt {
    position: relative;
    z-index: 1;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
    transition: color 0.3s var(--ease);
}

.variant__opt.is-active { color: #0b0c12; }

.variant__thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: 999px;
    background: #fff;
    transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}

.variant.is-os .variant__thumb { transform: translateX(100%); background: #7fe6a8; }
.variant__note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.info .variant__note { margin-top: 8px; font-size: 12px; }

.buy-card__body .price { margin-top: 4px; }

.variant__opt:disabled { color: rgba(255, 255, 255, 0.28); cursor: not-allowed; text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.25); }

/* Buy card price a size up. */
.buy-card__body .price strong { font-size: clamp(34px, 2.6vw, 46px); font-weight: 800; }
.buy-card__body .price s { font-size: 18px; }
.buy-card__body .price em { font-size: 14px; }

/* ---------- Live demo ----------
   The button beside Overview has a play icon. The window opens over a dimmed page, growing from
   slightly smaller and blurred to sharp; the demo fades in once it has loaded. */
.btn--demo { gap: 8px; }
.btn--demo svg { width: 15px; height: 15px; }
@keyframes demoDot { 50% { opacity: 0.35; } }

html.demo-open { overflow: hidden; }

.demo-modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: clamp(8px, 1.4vw, 24px); }
.demo-modal[hidden] { display: none; }

.demo-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 10, 0.72);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.demo-modal__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1800px, 100%, calc((100vh - 2 * clamp(8px, 1.4vw, 24px) - 70px) * 16 / 9)); /* as big as the screen allows at 16:9 */
    padding: 10px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(80% 40% at 0% 0%, rgba(167, 123, 255, 0.18), transparent 60%),
        #12111c;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
    opacity: 0;
    filter: blur(10px);
    transform: scale(0.96);
    transition: opacity 0.45s var(--ease), filter 0.45s var(--ease), transform 0.45s var(--ease);
}

.demo-modal.is-open .demo-modal__backdrop { opacity: 1; }
.demo-modal.is-open .demo-modal__panel { opacity: 1; filter: none; transform: none; }

.demo-modal__head { display: flex; align-items: center; gap: 14px; padding: 4px 6px 12px 10px; }
.demo-modal__head h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }

.demo-modal__live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(62, 224, 143, 0.12);
    color: #7fe6a8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.demo-modal__live i { width: 7px; height: 7px; border-radius: 50%; background: #3ee08f; box-shadow: 0 0 8px #3ee08f; animation: demoDot 1.8s ease-in-out infinite; }
.demo-modal__note { margin-right: auto; font-size: 13px; color: var(--faint); }

.demo-modal__tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.demo-modal__tab svg { width: 15px; height: 15px; }
.demo-modal__tab:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.demo-modal__close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.35s var(--ease);
}

.demo-modal__close svg { width: 16px; height: 16px; }
.demo-modal__close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; transform: rotate(90deg); }

.demo-modal__screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; background: #07070c; }
.demo-modal__screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity 0.6s var(--ease); }
.demo-modal__screen.is-ready iframe { opacity: 1; }

.demo-modal__loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; font-size: 13px; color: var(--faint); }
.demo-modal__loading i { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.1); border-top-color: #c4a6ff; animation: spin 0.8s linear infinite; }

@media (max-width: 700px) {
    .demo-modal__note, .demo-modal__tab span { display: none; }
}

/* ---------- Gift ----------
   A round button with the gift icon beside Overview; it opens a small window that asks for the recipient's
   Cfx.re username, shows what is being gifted and puts it in the basket. */
.btn--round { width: 48px; padding: 0; justify-content: center; border-radius: 50%; }
.btn--round svg { width: 20px; height: 20px; }
.actions .btn--round { aspect-ratio: 1; height: auto; align-self: stretch; }
/* On phones the action buttons share the row (flex: 1); the round gift button keeps its own size. */
.actions .btn.btn--round { flex: 0 0 auto; }

html.gift-open { overflow: hidden; }

.gift-modal { position: fixed; inset: 0; z-index: 155; display: grid; place-items: center; padding: 16px; }
.gift-modal[hidden] { display: none; }

.gift-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 10, 0.6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.35s var(--ease);
}

.gift-modal__panel {
    position: relative;
    display: grid;
    justify-items: center;
    width: min(520px, 100%);
    margin: 0;
    padding: 40px 32px 30px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(90% 45% at 50% 0%, rgba(167, 123, 255, 0.22), transparent 70%),
        #12111c;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
    text-align: center;
    opacity: 0;
    filter: blur(10px);
    transform: scale(0.96);
    transition: opacity 0.4s var(--ease), filter 0.4s var(--ease), transform 0.4s var(--ease);
}

.gift-modal.is-open .gift-modal__backdrop { opacity: 1; }
.gift-modal.is-open .gift-modal__panel { opacity: 1; filter: none; transform: none; }

.gift-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.35s var(--ease);
}

.gift-modal__close svg { width: 16px; height: 16px; }
.gift-modal__close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; transform: rotate(90deg); }

.gift-modal__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c4a6ff, #7a5cff);
    box-shadow: 0 12px 40px rgba(167, 123, 255, 0.4);
    color: #fff;
}

.gift-modal__icon svg { width: 28px; height: 28px; }
.gift-modal__panel h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.gift-modal__lead { margin: 8px 0 22px; max-width: 360px; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* What is being gifted. */
.gift-modal__item {
    display: grid;
    grid-template-columns: 84px 1fr auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 8px 16px 8px 8px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.04);
    text-align: left;
}

.gift-modal__item img { width: 84px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; }
.gift-modal__item span { display: grid; gap: 2px; min-width: 0; }
.gift-modal__item small { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #c4a6ff; }
.gift-modal__item b { overflow: hidden; font-size: 15px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.gift-modal__item em { font-style: normal; font-size: 15px; font-weight: 800; }

.gift-modal__field { display: grid; gap: 8px; width: 100%; margin-top: 20px; text-align: left; }
.gift-modal__field > span { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }

.gift-modal__field input {
    height: 52px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.gift-modal__field input::placeholder { color: var(--faint); font-weight: 500; }
.gift-modal__field input:focus { border-color: rgba(196, 166, 255, 0.7); box-shadow: 0 0 0 4px rgba(167, 123, 255, 0.16); }
.gift-modal.has-error .gift-modal__field input { border-color: rgba(255, 110, 130, 0.7); box-shadow: 0 0 0 4px rgba(255, 110, 130, 0.12); }
.gift-modal__error { min-height: 16px; font-size: 12px; color: #ff8a9a; }

.gift-modal__submit {
    width: 100%;
    height: 52px;
    margin-top: 6px;
    border-radius: 999px;
    background: #fff;
    color: #0b0c12;
    font-size: 15px;
    font-weight: 800;
    transition: box-shadow 0.3s var(--ease);
}

.gift-modal__submit:hover { box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.16); }

/* ---------- Bundle pages ----------
   The stage fades out at the bottom, and "What's inside" shows the bundle's scripts as Scripts cards
   (the card styles come from category.css). */
.pkg-hero.is-bundle .pkg-stage {
    box-shadow: none;
    -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
}

.bundle-inc h3 { display: flex; align-items: baseline; gap: 10px; margin: 0; font-size: clamp(22px, 1.8vw, 30px); font-weight: 800; letter-spacing: -0.02em; }
.bundle-inc h3 small { font-size: 14px; font-weight: 700; color: var(--faint); }
.bundle-inc__note { margin: 8px 0 0; max-width: 720px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.bundle-inc .grid { grid-template-columns: repeat(auto-fill, minmax(clamp(180px, 12vw, 230px), 1fr)); }

.tile--inc { --in-blur: 6px; --in-y: 0px; contain-intrinsic-size: auto 240px; }
.tile--inc .tile__body { gap: 6px; padding: 14px 10px 10px; }
.tile--inc .tile__name { font-size: 16px; }
.tile--inc .tile__art { display: grid; place-items: center; }
.tile--inc .tile__logo { width: 34%; aspect-ratio: 1; background: url("https://cdn.jsdelivr.net/gh/ThaCly/codem-media@v3/img/logo-mark-crop.png") center / contain no-repeat; opacity: 0.16; }
div.tile--inc:hover { transform: none; box-shadow: none; }
.bundle-inc a.tile, .bundle-inc a.tile * { color: inherit; text-decoration: none; } /* not the description's link style */
.bundle-inc .tile .tile__name.tile__name { color: #fff; }

/* Script page title: long names step down in size so they stay in their column next to the stage. */
.pkg-hero .info h1 { overflow-wrap: anywhere; }
.pkg-hero .info h1.is-long { font-size: clamp(30px, 3.4vw, 60px); }
.pkg-hero .info h1.is-very-long { font-size: clamp(26px, 2.7vw, 48px); }
