/* Packs page (/shop/): search, then one row per style with its header card */

.packs-page .packs-inner{
    max-width: 1490px;
    container: packs / inline-size;
}

.packs-page a:focus-visible,
.packs-page button:focus-visible{
    outline: 2px solid #55f5ff;
    outline-offset: 2px;
}

.packs-head{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.packs-head #title-description{
    margin: 0;
}

.packs-perks{
    margin: 6px 0 0;
    font-size: 13px;
    color: #8a97a3;
}

/* Search */
#packs-search{
    position: relative;
    z-index: 30;
    margin-top: 30px;
}

.packs-search-form{
    display: flex;
    align-items: center;
    gap: 12px;
    height: 64px;
    box-sizing: border-box;
    margin: 0;
    padding: 0 10px 0 24px;
    border: 1px solid #2a323a;
    border-radius: 32px;
    background: #111315;
}

.packs-search-form:focus-within{
    border-color: #7b48fc;
    box-shadow: 0 0 0 4px rgba(123, 72, 252, .2);
}

.packs-search-form svg{
    flex: none;
}

#packs-search-input{
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

#packs-search-input::placeholder{
    color: #6f7b86;
}

.packs-search-clear{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #1d2429;
    color: #b8c0c8;
    cursor: pointer;
}

.packs-search-clear[hidden]{
    display: none;
}

.packs-search-submit{
    flex: none;
    min-height: 44px;
    padding: 0 24px;
    border: 0;
    border-radius: 25px;
    background: #7b48fc;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.4px;
    cursor: pointer;
}

.packs-search-submit:hover{
    filter: brightness(1.12);
}

.packs-search-examples{
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 13px;
    color: #8a97a3;
}

.packs-search-example{
    padding: 0;
    border: 0;
    border-bottom: 1px solid #2a323a;
    background: transparent;
    color: #b8c0c8;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.packs-search-example:hover{
    color: #4de3e3;
    border-bottom-color: #4de3e3;
}

.packs-search-list{
    position: absolute;
    left: 0;
    right: 0;
    top: 74px;
    max-height: 540px;
    overflow: auto;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #2a323a;
    border-radius: 18px;
    background: #111315;
    box-shadow: 0 28px 70px rgba(0, 0, 0, .6);
}

.packs-search-list[hidden]{
    display: none;
}

.srow-head{
    padding: 12px 12px 6px;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #6f7b86;
}

.srow{
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
    border-radius: 12px;
    color: #fff;
}

.srow.on,
.srow:hover{
    background: #1a2026;
    color: #fff;
}

.srow-thumb{
    flex: none;
    width: 56px;
    display: flex;
    justify-content: center;
}

