.book-create {
    max-width: 1080px;
    margin: 12px auto 34px;
    color: #34302f;
}

/*
 * Shared SLD radius scale for the modernised Book journey:
 * 12px large panels, 10px cards/controls, 8px compact highlights.
 * Product and cover artwork remains square so the physical Book is represented accurately.
 */

.book-create__hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    align-items: center;
    gap: 24px;
    min-height: 150px;
    padding: 14px 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #fff7e8, #fffdf9);
    border-radius: 12px !important;
}

.book-create__hero h1 {
    max-width: 720px;
    margin: 3px 0 0;
    color: #9d1f25;
    font-size: 38px;
    line-height: 1.08;
}

.book-create__eyebrow {
    margin: 0;
    color: #79624c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.book-create__product {
    display: block;
    width: 190px;
    height: 150px;
    object-fit: cover;
    border-radius: 0;
}

.book-create__gate {
    display: inline-block;
    margin-top: 9px;
    padding: 4px 9px;
    background: #f2e7d5;
    border-radius: 999px !important;
    color: #66503f;
    font-size: 12px;
    font-weight: 700;
}

.book-create__section {
    padding: 13px 4px 14px;
    border-bottom: 1px solid #e8ded1;
}

.book-create__section h2 {
    margin: 0 0 10px;
    color: #6c1c21;
    font-size: 21px;
    line-height: 1.2;
}

.variant-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.variant-card,
.cover-card {
    font: inherit;
}

.variant-card {
    position: relative;
    min-height: 78px;
    padding: 12px 44px 11px 14px;
    border: 2px solid #d7c8b6;
    border-radius: 10px !important;
    background: #fff;
    color: #34302f;
    text-align: left;
    cursor: pointer;
}

.variant-card strong,
.variant-card span,
.variant-card small {
    display: block;
}

.variant-card strong {
    color: #6c1c21;
    font-size: 16px;
    text-transform: uppercase;
}

.variant-card span {
    margin-top: 3px;
    line-height: 1.3;
}

.variant-card small {
    margin-top: 3px;
    color: #756b63;
}

.variant-card.is-selected,
.cover-card.is-selected {
    border-color: #20824b;
    background: #f5fbf7;
    box-shadow: 0 0 0 3px rgba(32, 130, 75, .16);
}

.variant-card b,
.cover-card b {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 25px;
    height: 25px;
    border-radius: 50% !important;
    background: #20824b;
    color: #fff;
    font-size: 15px;
    line-height: 25px;
    text-align: center;
}

.variant-card.is-selected b,
.cover-card.is-selected b {
    display: block;
}

.variant-card:focus,
.cover-card:focus,
.book-create__input:focus,
.book-create__cta:focus {
    outline: 3px solid #f4bd45;
    outline-offset: 3px;
}

.variant-card:disabled {
    cursor: not-allowed;
    opacity: .64;
}

.book-create__personalisation {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(320px, 2fr);
    column-gap: 20px;
    align-items: end;
}

.book-create__personalisation h2 {
    grid-column: 1 / -1;
}

.book-create__label {
    display: block;
    margin: 0 0 7px;
    font-size: 18px;
    font-weight: 700;
}

.book-create__input {
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    height: 46px !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    border: 2px solid #b9aa98 !important;
    border-radius: 10px !important;
    font-size: 22px !important;
}

.book-create[data-book-personalisation="family"] .book-create__input {
    text-transform: uppercase;
}

.book-create__help {
    grid-column: 1 / -1;
    margin: 5px 0 0;
    color: #6d6258;
    font-size: 13px;
}

.book-create__validation {
    grid-column: 1 / -1;
    min-height: 18px;
    margin: 3px 0 0;
    color: #8a2026;
    font-size: 13px;
    font-weight: 700;
}

.book-create.has-family-name-error .book-create__input {
    border-color: #b7353c !important;
}

.family-live {
    display: flex;
    min-width: 0;
    align-self: center;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #ead9b7;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #fff9ed, #f8fcf7);
    box-shadow: 0 3px 12px rgba(113, 77, 35, .08);
    overflow: hidden;
    white-space: nowrap;
}

