:root {
    --twm-pink: #ef1f6b;
    --twm-orange: #fb702b;
    --twm-text: #171717;
    --twm-muted: #777777;
    --twm-border: #dddddd;
    --twm-soft: #f7f7f7;
    --twm-white: #ffffff;
}

.twm-art-checkout,
.twm-art-checkout * {
    box-sizing: border-box;
}

.twm-art-checkout {
    max-width: 1180px;
    margin: 32px auto;
    color: var(--twm-text);
    font-family: inherit;
}

.twm-admin-note {
    margin-bottom: 18px !important;
}

.twm-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 20px 28px;
    border: 1px solid var(--twm-border);
    border-radius: 7px;
    background: var(--twm-white);
    margin-bottom: 30px;
}

.twm-stepper-item {
    border: 0;
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    min-width: 0;
    color: var(--twm-text);
    cursor: pointer;
}

.twm-stepper-item:disabled {
    cursor: default;
}

.twm-step-number {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #d8d8d8;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    transition: .2s ease;
}

.twm-step-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.twm-step-copy strong {
    font-size: 15px;
    line-height: 1.15;
    white-space: nowrap;
}

.twm-step-copy small {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.2;
    color: var(--twm-muted);
    white-space: nowrap;
}

.twm-stepper-item.is-active .twm-step-number,
.twm-stepper-item.is-complete .twm-step-number {
    background: var(--twm-pink);
}

.twm-stepper-item.is-active .twm-step-copy strong {
    color: var(--twm-pink);
}

.twm-step-line {
    height: 1px;
    background: #e3e3e3;
    flex: 1 1 70px;
    min-width: 18px;
}

.twm-step-panel[hidden] {
    display: none !important;
}

.twm-card {
    border: 1px solid var(--twm-border);
    border-radius: 7px;
    background: var(--twm-white);
    padding: 22px;
}

.twm-card-heading {
    margin-bottom: 18px;
}

.twm-card-heading > div {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.twm-card-heading h2,
.twm-payment-card > h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--twm-text);
}

.twm-eyebrow {
    font-weight: 800;
    font-size: 18px;
}

.twm-card-heading p {
    margin: 7px 0 0;
    color: var(--twm-muted);
    font-size: 13px;
    line-height: 1.45;
}

.twm-search-wrap {
    position: relative;
    display: block;
    margin-bottom: 12px;
}

.twm-search-wrap input[type="search"] {
    width: 100%;
    min-height: 44px;
    padding: 10px 40px 10px 14px;
    border: 1px solid var(--twm-border);
    border-radius: 7px;
    background: #fff;
    color: var(--twm-text);
    font-size: 14px;
    outline: none;
}

.twm-search-wrap input[type="search"]:focus {
    border-color: var(--twm-pink);
    box-shadow: 0 0 0 2px rgba(239,31,107,.08);
}

.twm-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #333;
    pointer-events: none;
}

.twm-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}

.twm-pill {
    border: 0;
    border-radius: 999px;
    background: #efefef;
    color: #222;
    padding: 6px 10px;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

.twm-pill.is-active {
    background: var(--twm-pink);
    color: #fff;
}

.twm-product-grid,
.twm-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.twm-product-grid.is-loading,
.twm-modal-grid.is-loading {
    opacity: .5;
    pointer-events: none;
}

.twm-product-card {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    cursor: pointer;
    border-radius: 7px;
    min-width: 0;
}

.twm-product-image-wrap {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 7px;
    border: 2px solid transparent;
    background: #f4f4f4;
}

.twm-product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.twm-product-title {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.3;
    color: #454545;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.twm-product-check {
    position: absolute;
    right: 7px;
    top: 7px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--twm-pink);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
}

.twm-product-card.is-selected .twm-product-image-wrap {
    border-color: var(--twm-pink);
}

.twm-product-card.is-selected .twm-product-check {
    display: flex;
}

.twm-selection-status {
    margin-top: 12px;
    padding: 9px 11px;
    border-radius: 6px;
    background: #fff4f8;
    color: var(--twm-pink);
    font-size: 12px;
    font-weight: 700;
}

