body.jrc-drawer-open {
    overflow: hidden;
}

.jrtc-drawer,
.jrtc-drawer * {
    box-sizing: border-box;
}

.jrtc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 10, 8, 0.44);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 9998;
    backdrop-filter: blur(2px);
}

.jrtc-cart-toggle {
    position: fixed;
    right: 16px;
    bottom: 84px;
    z-index: 9997;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border: 1px solid #d8d8d8;
    border-radius: 10px;
    background: #ffffff;
    color: #111111;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.jrtc-cart-toggle:hover {
    background: #ef3f39;
    border-color: #ef3f39;
    color: #ffffff;
}

.jrtc-toggle-count {
    position: absolute;
    top: -8px;
    left: -8px;
    min-width: 30px;
    height: 30px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ff1f1f;
    color: #ffffff;
    font-size: .95rem;
    font-weight: 800;
    border: 2px solid #ffffff;
    line-height: 1;
}

.jrtc-cart-toggle-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.jrtc-cart-toggle-icon svg {
    width: 30px;
    height: 30px;
    display: block;
    fill: currentColor;
}

body.jrc-drawer-open .jrtc-overlay {
    opacity: 1;
    visibility: visible;
}

.jrtc-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(430px, 100vw);
    height: 100vh;
    background: #fffdfa;
    color: #211f1c;
    box-shadow: -18px 0 48px rgba(22, 18, 13, 0.24);
    transform: translateX(100%);
    transition: transform .24s ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    font-family: inherit;
    overflow: hidden;
}

.jrtc-drawer.is-open {
    transform: translateX(0);
}

.jrtc-header,
.jrtc-footer {
    padding: 18px 20px;
    border-color: #ece7df;
}

.jrtc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #ece7df;
    background: #fffdfa;
}

.jrtc-header h2 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.15;
    font-weight: 750;
    letter-spacing: 0;
}

.jrtc-body {
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 14px 16px 18px;
    flex: 1;
    background: #faf7f2;
    min-height: 0;
}

.jrtc-footer {
    border-top: 1px solid #ece7df;
    background: #fffdfa;
    box-shadow: 0 -10px 22px rgba(22, 18, 13, 0.07);
}

.jrtc-close-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #231f1b;
    color: #fff;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

.jrtc-close-btn:hover,
.jrtc-close-btn:focus {
    background: #ef3f39;
    color: #fff;
}

.jrtc-rewards-module {
    padding: 12px;
    margin: 0 0 12px;
    background: #fff;
    border: 1px solid #ece7df;
    border-radius: 8px;
}

.jrtc-progress-text {
    font-size: .86rem;
    line-height: 1.35;
    color: #514b43;
    margin-bottom: 8px;
}

.jrtc-success-text {
    color: #166534;
    font-weight: 700;
}

.jrtc-progress-container {
    height: 7px;
    overflow: hidden;
    background: #efe7dc;
    border-radius: 999px;
}

.jrtc-progress-bar {
    height: 100%;
    background: #ef3f39;
    border-radius: inherit;
}

.jrtc-items-list {
    display: grid;
    gap: 10px;
}

.jrtc-item {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    background: #fff;
    border: 1px solid #ece7df;
    border-radius: 8px;
}

.jrtc-item-image,
.jrtc-item-image a {
    display: block;
    width: 86px;
}

.jrtc-item-image img {
    display: block;
    width: 86px;
    height: 86px;
    max-width: 86px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee5da;
    background: #f8f3ec;
}

.jrtc-item-details {
    min-width: 0;
}

.jrtc-item-title,
.jrtc-item-title a {
    color: #211f1c;
    font-size: .94rem;
    line-height: 1.28;
    font-weight: 650;
    text-decoration: none;
}

.jrtc-item-title a:hover {
    color: #ef3f39;
}

.jrtc-item-meta {
    margin-top: 5px;
    color: #686057;
    font-size: .82rem;
    line-height: 1.35;
}

.jrtc-item-meta dl,
.jrtc-item-meta p {
    margin: 0;
}

.jrtc-item-price {
    margin-top: 6px;
    color: #211f1c;
    font-size: .92rem;
    font-weight: 700;
}

.jrtc-item-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 10px;
    row-gap: 8px;
}

.jrtc-item-actions .jrtc-qty-controls {
    margin-right: 4px;
}

.jrtc-item-actions .jrc-save-item,
.jrtc-item-actions .jrtc-remove-item,
.jrtc-item-actions .jrc-action-link {
    margin: 0;
}

.jrtc-saved-actions {
    margin-top: 8px;
}

.jrtc-saved-actions .jrc-restore-item {
    margin-right: 10px;
}

.jrtc-item-actions .jrc-save-item + .jrtc-remove-item,
.jrtc-item-actions .jrtc-remove-item + .jrc-save-item {
    margin-left: 2px;
}