.family-live strong {
    min-width: 0;
    overflow: hidden;
    color: #9d1f25;
    font-size: 20px;
    text-overflow: ellipsis;
}

.family-live em {
    min-width: 0;
    overflow: hidden;
    color: #3e604e;
    font-style: normal;
    font-weight: 700;
    letter-spacing: .08em;
    text-overflow: ellipsis;
}

.family-live > span {
    padding: 0 4px;
    color: #ad8749;
}

.cover-grid {
    display: grid;
    box-sizing: border-box;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.book-create[data-book-personalisation="individual"] .cover-grid {
    display: flex;
    padding: 3px 2px 9px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-left: 2px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.cover-card {
    position: relative;
    min-width: 0;
    padding: 5px 5px 8px;
    border: 2px solid #d7c8b6;
    border-radius: 10px !important;
    background: #fff;
    color: #34302f;
    cursor: pointer;
}

.book-create[data-book-personalisation="individual"] .cover-card {
    flex: 0 0 calc((100% - 50px) / 6);
    scroll-snap-align: start;
}

.cover-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
}

.cover-card span {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    color: #5c2024;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
}

.book-create__action {
    padding: 14px 4px 0;
    text-align: center;
}

.book-create__cta {
    box-sizing: border-box;
    min-width: 320px;
    min-height: 48px;
    padding: 11px 24px !important;
    border-radius: 10px !important;
    font-size: 19px !important;
}

.book-create__price {
    margin: 6px 0 0;
    font-weight: 700;
}

.book-create__error {
    margin: 12px 0 0;
    padding: 11px 14px;
    border: 1px solid #bd4040;
    border-radius: 10px !important;
    background: #fff0f0;
    color: #7b1818;
    font-weight: 700;
}

.family-payment-boundary {
    margin: 16px 0;
    padding: 15px 18px;
    border: 1px solid #dfceb7;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #fff8eb, #f5fbf7);
    box-shadow: 0 4px 14px rgba(91, 61, 31, .1);
}

.family-payment-boundary h3 {
    margin: 0 0 5px;
    color: #7b2025;
}

.family-payment-boundary p {
    margin: 0;
}

@media (max-width: 900px) {
    .cover-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .book-create {
        max-width: 100%;
        margin: 7px 0 25px;
        overflow-x: hidden;
    }

    .book-create__hero {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 9px;
        padding: 13px;
    }

    .book-create__hero h1 {
        font-size: 27px;
    }

    .book-create__product {
        width: 100%;
        height: 135px;
        object-position: center 43%;
    }

    .book-create__section {
        padding: 12px 2px;
    }

    .book-create__section h2 {
        font-size: 19px;
    }

    .variant-cards {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .variant-card {
        min-height: 70px;
        padding-top: 10px;
        padding-bottom: 9px;
    }

    .book-create__personalisation {
        display: block;
    }

    .book-create__input {
        max-width: none;
    }

    .book-create__help {
        margin-top: 5px;
    }

    .family-live {
        margin-top: 8px;
        overflow: hidden;
        font-size: 13px;
        text-overflow: ellipsis;
    }

    .family-live strong {
        flex: 0 1 auto;
    }

    .family-live em {
        flex: 1 1 auto;
    }

    .family-live strong {
        font-size: 17px;
    }

    .cover-grid {
        display: flex;
        grid-template-columns: none;
        gap: 10px;
        width: 100%;
        padding: 3px 18% 8px 2px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-padding-left: 2px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .cover-card {
        flex: 0 0 78%;
        scroll-snap-align: start;
    }

    .cover-card span {
        font-size: 14px;
    }

    .book-create__action {
        padding-top: 12px;
    }

    .book-create__action.is-ready {
        position: sticky;
        z-index: 20;
        bottom: 7px;
        margin: 0 2px;
        padding: 8px;
        border: 1px solid #e2d2bd;
        border-radius: 12px !important;
        background: rgba(255, 252, 247, .96);
        box-shadow: 0 5px 18px rgba(54, 37, 20, .2);
    }

    .book-create__cta {
        width: 100%;
        min-width: 0;
    }

    .book-create[data-book-personalisation="individual"] .cover-card {
        flex-basis: 78%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cover-grid {
        scroll-behavior: auto;
    }
}
