.cart-email-dialog {
    width: min(440px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 1px solid #dedede;
    background: #fff;
    color: #161616;
    font-family: inherit;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    overflow: auto;
}
.cart-email-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.cart-email-dialog__body { padding: 24px; }
.cart-email-dialog__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.cart-email-dialog__header h3 { margin: 0; font-size: 1.25rem; letter-spacing: 0.12em; }
.cart-email-dialog__close { flex: 0 0 36px; height: 36px; border: 0; background: transparent; color: inherit; font-size: 1.75rem; cursor: pointer; }
.cart-email-dialog input[type="email"] { width: 100%; box-sizing: border-box; }
#cartModal {
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
    z-index: 320;
}
#cartModal .modal-box {
    height: var(--viewer-height);
    max-height: var(--viewer-height);
    max-width: min(500px, 100vw);
    width: min(500px, 100vw);
    box-shadow: -24px 0 70px rgba(0,0,0,0.28);
}
#cartModal .modal-body { flex: 1 1 auto; }
#cartModal.modal-bg--full { padding: 0; justify-content: flex-end; }
#cartModal.modal-bg--full .modal-box {
    max-width: min(760px, 100vw);
    width: min(760px, 100vw);
    height: var(--viewer-height);
    max-height: var(--viewer-height);
}
#cartModal.modal-bg--full .modal-body { padding: 28px clamp(22px, 4vw, 42px); }
#cartModal.modal-bg--full .modal-body > .co-step,
#cartModal.modal-bg--full #cartSuccess { width: 100%; }
#cartModal.modal-bg--full .cart-line { padding: 16px 0; align-items: flex-start; }
#cartModal.modal-bg--full .cart-line__thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
}
#cartModal.modal-bg--full .cart-line__actions { align-items: center; padding-top: 4px; }
.cart-line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f1ec;
}
.cart-line__thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    background: #f0f1ec;
    border: 1px solid #e8e9e4;
    overflow: hidden;
}
button.cart-line__thumb { padding: 0; cursor: pointer; }
/* The review step unwraps the thumbnail's button to a span (nothing is clickable on
   a read-back); an inline span would ignore the width/height above. */
span.cart-line__thumb { display: block; }
.cart-line__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cart-line__info { flex: 1 1 auto; min-width: 0; }
.cart-line__actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.cart-line__actions input[type="number"],
.cart-line input[data-cart-openpack-qty],
.cart-line input[data-cart-prepack-qty] {
    line-height: 24px;
    text-align: center;
    padding: 0 !important;
    box-sizing: border-box;
    appearance: textfield;
    -moz-appearance: textfield;
}
.cart-line__actions input[type="number"]::-webkit-outer-spin-button,
.cart-line__actions input[type="number"]::-webkit-inner-spin-button,
.cart-line input[data-cart-openpack-qty]::-webkit-outer-spin-button,
.cart-line input[data-cart-openpack-qty]::-webkit-inner-spin-button,
.cart-line input[data-cart-prepack-qty]::-webkit-outer-spin-button,
.cart-line input[data-cart-prepack-qty]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.cart-line__edit {
    width: 26px;
    min-width: 26px;
    height: 24px;
    border: 0;
    background: none;
    color: #161616;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.68rem;
    line-height: 1;
}
.cart-line__edit:hover { color: #b24a3b; }
.cart-line__delete {
    width: 24px;
    height: 24px;
    border: 0;
    background: none;
    color: #b9b9b9;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.cart-line__delete:hover { color: #b24a3b; }
.cart-line__delete svg { width: 14px; height: 14px; stroke: currentColor; }
.cart-line__variant {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}
.cart-line__variant:first-child { margin-top: 0; }
.cart-line__variant-text { min-width: 0; }
.cart-line__variation-link {
    display: inline-flex;
    align-items: flex-start;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    background: none;
    border: 0;
    padding: 0;
    margin: 7px 0 0;
    color: #b24a3b;
    font: inherit;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.7px;
    line-height: 1.12;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}
.cart-line__variation-link svg {
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
    margin-top: -1px;
}
.cart-line__variation-text {
    min-width: 0;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.cart-line__variation-link:hover { color: #161616; }
.cart-viewall {
    display: block;
    width: 100%;
    background: none;
    border: 0;
    color: #777;
    padding: 12px 0 4px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    cursor: pointer;
    text-align: center;
}
.cart-viewall:hover { color: #161616; }
.cart-line__check {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin-right: 4px;
    cursor: pointer;
    accent-color: #161616;
}
.cart-bulkbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0 12px;
    border-bottom: 1px solid #eee;
}
.cart-bulkbar__all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: #555;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}
.cart-bulkbar__all input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #161616;
}
.cart-bulkbar__count {
    flex: 1;
    color: #888;
    font-size: 0.72rem;
}
.cart-bulkbar__remove {
    background: none;
    border: 1px solid #e3c4be;
    color: #b24a3b;
    min-height: 28px;
    padding: 0 12px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    cursor: pointer;
}
.cart-bulkbar__remove:disabled { opacity: 0.4; cursor: default; }

.checkout-rep-dialog { width:calc(100% - 32px); max-width:440px; max-height:85vh; overflow:auto; margin:auto; padding:0; border:0; background:#fff; color:#161616; text-align:left; }
.checkout-rep-dialog::backdrop { background:rgba(0,0,0,.5); }
.checkout-rep-dialog__header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 24px; border-bottom:1px solid #e8e9e4; }
.checkout-rep-dialog__header h3 { margin:0; font-size:20px; }
.checkout-rep-dialog__close { background:none; border:0; padding:4px; color:#161616; font-size:26px; line-height:1; cursor:pointer; }
.checkout-rep-dialog__body { padding:24px; }
.checkout-rep-dialog__body > p { margin:0 0 20px; line-height:1.6; }
.checkout-rep-dialog__body .form-input, .checkout-rep-dialog__body .store-form-input { width:100%; }
.checkout-rep-dialog__body [data-rep-dialog-proceed] { margin-top:20px; }