.jrtc-item-actions {
    margin-top: 10px;
}

.jrtc-qty-controls {
    display: inline-grid;
    grid-template-columns: 30px 42px 30px;
    height: 32px;
    border: 1px solid #d9d2c9;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.jrtc-qty-change,
.jrtc-qty-input {
    min-width: 0;
    height: 32px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #211f1c;
    font-size: .92rem;
    line-height: 1;
    text-align: center;
    padding: 0;
}

.jrtc-qty-change {
    cursor: pointer;
    font-weight: 750;
}

.jrtc-qty-change:hover {
    background: #f4eee6;
}

.jrtc-qty-input {
    border-left: 1px solid #d9d2c9;
    border-right: 1px solid #d9d2c9;
    appearance: textfield;
}

.jrtc-qty-input::-webkit-outer-spin-button,
.jrtc-qty-input::-webkit-inner-spin-button {
    appearance: none;
    margin: 0;
}

.jrtc-remove-item,
.jrc-action-link,
.jrc-save-item,
.jrc-restore-item,
.jrc-remove-saved-item {
    width: auto;
    min-height: 24px;
    padding: 2px 6px;
    border: 0;
    background: transparent;
    color: #746b60;
    border-radius: 4px;
    font-size: .82rem;
    line-height: 1.2;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: color .15s ease, background-color .15s ease, opacity .15s ease;
}

.jrtc-remove-item:hover,
.jrc-action-link:hover,
.jrc-save-item:hover,
.jrc-restore-item:hover,
.jrc-remove-saved-item:hover {
    color: #ffffff;
    background: #ef3f39;
    text-decoration: none;
}

.jrtc-remove-item:disabled,
.jrc-action-link:disabled,
.jrc-save-item:disabled,
.jrc-restore-item:disabled,
.jrc-remove-saved-item:disabled {
    opacity: .6;
    cursor: wait;
}

.jrtc-remove-item.is-loading,
.jrc-action-link.is-loading,
.jrc-save-item.is-loading,
.jrc-restore-item.is-loading,
.jrc-remove-saved-item.is-loading {
    position: relative;
    opacity: .72;
}

.jrtc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: #514b43;
    font-size: .95rem;
}

.jrtc-summary-row strong {
    color: #211f1c;
    font-size: 1.05rem;
}

.jrtc-actions {
    display: grid;
    gap: 10px;
}

.jrtc-actions .button,
.jrtc-btn-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 11px 14px;
    border-radius: 7px;
    border: 1px solid #231f1b;
    background: #231f1b;
    color: #fff;
    font-size: .94rem;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

.jrtc-btn-secondary {
    background: #ffffff;
    color: #231f1b;
    border-color: #d7d1c8;
}

.jrtc-btn-secondary:hover {
    background: #ef3f39;
    border-color: #ef3f39;
    color: #ffffff;
}

.jrtc-actions .button:hover,
.jrtc-btn-primary:hover {
    background: #ef3f39;
    border-color: #ef3f39;
    color: #fff;
}

.jrtc-empty-state {
    min-height: 48vh;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 28px 18px;
    text-align: center;
    color: #514b43;
}

.jrtc-empty-actions {
    width: 100%;
    max-width: 280px;
}

.jrtc-empty-actions .jrtc-close-btn {
    width: 100%;
    min-height: 42px;
    height: auto;
    white-space: normal;
    line-height: 1.2;
    padding: 10px 14px;
    justify-content: center;
    text-align: center;
    font-size: .95rem;
}

.jrtc-empty-icon {
    color: #a0968b;
}

.jrtc-empty-title {
    margin: 0;
    color: #211f1c;
    font-weight: 750;
    font-size: 1rem;
}

.jrtc-empty-message {
    margin: 0;
    max-width: 260px;
    font-size: .9rem;
    line-height: 1.4;
}

.jrtc-saved-items {
    margin-top: 18px;
}

.jrtc-saved-title {
    margin: 0 0 10px;
    font-size: .92rem;
    color: #514b43;
    text-transform: uppercase;
    letter-spacing: 0;
}

.jrtc-saved-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

@media (max-width: 420px) {
    .jrtc-header,
    .jrtc-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .jrtc-body {
        padding-left: 12px;
        padding-right: 12px;
    }

    .jrtc-item {
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .jrtc-item-image,
    .jrtc-item-image a,
    .jrtc-item-image img {
        width: 74px;
        height: 74px;
        max-width: 74px;
    }

    .jrtc-cart-toggle {
        right: 12px;
        bottom: 74px;
    }

    .jrtc-item-actions {
        align-items: flex-start;
        row-gap: 7px;
    }

    .jrtc-item-actions .jrc-save-item + .jrtc-remove-item,
    .jrtc-item-actions .jrtc-remove-item + .jrc-save-item {
        margin-left: 0;
    }
}
