/*
 * One product card for every product list (PYQ_Store_List_Card).
 * Owner-approved design A: cover left; title and facts in the middle;
 * price and one button on the right, moving below the facts on a phone.
 */

.pt-pcard {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    text-align: left;
    transition: border-color .15s, box-shadow .15s;
}

.pt-pcard:hover {
    border-color: #bfdbfe;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
}

/* The whole card opens the product; the button sits above this link. */
.pt-pcard__link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.pt-pcard__link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Cover, or a small PDF / test tile */
.pt-pcard__th {
    position: relative;
    flex: none;
    width: 76px;
    height: 100px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.pt-pcard__th img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.pt-pcard__th--pdf,
.pt-pcard__th--test {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 14px;
    text-align: center;
}

.pt-pcard__th--pdf {
    background: linear-gradient(180deg, #fff, #fef2f2);
}

.pt-pcard__th--pdf i {
    padding: 2px 7px;
    border-radius: 4px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.pt-pcard__th--test {
    background: linear-gradient(180deg, #fff, #f5f3ff);
    color: #7c3aed;
}

.pt-pcard__th--test svg {
    width: 26px;
    height: 26px;
}

.pt-pcard__th--test span {
    padding: 0 6px;
    color: #475569;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.25;
}

.pt-pcard__tag {
    position: absolute;
    top: 8px;
    left: 0;
    padding: 2px 6px;
    border-radius: 0 6px 6px 0;
    background: #ea580c;
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.4;
}

.pt-pcard__tag--en {
    background: #2563eb;
}

.pt-pcard__tag--bilingual {
    background: #7c3aed;
}

/* Title, facts */
.pt-pcard__body {
    flex: 1;
    min-width: 0;
}

.pt-pcard__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pt-pcard__chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.5;
}

.pt-pcard__chip--live {
    background: #dcfce7;
    color: #15803d;
}

.pt-pcard__chip--soon {
    background: #fef3c7;
    color: #b45309;
}

.pt-pcard__chip--note {
    background: #eff6ff;
    color: #1d4ed8;
}

.pt-pcard .pt-pcard__title {
    margin: 0 0 8px;
    padding: 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.pt-pcard__chips + .pt-pcard__title {
    margin-top: 6px;
}

/*
 * The coloured "(Word)" after a title (PYQ_Store_Title_Tag), owner-approved
 * option B: bold, red for a PDF, purple for a test. Also used by the product
 * page title and the related-products cards.
 */
.pt-ttag {
    color: #b91c1c;
    font-weight: 700;
    white-space: nowrap;
}

.pt-ttag--test {
    color: #6d28d9;
}

.pt-pcard__facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    color: #475569;
    font-size: 13px;
}

.pt-pcard__facts span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.pt-pcard__facts svg {
    flex: none;
    width: 14px;
    height: 14px;
    color: #94a3b8;
}

/* Price and the one button */
.pt-pcard__side {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    min-width: 130px;
    text-align: right;
}

.pt-pcard__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 2px 7px;
}

.pt-pcard__now {
    color: #0f172a;
    font-size: 20px;
    font-weight: 800;
}

.pt-pcard__price del {
    color: #94a3b8;
    font-size: 13px;
}

.pt-pcard__off {
    color: #15803d;
    font-size: 12.5px;
    font-weight: 700;
}

.pt-pcard__free {
    color: #15803d;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .02em;
}

.pt-pcard__owned {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 700;
}

.pt-pcard__owned svg {
    width: 15px;
    height: 15px;
}

.pt-pcard__cta {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.pt-pcard__cta:hover,
.pt-pcard__cta:focus {
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
}

.pt-pcard__cta svg {
    width: 15px;
    height: 15px;
}

.pt-pcard__cta--owned,
.pt-pcard__cta--owned:hover,
.pt-pcard__cta--owned:focus {
    background: #eff6ff;
    color: #1d4ed8;
}

.pt-pcard__cta--off {
    z-index: 0;
    background: #f1f5f9;
    color: #64748b;
}

.pt-pcard__cta--wait {
    background: #fef3c7;
    color: #b45309;
}

/* Phone: price and button become one row under the facts. */
@media (max-width: 600px) {
    .pt-pcard {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 10px 12px;
        align-items: start;
        padding: 12px;
    }

    .pt-pcard__th {
        width: 72px;
        height: 94px;
    }

    .pt-pcard .pt-pcard__title {
        margin: 0 0 6px;
        font-size: 15px;
    }

    .pt-pcard__facts {
        gap: 3px 12px;
        font-size: 12.5px;
    }

    .pt-pcard__side {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-width: 0;
        padding-top: 10px;
        border-top: 1px solid #f1f5f9;
        text-align: left;
    }

    .pt-pcard__price {
        justify-content: flex-start;
    }
}
