@media (max-width: 868px) {
  .stw-cart-route .store-header,
  .stw-checkout-route .store-header,
  .stw-cart-route .store-mobile-nav,
  .stw-checkout-route .store-mobile-nav,
  .stw-cart-route .store-footer,
  .stw-checkout-route .store-footer {
    display: none !important;
  }

  body.stw-cart-route, body.stw-checkout-route {
    background: #f3f5f7;
  }

  .cart-wrapper {
    width: 100% !important;
    max-width: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 8px 0 76px !important;
  }

  .cart-steps {
    min-height: 20px;
    margin: 0 12px 6px !important;
    gap: 5px;
    font-size: 10.5px !important;
    white-space: nowrap;
  }

  .stw-cart-route .cart-steps {
    display: none !important;
  }

  .cart-mobile-header {
    position: relative;
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 0 82px 0 48px;
    border-bottom: 1px solid #e6ebf0;
    background: #fff;
  }

  .cart-mobile-header h1 {
    overflow: hidden;
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 850;
    line-height: 22px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .cart-mobile-back {
    position: absolute;
    left: 8px;
    width: 44px;
    height: 44px;
    color: #0f172a;
    font-size: 36px;
    line-height: 39px;
    text-align: center;
    text-decoration: none;
  }

  .cart-mobile-edit {
    position: absolute;
    right: 8px;
    min-width: 72px;
    height: 44px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
  }

  .cart-card,
  .checkout-card {
    width: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .cart-card {
    padding: 0 12px !important;
  }

  .checkout-card {
    padding: 13px 12px !important;
  }

  .cart-card-title {
    display: flex;
    min-height: 36px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 !important;
    border-bottom: 1px solid #e8edf2;
    line-height: 1.2;
  }

  .cart-card-title__heading {
    display: block;
    overflow: hidden;
    font-size: 13.5px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .cart-card-title__note {
    display: block;
    flex: 0 0 auto;
    color: var(--green);
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
  }

  .stw-cart-route .cart-card-title {
    display: none !important;
  }

  .cart-grid {
    gap: 8px !important;
  }

  .cart-item {
    display: grid !important;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 9px !important;
    min-height: 100px;
    align-items: start !important;
    padding: 10px 0 !important;
    border-bottom-color: #e8edf2 !important;
  }

  .stw-cart-route .cart-item {
    grid-template-columns: 28px 80px minmax(0, 1fr);
    gap: 8px !important;
  }

  .cart-item-select {
    display: flex;
    width: 28px;
    height: 80px;
    align-items: center;
    justify-content: center;
  }

  .cart-item-select input,
  .cart-select-all input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }

  .cart-item-checkmark,
  .cart-select-all__mark {
    display: grid;
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    place-items: center;
    border: 1.5px solid #a8b3bf;
    border-radius: 50%;
    background: #fff;
    color: transparent;
    font-size: 13px;
    font-weight: 850;
  }

  .cart-item-select input:checked + .cart-item-checkmark,
  .cart-select-all input:checked + .cart-select-all__mark {
    border-color: #ec1838;
    background: #ec1838;
    color: #fff;
  }

  .stw-cart-route:not(.cart-editing) .btn-remove-comem {
    display: none !important;
  }

  .stw-cart-route:not(.cart-editing) .cart-item-row-top {
    padding-right: 0;
  }

  .cart-item:last-child {
    padding-bottom: 10px !important;
  }

  .cart-item-thumb-box {
    width: 80px !important;
    height: 80px !important;
    padding: 2px !important;
    border-color: #e3e9ef !important;
    border-radius: 7px !important;
    background: #fff !important;
  }

  .cart-item-content {
    min-width: 0;
    gap: 5px !important;
  }

  .cart-item-row-top {
    position: relative;
    min-height: 38px;
    padding-right: 30px;
    gap: 4px !important;
  }

  .cart-item-title {
    display: -webkit-box;
    overflow: hidden;
    color: #172b43 !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    line-height: 18px !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .btn-remove-comem {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 44px;
    height: 44px;
    justify-content: center;
    padding: 0 !important;
    color: #8797a8 !important;
    font-size: 0 !important;
  }

  .btn-remove-comem svg {
    width: 16px;
    height: 16px;
  }

  .cart-item-row-bottom {
    min-width: 0;
    flex-direction: row-reverse;
    flex-wrap: nowrap !important;
    align-items: end !important;
    justify-content: space-between !important;
    gap: 6px !important;
  }

  .cart-item-pricing {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-start;
    gap: 4px !important;
    text-align: left !important;
    white-space: nowrap;
  }

  .cart-item-sale-price {
    order: 1;
    color: #ec1838 !important;
    font-size: 16px !important;
    line-height: 20px;
  }

  .cart-item-reg-price {
    order: 2;
    overflow: hidden;
    max-width: 74px;
    font-size: 10.5px !important;
    line-height: 18px;
    text-overflow: ellipsis;
  }

  .cart-item-discount {
    order: 3;
    min-height: 18px;
    padding-inline: 4px;
    font-size: 9.5px;
  }

  .qty-pill-stepper {
    width: 118px;
    height: 44px !important;
    flex: 0 0 118px;
    justify-content: space-between;
    overflow: hidden;
    padding: 0 !important;
    border-color: #d9e2ea !important;
    border-radius: 5px !important;
    background: #f7f8fa !important;
  }

  .qty-pill-stepper .qty-btn {
    width: 44px !important;
    height: 44px !important;
    border-radius: 0 !important;
    font-size: 16px !important;
  }

  .qty-pill-stepper .qty-input {
    width: 28px !important;
    height: 32px !important;
    font-size: 12.5px !important;
  }

  .checkout-title {
    margin-bottom: 7px !important;
    font-size: 14px !important;
  }

  .cart-next-copy {
    margin-bottom: 9px !important;
    font-size: 11.5px !important;
    line-height: 1.4 !important;
  }

  .comem-summary-box {
    margin-top: 8px !important;
    padding: 10px 0 !important;
    border: 0 !important;
    border-top: 1px solid #e4eaf0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .btn-checkout-now {
    margin-top: 9px !important;
  }

  .stw-cart-route .cart-wrapper {
    padding-top: 0 !important;
    padding-bottom: 88px !important;
  }

  .stw-cart-route .checkout-card {
    position: fixed !important;
    z-index: 68;
    top: auto !important;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) minmax(142px, 42%);
    gap: 8px;
    align-items: center;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom, 0px)) !important;
    border-top: 1px solid #dbe4ec !important;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -4px 16px rgba(16, 52, 82, 0.1) !important;
    backdrop-filter: blur(8px);
  }

  .cart-select-all {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
  }

  .cart-select-all small {
    color: #64748b;
    font-size: 9px;
    font-weight: 650;
    line-height: 11px;
  }

  .stw-cart-route .checkout-title,
  .stw-cart-route .cart-next-copy,
  .stw-cart-route .comem-summary-box > .sum-row:nth-child(1),
  .stw-cart-route .comem-summary-box > .sum-row:nth-child(2),
  .stw-cart-route .comem-summary-box > .sum-row:nth-child(3),
  .stw-cart-route #savingText {
    display: none !important;
  }

  .stw-cart-route .comem-summary-box {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  .stw-cart-route .comem-summary-box > .sum-row {
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 10px !important;
    line-height: 1.2;
  }

  .stw-cart-route .comem-summary-box > .sum-row.total {
    display: block !important;
  }

  .stw-cart-route .comem-summary-box > .sum-row.total > span:first-child {
    display: block;
    color: #637b91 !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1.2;
  }

  .stw-cart-route #shippingText {
    font-size: 10px;
  }

  .stw-cart-route #grandTotalText {
    overflow: hidden;
    max-width: 100%;
    color: #ec1838 !important;
    font-size: 18px !important;
    line-height: 23px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stw-cart-route .checkout-card > .btn-checkout-now {
    height: 46px !important;
    flex-direction: row;
    margin: 0 !important;
    border-radius: 23px !important;
    font-size: 12px !important;
    text-align: center;
  }

  .cart-checkout-label {
    font-size: 13px;
    font-weight: 850;
    line-height: 16px;
    white-space: nowrap;
  }

  .stw-cart-route .btn-checkout-now.is-disabled {
    background: #cbd5e1 !important;
    color: #64748b !important;
    pointer-events: auto;
  }

  .stw-checkout-route .cart-wrapper {
    padding-top: 0 !important;
    padding-bottom: 80px !important;
  }

  .stw-checkout-route .cart-steps {
    display: none !important;
  }

  .checkout-mobile-header {
    position: relative;
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 0 48px;
    border-bottom: 1px solid #e6ebf0;
    background: #fff;
  }

  .checkout-mobile-header h1 {
    margin: 0;
    color: #0f172a;
    font-size: 17px;
    font-weight: 850;
    line-height: 22px;
  }

  .checkout-mobile-back {
    position: absolute;
    left: 8px;
    width: 44px;
    height: 44px;
    color: #0f172a;
    font-size: 36px;
    font-weight: 400;
    line-height: 39px;
    text-align: center;
    text-decoration: none;
  }

  .stw-checkout-route .cart-grid {
    display: flex !important;
    flex-direction: column;
    gap: 0 !important;
  }

  .stw-checkout-route .checkout-card {
    display: contents !important;
  }

  .stw-checkout-route .checkout-address-title {
    display: none !important;
  }

  .stw-checkout-route .checkout-address-trigger {
    order: 1;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 20px;
    gap: 8px;
    width: calc(100% - 24px);
    min-height: 72px;
    box-sizing: border-box;
    align-items: center;
    align-self: stretch;
    margin: 8px 12px 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    text-align: left;
    box-shadow: 0 1px 0 #e6ebf0;
  }

  .checkout-address-trigger__icon {
    display: grid;
    width: 34px;
    height: 44px;
    place-items: center;
    color: #0f3892;
  }

  .checkout-address-trigger__icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .checkout-address-trigger.is-empty .checkout-address-trigger__icon {
    color: #0066e7;
  }

  .checkout-address-trigger__copy {
    min-width: 0;
  }

  .checkout-address-trigger__copy strong,
  .checkout-address-trigger__copy small {
    display: block;
  }

  .checkout-address-trigger__copy strong {
    font-size: 14px;
    font-weight: 850;
    line-height: 18px;
  }

  .checkout-address-trigger__copy small {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 3px;
    color: #64748b;
    font-size: 10.5px;
    line-height: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .checkout-address-trigger__arrow {
    color: #8190a0;
    font-size: 24px;
    line-height: 24px;
  }

  .stw-checkout-route .checkout-address-sheet {
    position: fixed;
    z-index: 120;
    inset: 0;
    display: none;
  }

  .stw-checkout-route .checkout-address-sheet.is-open {
    display: block;
  }

  .checkout-address-sheet__backdrop {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(15, 23, 42, 0.48);
  }

  .checkout-address-sheet__panel {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    max-height: calc(100dvh - 70px);
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    background: #fff;
    box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.18);
  }

  .checkout-address-sheet__head {
    position: relative;
    display: flex;
    min-height: 58px;
    flex: 0 0 58px;
    align-items: center;
    justify-content: center;
    padding: 0 54px;
    border-bottom: 1px solid #edf0f3;
  }

  .checkout-address-sheet__head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 850;
  }

  .checkout-address-sheet__close {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #0f172a;
    font-size: 30px;
    line-height: 40px;
  }

  .checkout-address-sheet__body {
    display: block;
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 14px 18px;
  }

  .stw-checkout-route .checkout-address-sheet .checkout-fields {
    display: grid;
    order: initial;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    border: 0;
    background: #fff;
  }

  .checkout-address-sheet__footer {
    display: block;
    flex: 0 0 auto;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e6ebf0;
    background: #fff;
  }

  .checkout-address-save {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 24px;
    background: linear-gradient(135deg, #0f3892 0%, #0066e7 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 850;
  }

  body.checkout-address-open {
    overflow: hidden;
  }

  .stw-checkout-route .checkout-products-card {
    order: 3 !important;
    margin-top: 8px;
    border-top: 1px solid #e6ebf0 !important;
    border-bottom: 1px solid #e6ebf0 !important;
    background: #fff;
  }

  .stw-checkout-route .checkout-products-card .cart-card-title {
    min-height: 42px;
  }

  .stw-checkout-route .checkout-order-summary {
    order: 4;
    width: 100%;
    box-sizing: border-box;
    align-self: stretch;
    margin: 8px 0 0 !important;
    padding: 13px 12px !important;
    border: 0 !important;
    border-top: 1px solid #e6ebf0 !important;
    border-bottom: 1px solid #e6ebf0 !important;
    background: #fff !important;
  }

  .stw-checkout-route .checkout-feedback {
    order: 6;
    margin: 8px 12px 0;
  }

  .stw-checkout-route .checkout-payment-method {
    order: 5;
    width: 100%;
    box-sizing: border-box;
    margin: 8px 0 0;
    padding: 14px 12px;
    border: 0;
    border-top: 1px solid #e6ebf0;
    border-bottom: 1px solid #e6ebf0;
    border-radius: 0;
  }

  .stw-checkout-route .checkout-payment-method h2 {
    margin-bottom: 9px;
    font-size: 15px;
  }

  .stw-checkout-route .checkout-payment-method__option {
    min-height: 42px;
  }

  .stw-checkout-route #btnSubmitOrder {
    display: none !important;
  }

  .mobile-checkout-bar {
    position: fixed;
    z-index: 68;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(154px, 46%);
    gap: 9px;
    align-items: center;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #dbe4ec;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -4px 16px rgba(16, 52, 82, 0.1);
    backdrop-filter: blur(8px);
  }

  .mobile-checkout-total {
    min-width: 0;
  }

  .mobile-checkout-total span,
  .mobile-checkout-total strong {
    display: block;
  }

  .mobile-checkout-total span {
    color: #637b91;
    font-size: 10px;
    line-height: 1.2;
  }

  .mobile-checkout-total strong {
    overflow: hidden;
    margin-top: 2px;
    color: #ec1838;
    font-size: 18px;
    line-height: 23px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-checkout-submit {
    height: 46px;
    border: 0;
    border-radius: 23px;
    background: linear-gradient(135deg, #0f3892 0%, #0066e7 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
  }

  .mobile-checkout-submit:disabled {
    background: #cbd5e1;
    color: #64748b;
  }

  .stw-cart-route .cart-recommendations {
    margin: 8px 0 0;
    padding: 13px 8px 16px;
    border: 0;
    border-top: 1px solid #e6ebf0;
    border-radius: 0;
    background: #fff;
  }

  .stw-cart-route .cart-recommendations h2 {
    margin: 0 4px 10px;
    font-size: 16px;
    line-height: 21px;
  }

  .stw-cart-route .cart-recommendations__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .stw-cart-route .cart-recommendation {
    border-radius: 9px;
  }

  .stw-cart-route .cart-recommendation__image {
    aspect-ratio: 1.1 / 1;
  }

  .stw-cart-route .cart-recommendation__body {
    padding: 8px 8px 9px;
  }

  .stw-cart-route .cart-recommendation__body > strong {
    min-height: 34px;
    font-size: 11.5px;
    line-height: 17px;
  }

  .stw-cart-route .cart-recommendation__price {
    margin-top: 5px;
    font-size: 15px;
  }

  .stw-checkout-route .section-title {
    min-height: 23px;
    margin-bottom: 12px !important;
    font-size: 15px !important;
  }
}

@media (max-width: 380px) {
  .cart-card,
  .checkout-card {
    padding-inline: 10px !important;
  }

  .cart-item {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 8px !important;
  }

  .stw-cart-route .cart-item {
    grid-template-columns: 26px 76px minmax(0, 1fr);
    gap: 7px !important;
  }

  .cart-item-thumb-box {
    width: 76px !important;
    height: 76px !important;
  }

  .cart-item-reg-price {
    display: none;
  }

  .cart-card-title__note {
    font-size: 9px;
  }
}

@media (max-width: 768px) {
  .cart-wrapper--cart,
  .cart-wrapper--checkout {
    min-height: 0 !important;
  }

  body.stw-checkout-route,
  .stw-checkout-route .cart-wrapper,
  .stw-checkout-route .cart-grid {
    background: #fff;
  }

  .checkout-field-error {
    display: block;
    margin: 5px 0 0;
    color: #c6283d;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.35;
  }

  .stw-checkout-route [aria-invalid="true"] {
    border-color: #c6283d !important;
    box-shadow: 0 0 0 3px rgba(198, 40, 61, 0.1) !important;
  }
}

/* Reserve a badge row, preserving the full product artwork below it. */
@media(max-width:720px){
 .stw-cart-route .cart-recommendation__image{display:block;aspect-ratio:auto;padding-top:32px;box-sizing:border-box}
 .stw-cart-route .cart-recommendation__image img{display:block;width:100%;height:auto;aspect-ratio:1.1 / 1;object-fit:contain}
 .stw-cart-route .cart-recommendation__image em{font-size:11px;font-weight:600;line-height:1.3}
}
