.rd-cart-grid {
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr);
    gap: 24px;
    align-items: start;
    margin-top: 18px;
}
@media (max-width: 991px) {
    .rd-cart-grid { grid-template-columns: 1fr; }
}

.rd-cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #5a6b80;
}
.rd-cart-empty-link {
    display: inline-block;
    margin-top: 12px;
    background: #1a5fb4;
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}
.rd-cart-empty-link:hover { background: #154f93; color: #fff; }

/* ---- Список товаров ---- */
.rd-cart-items-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 22px;
}

.rd-cart-items-head,
.rd-cart-item {
    display: grid;
    grid-template-columns: minmax(0,1fr) 120px 120px 40px;
    gap: 16px;
    align-items: center;
}

.rd-cart-items-head {
    padding: 0 0 10px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 12px;
    color: #8a8a8a;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 600;
}
.rd-cart-head-qty   { text-align: center; }
.rd-cart-head-total { text-align: right; }

@media (max-width: 720px) {
    .rd-cart-items-head { display: none; }
}

.rd-cart-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.rd-cart-item {
    padding: 16px 0;
    border-bottom: 1px solid #f4f7fb;
}
.rd-cart-item:last-child { border-bottom: 0; }

.rd-cart-item-product {
    display: grid;
    grid-template-columns: 70px minmax(0,1fr);
    gap: 14px;
    align-items: start;
    min-width: 0;
}

@media (max-width: 720px) {
    .rd-cart-item {
        grid-template-columns: 1fr 40px;
        grid-template-areas:
            "product remove"
            "qty     total";
        row-gap: 12px;
    }
    .rd-cart-item-product { grid-area: product; }
    .rd-cart-item-qty     { grid-area: qty; justify-self: start; }
    .rd-cart-item-total   { grid-area: total; text-align: right; align-self: center; }
    .rd-cart-item-remove  { grid-area: remove; justify-self: end; }
}

.rd-cart-item-thumb {
    display: block;
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}
.rd-cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f4f7fb;
    border-radius: 6px;
    display: block;
}

.rd-cart-item-body { min-width: 0; }
.rd-cart-item-name {
    color: #1a1a1a;
    font-weight: 500;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.3;
    display: block;
    margin-bottom: 4px;
}
.rd-cart-item-name:hover { color: #1a5fb4; }
.rd-cart-item-sku { color: #8a8a8a; font-size: 11px; }
.rd-cart-item-price { color: #5a6b80; font-size: 12px; margin-top: 4px; }

.rd-cart-item-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d4d8df;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    width: max-content;
    justify-self: start;
}
.rd-cart-qty-btn {
    background: transparent;
    border: 0;
    width: 28px;
    height: 32px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    color: #5a6b80;
    padding: 0;
    flex-shrink: 0;
}
.rd-cart-qty-btn:hover { background: #f4f7fb; color: #1a5fb4; }
.rd-cart-grid input.rd-cart-qty-num {
    border: 0 !important;
    width: 38px !important;
    min-width: 0 !important;
    max-width: 38px !important;
    height: 32px !important;
    text-align: center;
    font: inherit;
    font-weight: 600;
    color: #1a1a1a;
    background: transparent;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    -moz-appearance: textfield;
    flex: 0 0 38px;
}
.rd-cart-grid input.rd-cart-qty-num::-webkit-outer-spin-button,
.rd-cart-grid input.rd-cart-qty-num::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.rd-cart-grid input.rd-cart-qty-num:focus { outline: 0; box-shadow: none !important; }

.rd-cart-item-total {
    font-weight: 700;
    color: #1a1a1a;
    text-align: right;
    font-size: 14px;
    white-space: nowrap;
}

.rd-cart-item-remove {
    background: transparent;
    border: 0;
    color: #8a8a8a;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    line-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s ease, color .15s ease;
}
.rd-cart-item-remove:hover { background: #fde7e3; color: #d31700; }
.rd-cart-item-remove svg { display: block; }

/* Купон */
.rd-cart-coupon {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f0f2f5;
    flex-wrap: wrap;
}
.rd-cart-coupon input {
    flex: 1;
    min-width: 160px;
    padding: 10px 12px;
    border: 1px solid #d4d8df;
    border-radius: 6px;
    font: inherit;
}
.rd-cart-coupon input:focus { outline: 0; border-color: #1a5fb4; box-shadow: 0 0 0 3px rgba(26,95,180,.12); }
#rd-cart-coupon-apply {
    background: #fff;
    border: 1px solid #1a5fb4;
    color: #1a5fb4;
    border-radius: 6px;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}
#rd-cart-coupon-apply:hover:not(:disabled) { background: #1a5fb4; color: #fff; }
#rd-cart-coupon-apply:disabled { opacity: .6; cursor: progress; }
.rd-cart-coupon-status { font-size: 12px; flex-basis: 100%; }

/* ---- Сводка справа ---- */
.rd-cart-summary { min-width: 0; }
.rd-cart-summary-inner {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 22px;
    position: sticky;
    top: 20px;
}
.rd-cart-summary-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #1a1a1a;
}
.rd-cart-line {
    display: flex;
    justify-content: space-between;
    color: #5a6b80;
    font-size: 13px;
    margin-bottom: 10px;
}
.rd-cart-line strong { color: #1a1a1a; font-weight: 600; }
.rd-cart-line--total {
    border-top: 1px solid #f0f2f5;
    padding-top: 12px;
    margin-top: 4px;
    font-size: 16px;
}
.rd-cart-line--total strong { font-size: 20px; color: #1a5fb4; }

.rd-cart-grid .woocommerce-Price-currencySymbol,
.rd-cart-grid .currencySymbol {
    font-family: inherit !important;
    font-size: inherit;
    font-weight: inherit;
    margin-left: 2px;
}

.rd-cart-checkout-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: #1a5fb4;
    color: #fff;
    text-align: center;
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 8px;
    font-weight: 700;
    margin-top: 16px;
    transition: background .15s ease;
}
.rd-cart-checkout-btn:hover { background: #154f93; color: #fff; }

.rd-cart-quick {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    border: 1px solid #1a5fb4;
    color: #1a5fb4;
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}
.rd-cart-quick:hover { background: #1a5fb4; color: #fff; }

.rd-cart-continue {
    display: block;
    text-align: center;
    margin-top: 14px;
    color: #1a5fb4;
    text-decoration: none;
    font-size: 13px;
}
.rd-cart-continue:hover { text-decoration: underline; }