.srow-thumb img{
    display: block;
    width: 56px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.srow-thumb .srow-dot{
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

.srow-text{
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.srow-title{
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.srow-title b{
    font-weight: 600;
    color: #4de3e3;
}

.srow-sub{
    font-size: 12px;
    color: #8a97a3;
}

.srow-tag{
    flex: none;
    width: 72px;
    text-align: right;
    font-size: 12px;
    color: #b79bff;
}

.srow-price{
    flex: none;
    width: 64px;
    text-align: right;
    font-size: 14px;
    color: #b8c0c8;
}

.srow-enter{
    flex: none;
    width: 74px;
    display: flex;
    justify-content: flex-end;
}

.srow-enter span{
    display: none;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border: 1px solid #474849;
    border-radius: 6px;
    font-size: 11px;
    color: #b8c0c8;
}

.srow.on .srow-enter span{
    display: inline-flex;
}

.srow-more .srow-title{
    font-size: 14px;
    color: #b79bff;
}

.srow-empty{
    padding: 22px 14px 18px;
    font-size: 14px;
    line-height: 22px;
    color: #b8c0c8;
}

.srow-empty div{
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.srow-empty a{
    color: #b79bff;
}

.srow-help{
    margin: 6px 4px 2px;
    padding: 10px 10px 6px;
    border-top: 1px solid #181e23;
    font-size: 11px;
    color: #6f7b86;
}

/* Sections: a header card, then the 4 newest packs */
.packs-section{
    margin-top: 48px;
}

.pgrid{
    display: grid;
    grid-template-columns: 300px repeat(4, minmax(0, 1fr));
    gap: 24px 12px;
}

.pgrid2{
    display: grid;
    grid-template-columns: 300px repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
}

.hc{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    padding: 22px;
    box-sizing: border-box;
    border: 1px solid #181e23;
    border-radius: 10px;
    background: #111315;
}

.hc-text{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hc-meta{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8a97a3;
}

.hc-dot{
    flex: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.hc h2{
    margin: 0;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.hc p{
    margin: 0;
    font-size: 14px;
    line-height: 22px;
    color: #b8c0c8;
}

.seeall{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 20px;
    box-sizing: border-box;
    border: 1px solid #4de3e3;
    border-radius: 25px;
    color: #4de3e3;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.seeall:hover{
    background: rgba(77, 227, 227, .1);
    color: #4de3e3;
}

.pk{
    display: flex;
    flex-direction: column;
    color: #fff;
    background: #111315;
    border: 1px solid #181e23;
    overflow: hidden;
    transition: border-color .18s ease;
}

.pk:hover,
.pk:focus-visible{
    border-color: #2a323a;
    color: #fff;
}

.pk .im{
    position: relative;
    aspect-ratio: 16 / 9;
    background: #2b3036;
    filter: brightness(.88);
    outline: 1px solid transparent;
    outline-offset: -1px;
    transition: filter .18s ease, outline-color .18s ease;
}

.pk:hover .im,
.pk:focus-visible .im{
    filter: brightness(1);
    outline-color: rgba(255, 255, 255, .16);
}

.pk .im img{
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pk-deal{
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 2px 8px;
    border: 1px solid #54ff54;
    border-radius: 5px;
    background: #0b0b0c;
    color: #54ff54;
    font-size: 12px;
    font-weight: 700;
}

.pk-extras{
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 2px 9px;
    border-radius: 5px;
    background: #7b48fc;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
}

.pk-body{
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 12px 12px 14px;
}

.pk-names{
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.pk-tag{
    font-size: 11px;
    color: #9a9a9a;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.pk .pn{
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;
    transition: color .18s ease;
}

.pk:hover .pn{
    color: #b79bff;
}

.pk-prices{
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
}

.pk-prices .price-dual{
    font-size: 18px;
}

.pk-prices .price-dual-before{
    font-size: 13px;
    color: #8a97a3;
    text-decoration: line-through;
}

.pk-when{
    margin-top: auto;
    font-size: 12px;
    color: #8a97a3;
}

@media (prefers-reduced-motion: reduce){
    .pk, .pk .im, .pk .pn{
        transition: none;
    }
}

/* Background text */
.packs-about{
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid #181e23;
    max-width: 640px;
}

.packs-about h2{
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
}

.packs-about p{
    margin: 0;
    font-size: 14px;
    line-height: 24px;
    color: #b8c0c8;
}

.packs-about a{
    color: #b79bff;
}

.packs-about a:hover{
    text-decoration: underline;
}

/* Narrower: 3 packs, then the header card goes on top, then 2 per row */
@container packs (max-width: 1010px){
    .pgrid{
        grid-template-columns: 300px repeat(3, minmax(0, 1fr));
    }

    .pgrid > .pk:nth-child(5){
        display: none;
    }
}

@container packs (max-width: 790px){
    .pgrid{
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .pgrid > .pk:nth-child(5){
        display: flex;
    }

    .pgrid > .hc,
    .pgrid2 > .hc{
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }

    .pgrid2{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container packs (max-width: 640px){
    .pgrid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pgrid > .hc,
    .pgrid2 > .hc{
        flex-direction: column;
        align-items: flex-start;
    }

    .srow-tag,
    .srow-enter{
        display: none;
    }

    .packs-search-submit{
        padding: 0 16px;
    }

    #packs-search-input{
        font-size: 15px;
    }
}

/* Phones: one pack per row */
@container packs (max-width: 440px){
    .pgrid,
    .pgrid2{
        grid-template-columns: minmax(0, 1fr);
    }
}

/* A packs category page (/shop/<category>/): its packs, then a box to
   suggest a theme, in the category's colour (--c) */
.category-head{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-head #content-title b{
    color: var(--c);
    font-weight: 600;
}

.category-head #title-description{
    margin: 0;
}

.category-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 14px;
    margin-top: 30px;
}

/* The vote box, in the grid right after the packs: it takes the height of
   the packs of its row and never makes them taller */
.category-grid > .suggest{
    height: 0;
    min-height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 0;
    border: 1px solid #1d2329;
    border-radius: 10px;
    background: #08090b;
    container-type: inline-size;
    scroll-margin-top: 20px;
}

.suggest-main{
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.suggest h2{
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.suggest p{
    margin: 0;
    font-size: 12.5px;
    line-height: 18px;
    color: #b8c0c8;
}

.suggest .vote-done-text,
.suggest .other-thanks{
    width: fit-content;
    font-weight: 600;
    background: linear-gradient(90deg, #8f6bff, #c357e0, #ff7a6b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.votes{
    display: flex;
    flex-wrap: wrap;
    gap: clamp(5px, 1.6cqw, 9px);
    margin: auto 0;
}

.vote{
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: clamp(5px, 1.4cqw, 7px) clamp(12px, 3cqw, 15px) clamp(5px, 1.4cqw, 7px) 6px;
    border: 1px solid #2a323a;
    border-radius: 18px;
    background: #111315;
    color: #e6e6e6;
    font-family: inherit;
    font-size: clamp(12.5px, 3.1cqw, 14.5px);
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s ease, transform .25s cubic-bezier(.3, 1.6, .5, 1), box-shadow .3s ease;
}

.votes[hidden],
.vote-done[hidden]{
    display: none;
}

/* After the ticked animation, the themes fade out for the thank you */
.votes.is-leaving{
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .3s ease, transform .3s ease;
}

.vote-done{
    margin: auto 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    animation: vote-done-in .4s ease-out;
}

.suggest .vote-done-text{
    font-size: 17px;
    line-height: 24px;
}

.vote-change{
    padding: 0;
    border: 0;
    background: none;
    color: #8a97a3;
    font-family: inherit;
    font-size: 11.5px;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.vote-change:hover{
    color: #c4cad0;
}

@keyframes vote-done-in{
    from{ opacity: 0; transform: translateY(6px); }
    to{ opacity: 1; transform: none; }
}

.vote:hover{
    border-color: color-mix(in srgb, var(--c) 60%, #2a323a);
}

.vote-plus{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 5px;
    box-sizing: border-box;
    border-radius: 10px;
    background: #1a1f23;
    color: var(--c);
    font-size: 11px;
    font-weight: 700;
}

.vote.on{
    border-color: transparent;
    background: linear-gradient(#111315, #111315) padding-box, linear-gradient(90deg, #8f6bff, #d052d8, #ff7a6b) border-box;
    box-shadow: 0 0 16px rgba(208, 82, 216, .35);
    transform: scale(1.04);
}

.vote.on .vote-plus{
    background: linear-gradient(90deg, #8f6bff, #ff7a6b);
    color: #fff;
}

/* The sparks of a +1 (category.js) */
.vote-burst{
    position: absolute;
    left: 17px;
    top: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
}

.vote-burst i{
    position: absolute;
    left: -2.5px;
    top: -2.5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: linear-gradient(#c357e0, #ff7a6b);
    box-shadow: 0 0 6px rgba(208, 82, 216, .8);
    animation: vote-spark .7s ease-out forwards;
}

@keyframes vote-spark{
    from{ transform: rotate(var(--a)) translateY(0) scale(1); opacity: 1; }
    to{ transform: rotate(var(--a)) translateY(-22px) scale(.4); opacity: 0; }
}

/* The bottom: the usual dots, another idea (stored, never shown) */
.other{
    margin: 0 -16px;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid #161b1f;
    background: radial-gradient(circle at 7.5px 7.5px, rgba(120, 135, 150, .3) .9px, transparent 1.3px) 0 0/15px 15px;
}

.other-form{
    position: relative;
    display: flex;
    gap: 6px;
}

.other-form input[type="text"]{
    flex: 1;
    min-width: 0;
    height: 32px;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid #2a323a;
    border-radius: 16px;
    background: #0b0d0f;
    color: #fff;
    font-family: inherit;
    font-size: 12.5px;
}

.other-form input[type="text"]::placeholder{
    color: #6f7b86;
}

.other-form input[type="text"]:focus{
    outline: none;
    border-color: var(--c);
}

.other-form button{
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #7b48fc;
    color: #fff;
    cursor: pointer;
}

.other-form button:hover{
    background: #8a5dfc;
}

.other-form .suggest-trap{
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

.other-note{
    font-size: 11px;
    color: #8a97a3;
}

.suggest .other-thanks{
    font-size: 13px;
    line-height: 32px;
}

@media (prefers-reduced-motion: reduce){
    .vote{
        transition: none;
    }
    .vote-burst{
        display: none;
    }
    .votes.is-leaving,
    .vote-done{
        transition: none;
        animation: none;
    }
}

.category-others{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 28px;
    padding: 22px;
    border: 1px solid #181e23;
    border-radius: 10px;
    background: #111315;
}

.category-others h2{
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
}

.category-others p{
    margin: 0;
    font-size: 14px;
    color: #b8c0c8;
}

.category-others-chips{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-others-chips a{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid #2a323a;
    border-radius: 16px;
    font-size: 13px;
    color: #e6e6e6;
    transition: border-color .18s ease;
}

.category-others-chips a:hover{
    border-color: var(--c);
    color: #fff;
}

.category-others-chips b{
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c);
}

/* Alone on its row (the packs fill theirs): the box takes the whole row */
.category-grid > .suggest:nth-child(3n+1){
    grid-column: 1 / -1;
    height: auto;
    min-height: 0;
}

@container packs (max-width: 1010px){
    .category-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-grid > .suggest:nth-child(3n+1){
        grid-column: auto;
        height: 0;
        min-height: 100%;
    }

    .category-grid > .suggest:nth-child(odd){
        grid-column: 1 / -1;
        height: auto;
        min-height: 0;
    }
}

@container packs (max-width: 520px){
    .category-grid{
        grid-template-columns: 1fr;
    }

    .category-grid > .suggest:nth-child(n){
        grid-column: auto;
        height: auto;
        min-height: 0;
    }
}