.twm-empty-products {
    grid-column: 1 / -1;
    padding: 28px 10px;
    text-align: center;
    color: var(--twm-muted);
    font-size: 13px;
}

.twm-outline-button,
.twm-primary-button,
.twm-secondary-button {
    min-height: 44px;
    border-radius: 7px;
    padding: 10px 18px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .01em;
    cursor: pointer;
    transition: .18s ease;
}

.twm-outline-button {
    width: 100%;
    margin-top: 16px;
    border: 1px solid var(--twm-pink);
    background: #fff;
    color: var(--twm-pink);
}

.twm-outline-button:hover {
    background: #fff5f8;
}

.twm-primary-button {
    border: 0;
    color: #fff;
    background: linear-gradient(90deg, var(--twm-orange), var(--twm-pink));
}

.twm-primary-button:disabled,
.twm-outline-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.twm-secondary-button {
    border: 1px solid var(--twm-border);
    background: #fff;
    color: #333;
}

.twm-step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.twm-step-actions-right {
    justify-content: flex-end;
}

.twm-option-block + .twm-option-block {
    margin-top: 20px;
}

.twm-option-block h3 {
    font-size: 13px;
    font-weight: 800;
    margin: 0 0 9px;
}

.twm-choice-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.twm-choice-grid[data-role="size"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.twm-option-choice,
.twm-static-product-type {
    min-height: 44px;
    border: 1px solid var(--twm-border);
    border-radius: 7px;
    background: #fff;
    color: #222;
    font-size: 12px;
    padding: 8px 10px;
    text-align: center;
}

button.twm-option-choice {
    cursor: pointer;
}

.twm-option-choice.is-selected {
    border-color: var(--twm-pink);
    background: #fff6f9;
    color: var(--twm-pink);
    box-shadow: inset 0 0 0 1px var(--twm-pink);
}

.twm-option-choice.is-unavailable,
.twm-option-choice:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.twm-addons {
    border-top: 1px solid #ececec;
}

.twm-addon-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 38px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
}

.twm-addon-left {
    display: flex;
    align-items: center;
    gap: 9px;
}

.twm-addon-input {
    width: 15px !important;
    height: 15px !important;
    margin: 0 !important;
    accent-color: var(--twm-pink);
}

.twm-addon-row strong {
    font-size: 11px;
}

.twm-selected-product {
    margin-top: 20px;
    padding: 10px;
    border: 1px solid var(--twm-border);
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.twm-selected-product img {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 6px;
}

.twm-selected-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.twm-selected-copy strong {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.twm-selected-copy small {
    font-size: 10px;
    color: var(--twm-muted);
}

.twm-selected-copy span {
    margin-top: 2px;
    color: var(--twm-pink);
    font-weight: 800;
    font-size: 14px;
}

.twm-loading {
    padding: 28px 0;
    color: var(--twm-muted);
    text-align: center;
}

.twm-checkout-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}


.twm-shipping-label {
    grid-column: 1 / -1;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 900;
    color: #222;
}

.twm-checkout-fields .form-row {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

.twm-checkout-fields .twm-field-email,
.twm-checkout-fields .twm-field-phone,
.twm-checkout-fields .twm-field-address_1,
.twm-checkout-fields .twm-field-address_2,
.twm-checkout-fields .twm-field-country {
    grid-column: 1 / -1;
}

.twm-checkout-fields label,
.twm-order-notes label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #242424;
}

.twm-checkout-fields input.input-text,
.twm-checkout-fields select,
.twm-order-notes textarea,
.twm-art-checkout .select2-container .select2-selection--single {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--twm-border) !important;
    border-radius: 7px !important;
    background: #fff;
    padding: 9px 11px;
    box-shadow: none !important;
    font-size: 13px;
}

.twm-art-checkout .select2-container .select2-selection--single {
    padding: 7px 10px;
}

.twm-art-checkout .select2-container .select2-selection__rendered {
    line-height: 28px;
    padding-left: 0;
}

.twm-art-checkout .select2-container .select2-selection__arrow {
    height: 42px;
}

.twm-checkout-fields .woocommerce-invalid input,
.twm-checkout-fields .woocommerce-invalid select,
.twm-checkout-fields .woocommerce-invalid .select2-selection {
    border-color: #d63638 !important;
}

