#tmc-cart-root {
    --tmc-cart-bg: #ffffff;
    --tmc-cart-panel: #ffffff;
    --tmc-cart-text: #151515;
    --tmc-cart-muted: #737373;
    --tmc-cart-line: #e9e9e9;
    --tmc-cart-accent: #18a34a;
    --tmc-cart-accent-hover: #12803a;
    --tmc-cart-danger: #d70000;
    --tmc-cart-danger-hover: #b90000;
    --tmc-cart-dark: #111111;
    --tmc-cart-dark-hover: #222222;
    --tmc-cart-soft: #f6f6f6;
    --tmc-cart-soft-hover: #ececec;
    --tmc-cart-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    --tmc-cart-radius-lg: 24px;
    --tmc-cart-radius-md: 16px;
    --tmc-cart-radius-sm: 12px;
    --tmc-cart-font: Arial, sans-serif;
    --tmc-cart-z-overlay: 99990;
    --tmc-cart-z-drawer: 99991;
    --tmc-cart-z-floating: 99989;
}

#tmc-cart-root,
#tmc-cart-root *,
#tmc-cart-root *::before,
#tmc-cart-root *::after {
    box-sizing: border-box;
}

#tmc-cart-root {
    font-family: var(--tmc-cart-font);
    line-height: 1.4;
    color: var(--tmc-cart-text);
}

#tmc-cart-root .tmc-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: var(--tmc-cart-z-overlay);
    backdrop-filter: blur(2px);
}

#tmc-cart-root .tmc-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(480px, 100%);
    height: 100dvh;
    background: var(--tmc-cart-panel);
    box-shadow: var(--tmc-cart-shadow);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: var(--tmc-cart-z-drawer);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#tmc-cart-root.tmc-cart-opened .tmc-cart-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#tmc-cart-root.tmc-cart-opened .tmc-cart-drawer {
    transform: translateX(0);
}

#tmc-cart-root .tmc-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 24px 24px 18px;
    border-bottom: 1px solid var(--tmc-cart-line);
    background: var(--tmc-cart-panel);
    flex: 0 0 auto;
}

#tmc-cart-root .tmc-cart-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

#tmc-cart-root .tmc-cart-title {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--tmc-cart-text);
}

#tmc-cart-root .tmc-cart-badge {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--tmc-cart-dark);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

#tmc-cart-root .tmc-cart-close {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--tmc-cart-soft);
    color: var(--tmc-cart-dark);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    flex: 0 0 auto;
}

#tmc-cart-root .tmc-cart-close:hover {
    background: var(--tmc-cart-soft-hover);
    transform: scale(1.02);
}

#tmc-cart-root .tmc-cart-close:focus {
    outline: none;
}

#tmc-cart-root .tmc-cart-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    background: var(--tmc-cart-panel);
}

#tmc-cart-root .tmc-cart-items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 24px;
    background: var(--tmc-cart-panel);
}

#tmc-cart-root .tmc-cart-item {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--tmc-cart-line);
}

#tmc-cart-root .tmc-cart-item:last-child {
    border-bottom: 1px solid var(--tmc-cart-line);
}

#tmc-cart-root .tmc-cart-item-left {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

#tmc-cart-root .tmc-cart-item-image-wrap,
#tmc-cart-root .tmc-cart-item-image-placeholder {
    width: 84px;
    height: 84px;
    border-radius: 18px;
    overflow: hidden;
    background: #f3f3f3;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tmc-cart-root .tmc-cart-item-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#tmc-cart-root .tmc-cart-item-image-placeholder {
    font-size: 28px;
}

#tmc-cart-root .tmc-cart-item-main {
    min-width: 0;
}

#tmc-cart-root .tmc-cart-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

#tmc-cart-root .tmc-cart-item-title {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.15;
    font-weight: 800;
    color: var(--tmc-cart-text);
    word-break: break-word;
}

#tmc-cart-root .tmc-cart-item-price {
    font-size: 15px;
    line-height: 1.3;
    color: var(--tmc-cart-muted);
}

#tmc-cart-root .tmc-cart-item-remove {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--tmc-cart-danger);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
    transition: background 0.2s ease, transform 0.2s ease;
}

#tmc-cart-root .tmc-cart-item-remove:hover {
    background: var(--tmc-cart-danger-hover);
    transform: scale(1.03);
}

#tmc-cart-root .tmc-cart-item-remove:focus {
    outline: none;
}

#tmc-cart-root .tmc-cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
}

#tmc-cart-root .tmc-cart-qty {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#tmc-cart-root .tmc-cart-qty-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 2px solid #222;
    background: #fff;
    color: #111;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

#tmc-cart-root .tmc-cart-qty-btn:hover {
    background: #f7f7f7;
    transform: scale(1.03);
}

#tmc-cart-root .tmc-cart-qty-btn:focus {
    outline: none;
}

#tmc-cart-root .tmc-cart-qty-value {
    min-width: 20px;
    text-align: center;
    font-size: 24px;
    line-height: 1;
    font-weight: 500;
    color: var(--tmc-cart-text);
}

#tmc-cart-root .tmc-cart-item-sum {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 600;
    color: var(--tmc-cart-text);
    white-space: nowrap;
}

