.xcd-drawer {
    --xcd-heading: #111518;
    --xcd-ink: #1f3a5f;
    --xcd-muted: #5a6577;
    --xcd-line: #e8ebf0;
    --xcd-accent: #2c3e50;
    --xcd-accent-hover: #1f3a5f;
    --xcd-link: #2c4a6e;
    --xcd-focus: #7c4dff;
}

.xcd-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    background: rgba(17, 21, 24, 0.56);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.xcd-overlay--open {
    opacity: 1;
    pointer-events: auto;
}

.xcd-drawer {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 2147483001;
    display: flex;
    width: min(430px, 100vw);
    height: 100vh;
    height: var(--xcd-viewport-height, 100dvh);
    max-height: var(--xcd-viewport-height, 100dvh);
    flex-direction: column;
    background: #ffffff;
    color: var(--xcd-ink);
    box-shadow: -12px 0 30px rgba(17, 21, 24, 0.16);
    transform: translateX(100%);
    transition: transform 220ms ease;
}

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

.xcd-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--xcd-line);
    background: #ffffff;
}

.xcd-drawer__header h2 {
    margin: 0;
    color: var(--xcd-heading);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
}

.xcd-drawer__close {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--xcd-heading);
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

.xcd-drawer__body,
.xcd-drawer__content {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
}

.xcd-loading {
    padding: 26px 24px;
    color: var(--xcd-muted);
}

.xcd-cart-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.xcd-cart-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    padding-bottom: 20px;
}

.xcd-item-thumb {
    display: block;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border: 1px solid var(--xcd-line);
    border-radius: 4px;
    background: #ffffff;
}

.xcd-item-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    padding: 6px;
}

.xcd-item-main {
    min-width: 0;
}

.xcd-item-title {
    display: block;
    margin-bottom: 6px;
    color: var(--xcd-ink);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.xcd-item-sku,
.xcd-item-price {
    display: block;
    color: var(--xcd-muted);
    font-size: 13px;
}

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

.xcd-qty {
    position: relative;
    display: inline-block;
    overflow: visible;
    width: 130px;
    min-width: 130px;
    height: 55px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.xcd-qty__btn,
.xcd-qty__input {
    height: inherit !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #31465f !important;
    text-align: center;
    font-weight: 500 !important;
    line-height: 1;
    box-shadow: none !important;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.xcd-qty__btn {
    position: absolute;
    top: calc(50% - 55px / 3.6);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(55px / 1.8);
    height: calc(55px / 1.8) !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.12s ease;
}

.xcd-qty__minus {
    left: 9%;
}

.xcd-qty__plus {
    right: 9%;
}

.xcd-qty__btn:hover {
    background: transparent !important;
    color: var(--xcd-ink);
}

.xcd-qty__input {
    position: absolute;
    inset: 0;
    width: 100% !important;
    max-width: none;
    padding: 0 calc(55px / 1.8 + 9%) !important;
    border: 1px solid var(--xcd-line) !important;
    background: transparent;
    font-size: 0.9em;
    -moz-appearance: textfield;
}

.xcd-qty__input::-webkit-inner-spin-button,
.xcd-qty__input::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.xcd-remove,
.xcd-secondary-link {
    border: 0;
    background: transparent;
    color: var(--xcd-link);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.xcd-line-total {
    grid-column: 2;
    color: var(--xcd-ink);
    font-weight: 800;
}

.xcd-drawer-footer {
    flex: 0 0 auto;
    padding: 18px 24px max(26px, calc(18px + env(safe-area-inset-bottom)));
    border-top: 1px solid var(--xcd-line);
    background: #ffffff;
}

.xcd-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    color: var(--xcd-ink);
    font-size: 18px;
}

.xcd-primary-cta,
.xcd-secondary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 4px;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.xcd-primary-cta {
    width: 100%;
    background: var(--xcd-accent);
    color: #ffffff !important;
}

.xcd-primary-cta:hover {
    background: var(--xcd-accent-hover);
}

.xcd-secondary-link {
    display: block;
    margin-top: 14px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}

.xcd-secondary-cta {
    margin-top: 18px;
    padding: 0 22px;
    border: 1px solid var(--xcd-line);
    background: #ffffff;
    color: var(--xcd-link);
}

.xcd-secondary-cta:hover {
    border-color: #cbd5e1;
    color: var(--xcd-accent-hover);
}

.added_to_cart.wc-forward {
    display: none !important;
}

.xcd-drawer__close:focus-visible,
.xcd-qty__btn:focus-visible,
.xcd-qty__input:focus-visible,
.xcd-remove:focus-visible,
.xcd-secondary-link:focus-visible,
.xcd-primary-cta:focus-visible,
.xcd-secondary-cta:focus-visible {
    outline: 2px solid var(--xcd-focus);
    outline-offset: 2px;
}

.xcd-empty {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding: 48px 24px;
    color: var(--xcd-muted);
    text-align: center;
}

.xcd-empty p {
    margin: 0 0 8px;
    color: var(--xcd-ink);
    font-weight: 700;
}

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

@media (max-width: 640px) {
    .xcd-drawer__header {
        position: sticky;
        top: 0;
        z-index: 2;
        min-height: 52px;
        padding-top: max(10px, env(safe-area-inset-top));
        padding-bottom: 10px;
    }

    .xcd-cart-list,
    .xcd-drawer-footer {
        padding-right: 18px;
        padding-left: 18px;
    }

    .xcd-drawer__close {
        align-self: flex-start;
        margin-top: -2px;
    }
}