.twm-review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.twm-order-review .shop_table,
.twm-order-review table {
    width: 100%;
    border: 0 !important;
    border-collapse: collapse;
    margin: 0 !important;
}

.twm-order-review th,
.twm-order-review td {
    border: 0 !important;
    border-bottom: 1px solid #ededed !important;
    padding: 11px 0 !important;
    font-size: 12px;
    text-align: left;
}

.twm-order-review td:last-child,
.twm-order-review th:last-child {
    text-align: right;
}

.twm-order-review .order-total th,
.twm-order-review .order-total td {
    font-size: 16px;
    font-weight: 900;
}

.twm-order-review .order-total td {
    color: var(--twm-pink);
}

.twm-payment-card > h2 {
    margin-bottom: 14px;
}

.twm-order-notes {
    margin-bottom: 16px;
}

.twm-order-notes textarea {
    min-height: 115px;
    resize: vertical;
}

.twm-art-checkout #payment {
    background: transparent !important;
    border-radius: 0 !important;
}

.twm-art-checkout #payment ul.payment_methods {
    padding: 0 !important;
    border: 0 !important;
    margin: 0 0 16px !important;
}

.twm-art-checkout #payment ul.payment_methods li {
    padding: 7px 0 !important;
    font-size: 12px;
    line-height: 1.35;
}

.twm-art-checkout #payment div.payment_box {
    background: #f7f7f7 !important;
    color: #444 !important;
    font-size: 12px !important;
}

.twm-art-checkout #payment div.payment_box::before {
    border-bottom-color: #f7f7f7 !important;
}

.twm-art-checkout #payment .place-order {
    padding: 0 !important;
    margin-top: 16px !important;
}

.twm-art-checkout #place_order,
.twm-art-checkout .twm-place-order {
    width: 100% !important;
    min-height: 48px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: linear-gradient(90deg, var(--twm-orange), var(--twm-pink)) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    box-shadow: none !important;
}

.twm-art-checkout .woocommerce-privacy-policy-text,
.twm-art-checkout .woocommerce-terms-and-conditions-wrapper {
    font-size: 11px;
    color: var(--twm-muted);
}

.twm-step-four-actions {
    justify-content: flex-start;
}

.twm-inline-notice {
    margin: 0 0 16px !important;
    font-size: 12px;
}

.twm-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
}

.twm-modal.is-open {
    display: block;
}

.twm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.58);
}

.twm-modal-dialog {
    position: relative;
    width: min(920px, calc(100vw - 34px));
    max-height: calc(100vh - 54px);
    overflow: auto;
    margin: 27px auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 20px 70px rgba(0,0,0,.25);
    padding: 22px;
}

.twm-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.twm-modal-header h2 {
    margin: 0;
    font-size: 21px;
}

.twm-modal-header p {
    margin: 5px 0 0;
    color: var(--twm-muted);
    font-size: 12px;
}

.twm-modal-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--twm-border);
    border-radius: 999px;
    background: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.twm-modal-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.twm-modal-footer {
    display: flex;
    justify-content: center;
}

.twm-modal-footer .twm-outline-button {
    width: auto;
    min-width: 190px;
}

body.twm-modal-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .twm-stepper {
        padding: 16px;
        gap: 7px;
    }
    .twm-step-copy small {
        display: none;
    }
    .twm-step-copy strong {
        font-size: 12px;
    }
    .twm-step-number {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }
    .twm-review-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .twm-modal-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .twm-art-checkout {
        margin: 18px auto;
    }
    .twm-stepper {
        overflow-x: auto;
        justify-content: flex-start;
    }
    .twm-step-line {
        flex: 0 0 18px;
    }
    .twm-step-copy strong {
        display: none;
    }
    .twm-card {
        padding: 16px;
    }
    .twm-product-grid,
    .twm-modal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .twm-choice-grid,
    .twm-choice-grid[data-role="size"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .twm-checkout-fields {
        grid-template-columns: 1fr;
    }
    .twm-checkout-fields .form-row {
        grid-column: 1 / -1 !important;
    }
    .twm-step-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }
    .twm-step-actions button {
        width: 100%;
    }
    .twm-modal-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        margin: 10px auto;
        padding: 16px;
    }
}

