.cw-loyalty-account {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cw-loyalty-account > * {
    min-width: 0;
}

.cw-loyalty-account > form,
.cw-loyalty-account > p,
.cw-loyalty-points-overview,
.cw-loyalty-collectible-select,
.cw-loyalty-current-product {
    grid-column: 1 / -1;
}

.cw-loyalty-account h2,
.cw-loyalty-account h3 {
    margin: 0;
}

.cw-loyalty-account h3 {
    margin-bottom: 20px;
}

.cw-loyalty-account > p,
.cw-loyalty-account .cw-loyalty-current-product p,
.cw-loyalty-account .cw-loyalty-rewards p,
.cw-loyalty-account .cw-loyalty-used-rewards p,
.cw-loyalty-account .cw-loyalty-collectible-select p,
.cw-loyalty-account .cw-loyalty-points-overview p {
    margin: 0;
}

.cw-loyalty-points-overview,
.cw-loyalty-collectible-select,
.cw-loyalty-current-product,
.cw-loyalty-rewards,
.cw-loyalty-used-rewards {
    background: #f7f7f7;
    border-radius: 12px;
    padding: 30px;
}

.cw-loyalty-points-overview {
    display: grid;
    gap: 1rem;
}

.cw-loyalty-points-overview__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
}

.cw-loyalty-points-overview__label {
    color: #3d3d4b;
    font-size: 1rem;
    line-height: 1.4;
}

.cw-loyalty-points-overview__value {
    color: #1a146c;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    text-align: right;
}

.cw-loyalty-account form {
    display: grid;
    gap: 0.9rem;
}

.cw-loyalty-account select {
    width: 100%;
    max-width: 32rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    background: #fff;
}

.cw-loyalty-account ul {
    margin: 0;
    padding-left: 1.2rem;
}

.cw-loyalty-account li + li {
    margin-top: 0.45rem;
}

.cw-loyalty-current-product__summary {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: center;
    margin-top: 1.1rem;
}

.cw-loyalty-current-product__image {
    width: 200px;
    height: 200px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #dedee8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cw-loyalty-current-product__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cw-loyalty-current-product__content {
    display: grid;
    gap: 1rem;
}

.cw-loyalty-current-product__name {
    color: #1a146c;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.cw-loyalty-progress {
    display: grid;
    gap: 0.75rem;
}

.cw-loyalty-progress__track {
    display: grid;
    grid-template-columns: repeat(5, 62px);
    gap: 18px;
    align-items: center;
}

.cw-loyalty-progress__step {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #d9d9df;
    border: 2px solid #d9d9df;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cw-loyalty-progress__step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    left: calc(100% + 2px);
    width: 18px;
    height: 2px;
    background: #d9d9df;
    transform: translateY(-50%);
}

.cw-loyalty-progress__step.is-active {
    background: #1a146c;
    border-color: #1a146c;
}

.cw-loyalty-progress__step.is-active:not(:last-child)::after {
    background: #1a146c;
}

.cw-loyalty-progress__step-label {
    color: #6f6f7f;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.1;
}

.cw-loyalty-progress__step.is-active .cw-loyalty-progress__step-label {
    color: #ffffff;
}

.cw-loyalty-account .cw-loyalty-current-product .cw-loyalty-current-product__change-button.button,
.cw-loyalty-account .cw-loyalty-current-product .cw-loyalty-current-product__change-button.button:visited,
.cw-loyalty-account #cw-loyalty-change-form .button,
.cw-loyalty-account #cw-loyalty-change-form .button:visited,
.cw-loyalty-account .cw-loyalty-modal__actions .button,
.cw-loyalty-account .cw-loyalty-modal__actions .button:visited {
    margin-top: 0;
    padding: 0.85rem 1.4rem;
    background: #ffffff !important;
    color: #1a146c !important;
    border: 1px solid #1a146c !important;
    border-radius: 50px !important;
    box-shadow: none !important;
    text-decoration: none;
}

