.cart-modal {
    position: fixed;
    z-index: 10000;
    visibility: hidden;
    pointer-events: none;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
}

.cart-modal.open {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
}

.cart-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    opacity: 0;
    transition: opacity .3s ease;
}

.cart-modal.open .cart-modal__overlay {
    opacity: 1;
}

.cart-modal__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 480px;
    max-width: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .3s ease;
    box-shadow: -4px 0 12px rgba(0, 0, 0, .1);
}

.cart-modal.open .cart-modal__panel {
    transform: translateX(0);
}

.cart-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px;
    flex-shrink: 0;
}

.cart-modal__title {
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
}

.cart-modal__close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #212529;
    display: flex;
}

.cart-modal__close svg {
    width: 20px;
    height: 20px;
}

.cart-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 0 40px 40px;
    font-family: "Commissioner", sans-serif;
    display: flex;
    flex-direction: column;
    gap: 56px;
}

.cart-modal__info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.cart-modal__items {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.cart-modal__item {
    display: flex;
    gap: 16px;
}

.cart-modal__item-picture {
    width: 120px;
    height: 100%;
    flex-shrink: 0;
    background: #f5f5f5;
}

.cart-modal__item-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;  
    aspect-ratio: 3/4;
}

.cart-modal__item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.cart-modal__item-info-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.cart-modal__item-info-action {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-modal__item-name {
    font-weight: 400;
    font-size: 14px;
    line-height: 16px;
    letter-spacing: -2%;
    text-transform: uppercase;
    color: #212529;
}

.cart-modal__item-price {
    color: #212529;
    font-weight: 500;
    font-size: 16px;
    line-height: 20px;
    letter-spacing: -2%;
}

.cart-modal__item-tag {
    font-weight: 500;
    font-size: 9px;
    line-height: 12px;
    color: #887469;
}

.cart-modal__select {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    padding: 3px 12px;
    border-radius: 4px;
    background: #F7F7F7;
    border: 1px solid transparent;
    color: #212529;

    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    text-transform: uppercase;
    position: relative;
}

.cart-modal__select-input {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    outline: none;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    flex: 1;
    min-width: 0;

    padding: 3px 12px;
    position: absolute;
    inset: 0;
    width: 100%;
}

.cart-modal__select-input_colors {
    padding-left: 34px;
}

.cart-modal__select-input option:disabled {
    color: #c4c4c4;
}

.cart-modal__select-arrow {
    width: 24px;
    height: 24px;
    margin-left: auto;
    pointer-events: none;
    flex-shrink: 0;
}

.cart-modal__color-swatch {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    border: 1px solid #e2e2e2;
}

.cart-modal__actions {
    display: flex;
    gap: 8px;
}

.cart-modal__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 12px 24px;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
    border-radius: 4px;

    font-weight: 400;
    font-size: 16px;
    letter-spacing: -2%;
}

.cart-modal__btn_primary {
    background: #212529;
    border: 1px solid #212529;
    color: #fff;
    flex: 1;
}

.cart-modal__btn_primary:hover {
    background: #222;
}

.cart-modal__btn_secondary {
    background: none;
    border: 1px solid #212529;
    color: #212529;
}

.cart-modal__btn_secondary:hover {
    background: #f5f5f5;
}

.cart-modal__empty {
    padding: 40px 0;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.cart-modal__recommend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-modal__recommend-title {
    font-weight: 400;
    font-size: 14px;
    line-height: 16px;
    letter-spacing: 0%;
}

.cart-modal__recommend-list {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}

.cart-modal__recommend-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(50% - 16px);
    color: #212529;
    text-decoration: none;
}

.cart-modal__recommend-picture {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #f5f5f5;
}

.cart-modal__recommend-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-modal__recommend-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-modal__recommend-name {
    font-weight: 400;
    font-size: 10px;
    line-height: 12px;
    text-transform: uppercase;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.cart-modal__recommend-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.cart-modal__recommend-price {
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0%;
    text-align: center;
}

.cart-modal__recommend-colors {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cart-modal__recommend-colors-item {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
}

.cart-modal__recommend-colors-more {
    font-size: 12px;
    color: #a5a5a5;
}

.cart-modal__recommend-tag {
    font-weight: 500;
    font-size: 9px;
    line-height: 12px;
    letter-spacing: 0%;
    color: #887469;
}

body.cart-modal-locked {
    overflow: hidden;
}

@media screen and (max-width: 768px) {
    .cart-modal__panel {
        width: 100%;
    }

    .cart-modal__header {
        padding: 16px;
    }

    .cart-modal__body {
        padding: 0 16px 16px;
        gap: 48px;
    }

    .cart-modal__recommend-item {
        width: calc((100% / 4) - 24px);
    }

    .cart-modal__item-info-header {
        gap: 2px;
    }

    .cart-modal__item-name {
        font-size: 10px;
        line-height: 12px;
        letter-spacing: -2%;
    }

    .cart-modal__item-price {
        font-size: 12px;
        line-height: 16px;
    }
}

@media screen and (max-width: 475px) {
    .cart-modal__recommend-item {
        width: calc((100% / 2) - 16px);
    }
}