/* ========================================================================
   v1.1 visual refinement — closer to supplied checkout reference
   ======================================================================== */
:root {
    --twm-pink: #ef1f6b;
    --twm-orange: #ff8917;
    --twm-text: #171717;
    --twm-muted: #777777;
    --twm-border: #dedede;
    --twm-soft: #f8f8f8;
    --twm-white: #ffffff;
}

.twm-art-checkout {
    max-width: 1180px;
    margin: 20px auto 36px;
}

/* Progress header */
.twm-stepper {
    min-height: 72px;
    padding: 15px 26px;
    margin-bottom: 28px;
    border-color: #dcdcdc;
    border-radius: 6px;
    box-shadow: none;
}

.twm-stepper-item {
    flex: 0 1 auto;
    gap: 10px;
    transition: opacity .18s ease, transform .18s ease;
}

.twm-stepper-item:not(:disabled):hover {
    transform: translateY(-1px);
}

.twm-step-number {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    background: #d2d2d2;
    font-size: 12px;
}

.twm-step-copy strong {
    font-size: 14px;
    font-weight: 800;
}

.twm-step-copy small {
    margin-top: 3px;
    font-size: 10.5px;
    color: #8a8a8a;
}

.twm-step-line {
    min-width: 28px;
    background: #e8e8e8;
}

/* Main cards */
.twm-card {
    border-color: #dedede;
    border-radius: 6px;
    padding: 18px;
    box-shadow: none;
}

.twm-card-heading {
    margin-bottom: 13px;
}

.twm-card-heading h2,
.twm-payment-card > h2,
.twm-eyebrow {
    font-size: 15px;
    line-height: 1.2;
}

.twm-card-heading p {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.35;
    color: #777;
}

/* Search + filter pills */
.twm-search-wrap {
    margin-bottom: 10px;
}

.twm-search-wrap input[type="search"] {
    min-height: 39px;
    padding: 8px 38px 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.twm-search-wrap input[type="search"]:hover {
    border-color: #c9c9c9;
}

.twm-search-wrap input[type="search"]:focus {
    border-color: var(--twm-pink);
    box-shadow: 0 0 0 3px rgba(239,31,107,.08);
}

.twm-search-icon {
    right: 12px;
    font-size: 16px;
}

.twm-category-pills {
    gap: 5px;
    margin-bottom: 10px;
}

.twm-pill {
    padding: 5px 8px;
    background: #efefef;
    font-size: 10px;
    font-weight: 600;
    transition: color .16s ease, background-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.twm-pill:hover {
    background: #e2e2e2;
    transform: translateY(-1px);
}

.twm-pill.is-active,
.twm-pill.is-active:hover {
    background: var(--twm-pink);
    color: #fff;
    box-shadow: 0 3px 9px rgba(239,31,107,.18);
}

/* Six designs across on desktop. Product name is an image-overlay on hover only. */
.twm-product-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.twm-product-card {
    position: relative;
    display: block;
    overflow: visible;
    border-radius: 6px;
    transform: translateZ(0);
    transition: transform .2s ease;
}

.twm-product-card:hover,
.twm-product-card:focus-visible {
    transform: translateY(-3px);
}

.twm-product-card:focus-visible {
    outline: 0;
}

.twm-product-image-wrap {
    aspect-ratio: 4 / 5;
    border-width: 2px;
    border-radius: 6px;
    background: #f3f3f3;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.twm-product-image-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.34) 31%, rgba(0,0,0,0) 62%);
    opacity: 0;
    transition: opacity .22s ease;
}

.twm-product-image-wrap img {
    transition: transform .32s ease, filter .24s ease;
}

.twm-product-card:hover .twm-product-image-wrap,
.twm-product-card:focus-visible .twm-product-image-wrap {
    border-color: #d1d1d1;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

.twm-product-card:hover .twm-product-image-wrap img,
.twm-product-card:focus-visible .twm-product-image-wrap img {
    transform: scale(1.045);
}

.twm-product-card:hover .twm-product-image-wrap::after,
.twm-product-card:focus-visible .twm-product-image-wrap::after {
    opacity: 1;
}

.twm-product-title {
    position: absolute;
    z-index: 3;
    left: 10px;
    right: 10px;
    bottom: 9px;
    display: block;
    margin: 0;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transform: translateY(7px);
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,.25);
    transition: opacity .2s ease, transform .2s ease;
}

.twm-product-card:hover .twm-product-title,
.twm-product-card:focus-visible .twm-product-title {
    opacity: 1;
    transform: translateY(0);
}

.twm-product-check {
    z-index: 4;
    right: 7px;
    top: 7px;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    box-shadow: 0 2px 7px rgba(0,0,0,.17);
    font-size: 10px;
}

.twm-product-card.is-selected .twm-product-image-wrap,
.twm-product-card.is-selected:hover .twm-product-image-wrap {
    border-color: var(--twm-pink);
    box-shadow: 0 0 0 1px var(--twm-pink), 0 8px 20px rgba(239,31,107,.12);
}

/* Selection is communicated with the pink border/check like the reference. */
.twm-selection-status {
    display: none !important;
}

/* Buttons */
.twm-outline-button,
.twm-primary-button,
.twm-secondary-button {
    min-height: 40px;
    border-radius: 6px;
    font-size: 11px;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}

.twm-outline-button {
    margin-top: 14px;
}

.twm-outline-button:hover:not(:disabled) {
    background: #fff4f8;
    border-color: var(--twm-pink);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239,31,107,.08);
}

.twm-primary-button:hover:not(:disabled),
.twm-art-checkout #place_order:hover,
.twm-art-checkout .twm-place-order:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 17px rgba(239,31,107,.18) !important;
    filter: saturate(1.04);
}