.cw-loyalty-account .cw-loyalty-current-product .cw-loyalty-current-product__change-button.button:hover,
.cw-loyalty-account .cw-loyalty-current-product .cw-loyalty-current-product__change-button.button:focus,
.cw-loyalty-account .cw-loyalty-current-product .cw-loyalty-current-product__change-button.button:active,
.cw-loyalty-account #cw-loyalty-change-form .button:hover,
.cw-loyalty-account #cw-loyalty-change-form .button:focus,
.cw-loyalty-account #cw-loyalty-change-form .button:active,
.cw-loyalty-account .cw-loyalty-modal__actions .button:hover,
.cw-loyalty-account .cw-loyalty-modal__actions .button:focus,
.cw-loyalty-account .cw-loyalty-modal__actions .button:active {
    background: #1a146c !important;
    color: #ffffff !important;
    border-color: #1a146c !important;
    box-shadow: none !important;
}

#cw-loyalty-change-form {
    padding-top: 0.5rem;
}

.cw-loyalty-account .cw-loyalty-current-product p.cw-new-collectible-select {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.cw-loyalty-current-product__buy-link {
    color: #1a146c;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.cw-loyalty-current-product__buy-link:hover,
.cw-loyalty-current-product__buy-link:focus {
    color: #5340ff;
}

.cw-loyalty-modal[hidden] {
    display: none;
}

.cw-loyalty-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.cw-loyalty-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 28, 0.55);
}

.cw-loyalty-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    background: #ffffff;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 24px 60px rgba(12, 12, 24, 0.18);
    display: grid;
    gap: 1rem;
}

.cw-loyalty-modal__dialog p {
    color: #444454;
    line-height: 1.6;
}

.cw-loyalty-modal__actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.cw-loyalty-modal__actions .button {
    margin-top: 0;
}

body.cw-loyalty-modal-open {
    overflow: hidden;
}

.cw-loyalty-product-message,
.cw-loyalty-order-message {
    font-size: 16px;
    display: inline-block;
    float: none;
    max-width: 100%;
    color: #212529;
    text-decoration: none;
    margin-top: 0px;
    padding: 10px 25px;
    background-color: #f0f1f6;
    margin-bottom: 20px;
    border-left: 2px solid #5340ff;
}

.cw-loyalty-product-message__text,
.cw-loyalty-order-message p {
    margin: 0 0 12px;
    font-size:16px;
}

.cw-loyalty-product-message__actions,
.cw-loyalty-order-message p:last-child {
    margin: 0;
}
.cw-loyalty-button {
    font-size:16px;
}
.cw-loyalty-checkout {
    border: 1px solid #ddd;
    padding-left: 20px;
    background: #fafafa;
}

@media (max-width: 767px) {
    .cw-loyalty-account {
        grid-template-columns: 1fr;
    }

    .cw-loyalty-points-overview,
    .cw-loyalty-collectible-select,
    .cw-loyalty-current-product,
    .cw-loyalty-rewards,
    .cw-loyalty-used-rewards {
        padding: 1rem;
    }

    .cw-loyalty-points-overview__row {
        grid-template-columns: 1fr;
    }

    .cw-loyalty-points-overview__value {
        text-align: left;
    }

    .cw-loyalty-current-product__summary {
        grid-template-columns: 1fr;
    }

    .cw-loyalty-current-product__image {
        width: 160px;
        height: 160px;
    }

    .cw-loyalty-progress__track {
        grid-template-columns: repeat(5, minmax(42px, 1fr));
        gap: 10px;
    }

    .cw-loyalty-progress__step {
        width: 100%;
        aspect-ratio: 1;
        height: auto;
    }

    .cw-loyalty-progress__step-label {
        font-size: 0.68rem;
    }

    .cw-loyalty-progress__step:not(:last-child)::after {
        width: 10px;
    }

    .cw-loyalty-modal__actions {
        flex-direction: column;
    }

    .cw-loyalty-account .cw-loyalty-current-product p.cw-new-collectible-select {
        align-items: flex-start;
        flex-direction: column;
    }
}