#tmc-cart-root .tmc-cart-summary {
    padding: 16px 24px 10px;
    border-top: 1px solid var(--tmc-cart-line);
    background: var(--tmc-cart-panel);
    flex: 0 0 auto;
}

#tmc-cart-root .tmc-cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 20px;
    line-height: 1.2;
    color: var(--tmc-cart-text);
}

#tmc-cart-root .tmc-cart-summary-row strong {
    font-size: 32px;
    line-height: 1;
    font-weight: 800;
    color: var(--tmc-cart-text);
}

#tmc-cart-root .tmc-cart-form {
    padding: 18px 24px 24px;
    border-top: 1px solid var(--tmc-cart-line);
    background: var(--tmc-cart-panel);
    flex: 0 0 auto;
}

#tmc-cart-root .tmc-cart-form-title {
    margin: 0 0 14px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--tmc-cart-text);
}

#tmc-cart-root .tmc-cart-input {
    display: block;
    width: 100%;
    height: 52px;
    margin: 0 0 12px;
    padding: 0 16px;
    border: 1px solid #d7d7d7;
    border-radius: 14px;
    background: #fff;
    color: var(--tmc-cart-text);
    font-size: 17px;
    line-height: 1;
    font-family: inherit;
    outline: none;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
}

#tmc-cart-root .tmc-cart-input::placeholder {
    color: #999999;
    opacity: 1;
}

#tmc-cart-root .tmc-cart-input:focus {
    border-color: #222;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

#tmc-cart-root .tmc-cart-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    background: var(--tmc-cart-accent);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    text-align: center;
    appearance: none;
}

#tmc-cart-root .tmc-cart-submit:hover {
    background: var(--tmc-cart-accent-hover);
    transform: translateY(-1px);
}

#tmc-cart-root .tmc-cart-submit:focus {
    outline: none;
}

#tmc-cart-root .tmc-cart-submit:disabled {
    opacity: 0.72;
    cursor: default;
    transform: none;
}

#tmc-cart-root .tmc-cart-note {
    min-height: 22px;
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.4;
}

#tmc-cart-root .tmc-cart-note-error {
    color: #c62828;
}

#tmc-cart-root .tmc-cart-note-success {
    color: #198c3c;
}

#tmc-cart-root .tmc-cart-empty {
    text-align: center;
    padding: 56px 20px;
}

#tmc-cart-root .tmc-cart-empty-icon {
    font-size: 42px;
    line-height: 1;
    margin-bottom: 12px;
}

#tmc-cart-root .tmc-cart-empty-title {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--tmc-cart-text);
}

#tmc-cart-root .tmc-cart-empty-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    color: var(--tmc-cart-muted);
}

#tmc-cart-root .tmc-cart-floating {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 58px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--tmc-cart-dark);
    color: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    z-index: var(--tmc-cart-z-floating);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, transform 0.2s ease;
    appearance: none;
}

#tmc-cart-root .tmc-cart-floating:hover {
    background: var(--tmc-cart-dark-hover);
    transform: translateY(-1px);
}

#tmc-cart-root .tmc-cart-floating:focus {
    outline: none;
}

#tmc-cart-root .tmc-cart-floating-icon {
    font-size: 20px;
    line-height: 1;
}

#tmc-cart-root .tmc-cart-floating-count {
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fff;
    color: #111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    font-weight: 800;
}

@media (max-width: 640px) {
    #tmc-cart-root .tmc-cart-drawer {
        width: 100%;
    }

    #tmc-cart-root .tmc-cart-header {
        padding: 20px 16px 16px;
    }

    #tmc-cart-root .tmc-cart-items {
        padding: 16px;
    }

    #tmc-cart-root .tmc-cart-summary {
        padding: 16px;
    }

    #tmc-cart-root .tmc-cart-form {
        padding: 16px 16px 20px;
    }

    #tmc-cart-root .tmc-cart-item {
        grid-template-columns: 70px 1fr;
        gap: 12px;
        padding: 16px 0;
    }

    #tmc-cart-root .tmc-cart-item-image-wrap,
    #tmc-cart-root .tmc-cart-item-image-placeholder {
        width: 70px;
        height: 70px;
        border-radius: 14px;
    }

    #tmc-cart-root .tmc-cart-item-title {
        font-size: 16px;
    }

    #tmc-cart-root .tmc-cart-item-price {
        font-size: 14px;
    }

    #tmc-cart-root .tmc-cart-item-sum {
        font-size: 17px;
    }

    #tmc-cart-root .tmc-cart-summary-row {
        font-size: 18px;
    }

    #tmc-cart-root .tmc-cart-summary-row strong {
        font-size: 28px;
    }

    #tmc-cart-root .tmc-cart-input {
        height: 50px;
        font-size: 16px;
    }

    #tmc-cart-root .tmc-cart-submit {
        height: 52px;
        font-size: 18px;
    }

    #tmc-cart-root .tmc-cart-floating {
        right: 16px;
        bottom: 16px;
    }
}
#tmc-cart-root .tmc-cart-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, #666 50%), linear-gradient(135deg, #666 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 42px;
}
#tmc-cart-root .tmc-cart-item-meta {
    margin: 4px 0 6px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--tmc-cart-muted);
}