.twm-secondary-button:hover:not(:disabled) {
    background: #f8f8f8;
    border-color: #c9c9c9;
    transform: translateY(-1px);
}

/* Options — keep the same compact, boxed treatment as the reference */
.twm-choice-grid {
    gap: 7px;
}

.twm-option-choice,
.twm-static-product-type {
    min-height: 40px;
    border-radius: 6px;
    font-size: 11px;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

button.twm-option-choice:hover:not(:disabled) {
    border-color: #c7c7c7;
    background: #fafafa;
    transform: translateY(-1px);
}

.twm-option-choice.is-selected,
.twm-option-choice.is-selected:hover:not(:disabled) {
    border-color: var(--twm-pink);
    background: #fff4f8;
    color: var(--twm-pink);
    box-shadow: inset 0 0 0 1px var(--twm-pink);
}

.twm-selected-product {
    border-radius: 6px;
    background: #fff;
}

/* Checkout fields */
.twm-checkout-fields input.input-text,
.twm-checkout-fields select,
.twm-order-notes textarea,
.twm-art-checkout .select2-container .select2-selection--single {
    min-height: 40px;
    border-radius: 6px !important;
    font-size: 12px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.twm-checkout-fields input.input-text:hover,
.twm-checkout-fields select:hover,
.twm-order-notes textarea:hover {
    border-color: #c9c9c9 !important;
}

.twm-checkout-fields input.input-text:focus,
.twm-checkout-fields select:focus,
.twm-order-notes textarea:focus {
    border-color: var(--twm-pink) !important;
    box-shadow: 0 0 0 3px rgba(239,31,107,.07) !important;
    outline: 0;
}

/* Review / payment */
.twm-review-grid {
    gap: 24px;
}

.twm-order-review th,
.twm-order-review td {
    font-size: 11px;
}

.twm-art-checkout #place_order,
.twm-art-checkout .twm-place-order {
    min-height: 46px !important;
    border-radius: 6px !important;
    background: linear-gradient(90deg, #ff8917 0%, #ff711f 28%, #f44851 58%, #ef1f6b 100%) !important;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

/* Modal */
.twm-modal-backdrop {
    background: rgba(17,17,17,.58);
    backdrop-filter: blur(2px);
}

.twm-modal-dialog {
    width: min(1080px, calc(100vw - 34px));
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0,0,0,.22);
}

.twm-modal-close {
    transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}

.twm-modal-close:hover {
    transform: rotate(6deg);
    border-color: #cfcfcf;
    background: #f8f8f8;
}

.twm-modal-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

/* Requested responsive product counts: 6 desktop / 3 tablet / 2 mobile. */
@media (max-width: 1024px) {
    .twm-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }
    .twm-modal-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .twm-stepper {
        padding: 13px 14px;
        gap: 6px;
    }

    .twm-step-copy small {
        display: none;
    }

    .twm-step-copy strong {
        font-size: 11px;
    }

    .twm-step-number {
        width: 29px;
        height: 29px;
        flex-basis: 29px;
    }
}

@media (max-width: 640px) {
    .twm-card {
        padding: 14px;
    }

    .twm-product-grid,
    .twm-modal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .twm-product-title {
        left: 8px;
        right: 8px;
        bottom: 8px;
        font-size: 10.5px;
    }
}

/* On devices that do not support hover, keep names visually hidden as requested;
   keyboard focus remains available for accessibility on devices that have it. */
@media (hover: none) {
    .twm-product-card:hover .twm-product-title {
        opacity: 0;
        transform: translateY(7px);
    }
    .twm-product-card:hover .twm-product-image-wrap::after {
        opacity: 0;
    }
    .twm-product-card:hover .twm-product-image-wrap img {
        transform: none;
    }
}


/* ========================================================================
   v1.2 progress-step hover/focus fix
   Prevent theme/global button hover styles from painting the step tabs.
   ======================================================================== */
.twm-art-checkout .twm-stepper button.twm-stepper-item,
.twm-art-checkout .twm-stepper button.twm-stepper-item:hover,
.twm-art-checkout .twm-stepper button.twm-stepper-item:focus,
.twm-art-checkout .twm-stepper button.twm-stepper-item:active,
.twm-art-checkout .twm-stepper button.twm-stepper-item:visited {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: 0;
    color: var(--twm-text) !important;
    text-decoration: none !important;
    padding: 0 !important;
    transform: none !important;
}

/* Some WordPress themes add hover overlays with pseudo-elements. */
.twm-art-checkout .twm-stepper button.twm-stepper-item::before,
.twm-art-checkout .twm-stepper button.twm-stepper-item::after,
.twm-art-checkout .twm-stepper button.twm-stepper-item:hover::before,
.twm-art-checkout .twm-stepper button.twm-stepper-item:hover::after {
    content: none !important;
    display: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Keep all inner labels clean on hover; only text color changes. */
.twm-art-checkout .twm-stepper .twm-stepper-item .twm-step-copy,
.twm-art-checkout .twm-stepper .twm-stepper-item .twm-step-copy strong,
.twm-art-checkout .twm-stepper .twm-stepper-item .twm-step-copy small,
.twm-art-checkout .twm-stepper .twm-stepper-item:hover .twm-step-copy,
.twm-art-checkout .twm-stepper .twm-stepper-item:hover .twm-step-copy strong,
.twm-art-checkout .twm-stepper .twm-stepper-item:hover .twm-step-copy small {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.twm-art-checkout .twm-stepper .twm-stepper-item .twm-step-copy strong,
.twm-art-checkout .twm-stepper .twm-stepper-item:hover .twm-step-copy strong {
    color: var(--twm-text) !important;
}

.twm-art-checkout .twm-stepper .twm-stepper-item .twm-step-copy small,
.twm-art-checkout .twm-stepper .twm-stepper-item:hover .twm-step-copy small {
    color: #8a8a8a !important;
}

/* Active step stays pink, matching the reference, without a pink rectangle. */
.twm-art-checkout .twm-stepper .twm-stepper-item.is-active .twm-step-copy strong,
.twm-art-checkout .twm-stepper .twm-stepper-item.is-active:hover .twm-step-copy strong {
    color: var(--twm-pink) !important;
}

.twm-art-checkout .twm-stepper .twm-stepper-item.is-active .twm-step-number,
.twm-art-checkout .twm-stepper .twm-stepper-item.is-active:hover .twm-step-number,
.twm-art-checkout .twm-stepper .twm-stepper-item.is-complete .twm-step-number,
.twm-art-checkout .twm-stepper .twm-stepper-item.is-complete:hover .twm-step-number {
    background: var(--twm-pink) !important;
    color: #fff !important;
    box-shadow: none !important;
}

/* Unlocked completed steps get a subtle text hover only. */
.twm-art-checkout .twm-stepper .twm-stepper-item.is-complete:not(.is-active):not(:disabled):hover .twm-step-copy strong {
    color: var(--twm-pink) !important;
}

/* Keyboard accessibility without changing the visual hover treatment. */
.twm-art-checkout .twm-stepper button.twm-stepper-item:focus-visible {
    outline: 2px solid rgba(239, 31, 107, .28) !important;
    outline-offset: 5px !important;
    border-radius: 3px !important;
}

/* v1.3 review summary redesign */
.twm-review-grid {
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.twm-custom-review {
    margin-top: 6px;
}

.twm-review-summary-card {
    border: 1px solid var(--twm-border);
    border-radius: 8px;
    background: #fff;
    padding: 14px 14px 12px;
}

.twm-review-product-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin-bottom: 16px;
}

.twm-review-thumb {
    width: 48px;
    height: 64px;
    overflow: hidden;
    border-radius: 4px;
    background: #f3f3f3;
}

.twm-review-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.twm-review-title {
    display: block;
    margin: 0 0 4px;
    color: var(--twm-text);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.twm-review-meta-line {
    color: #8b8b8b;
    font-size: 10px;
    line-height: 1.45;
}

.twm-review-meta-key,
.twm-review-meta-value {
    color: inherit;
    font-weight: 500;
}

.twm-review-totals {
    border-top: 1px solid #ededed;
    padding-top: 10px;
}

.twm-review-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 7px;
    font-size: 12px;
    color: var(--twm-text);
}

.twm-review-total-row strong {
    font-weight: 700;
    color: var(--twm-text);
}

.twm-review-total-row.is-grand-total {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #ededed;
    font-size: 15px;
    font-weight: 900;
}

.twm-review-total-row.is-grand-total strong {
    color: var(--twm-pink);
    font-size: 15px;
    font-weight: 900;
}

.twm-review-shipping {
    color: var(--twm-pink) !important;
}

.twm-native-review-source {
    display: none;
}

.twm-step-panel[data-step="4"] .twm-card-heading.twm-compact-heading {
    margin-bottom: 10px;
}

.twm-step-panel[data-step="4"] .twm-card-heading.twm-compact-heading p {
    max-width: 220px;
}

@media (max-width: 991px) {
    .twm-review-grid {
        grid-template-columns: 1fr;
    }

    .twm-step-panel[data-step="4"] .twm-card-heading.twm-compact-heading p {
        max-width: none;
    }
}

.twm-step-panel[data-step="4"] .twm-review-grid > .twm-card:first-child {
    padding: 18px 16px;
}

.twm-step-panel[data-step="4"] .twm-review-grid > .twm-card:first-child .twm-review-summary-card {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
}

/* v1.5 typography: Poppins across the complete custom checkout */
#twm-art-checkout,
#twm-art-checkout *,
#twm-art-checkout input,
#twm-art-checkout select,
#twm-art-checkout textarea,
#twm-art-checkout button,
#twm-art-checkout option,
#twm-art-checkout label,
#twm-art-checkout table,
#twm-art-checkout th,
#twm-art-checkout td,
#twm-art-checkout p,
#twm-art-checkout span,
#twm-art-checkout strong,
#twm-art-checkout small,
#twm-art-checkout a,
#twm-art-checkout .woocommerce,
#twm-art-checkout .woocommerce *,
#twm-art-checkout .select2-container,
#twm-art-checkout .select2-container * {
    font-family: 'Poppins', Arial, sans-serif !important;
}

/* Select2 may render its dropdown outside the checkout wrapper. */
body .select2-container--open .select2-dropdown,
body .select2-container--open .select2-dropdown *,
body .select2-container--open .select2-search__field,
body .select2-container--open .select2-results__option {
    font-family: 'Poppins', Arial, sans-serif !important;
}


/* v1.6 Fine Art Paper conditional options */
#twm-additional-options-block[hidden] {
    display: none !important;
}

#twm-additional-options-block.is-visible {
    display: block;
}
