/* KingStart Cart — child-owned WooCommerce cart presentation */

.ks-cart {
    --ks-cart-bg: #f4f4f2;
    --ks-cart-surface: #ffffff;
    --ks-cart-field: #f8f8f6;
    --ks-cart-ink: #171719;
    --ks-cart-muted: #68686c;
    --ks-cart-border: #d8d8d4;
    --ks-cart-red: #ed111a;
    --ks-cart-red-dark: #cf0e16;
    min-height: 60vh;
    background-color: var(--ks-cart-bg);
    background-image:
        linear-gradient(90deg, rgba(23, 23, 25, 0.024) 1px, transparent 1px),
        linear-gradient(180deg, #f7f7f5 0, var(--ks-cart-bg) 420px);
    background-size: 96px 100%, 100% 100%;
    color: var(--ks-cart-ink);
}

/* Shared purchase progress language with the checkout. */
.ks-cart .ks-cart-progress {
    border-top: 1px solid #d0d0cd;
    border-bottom: 1px solid #c8c8c5;
    background: rgba(255, 255, 255, 0.96);
}

.ks-cart .ks-cart-progress__inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    box-sizing: border-box;
    width: 100%;
    max-width: 1220px;
    min-height: 92px;
    margin: 0 auto;
    padding: 0 24px;
    border-bottom: 2px solid var(--ks-cart-ink);
}

.ks-cart .ks-cart-progress__step {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    min-width: 0;
    padding: 14px 22px;
    border-left: 1px solid var(--ks-cart-border);
    color: #909094;
}

.ks-cart .ks-cart-progress__step:first-child {
    border-left: 0;
}

.ks-cart .ks-cart-progress__step--active {
    color: var(--ks-cart-ink);
    box-shadow: inset 0 -3px 0 var(--ks-cart-red);
}

.ks-cart .ks-cart-progress__step--active::before {
    position: absolute;
    top: 0;
    left: 22px;
    width: 44px;
    height: 3px;
    background: var(--ks-cart-red);
    content: "";
}

.ks-cart .ks-cart-progress__number {
    display: block;
    margin-bottom: 6px;
    color: inherit;
    font-size: clamp(27px, 2.35vw, 30px);
    font-weight: 900;
    line-height: 0.82;
    letter-spacing: -0.06em;
    font-variant-numeric: tabular-nums;
}

.ks-cart .ks-cart-progress__step--active .ks-cart-progress__number {
    color: var(--ks-cart-red);
}

.ks-cart .ks-cart-progress__label {
    color: inherit;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ks-cart .ks-cart__content {
    box-sizing: border-box;
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 36px 24px 56px;
}

.ks-cart .woocommerce,
.ks-cart .woocommerce-cart-form,
.ks-cart .cart-collaterals {
    width: 100%;
    margin: 0;
}

.ks-cart .ks-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr);
    align-items: start;
    gap: 26px;
}

/* Product panel */
.ks-cart .ks-cart-products {
    box-sizing: border-box;
    min-width: 0;
    padding: 30px 28px;
    border: 1px solid var(--ks-cart-border);
    border-top: 3px solid var(--ks-cart-ink);
    background: var(--ks-cart-surface);
}

.ks-cart .ks-cart-section__header {
    position: relative;
    margin-bottom: 24px;
    padding: 0 66px 20px 0;
    border-bottom: 1px solid var(--ks-cart-border);
}

.ks-cart .ks-cart-section__header::before,
.ks-cart .ks-cart-summary__header::before {
    display: block;
    width: 44px;
    height: 3px;
    margin-bottom: 12px;
    background: var(--ks-cart-red);
    content: "";
}

.ks-cart .ks-cart-section__index {
    position: absolute;
    top: 0;
    right: 0;
    color: rgba(23, 23, 25, 0.12);
    font-size: 40px;
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.06em;
    font-variant-numeric: tabular-nums;
}

.ks-cart .ks-cart-section__eyebrow,
.ks-cart .ks-cart-summary__eyebrow {
    margin: 0 0 9px;
    color: var(--ks-cart-red);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ks-cart .ks-cart-section__title,
.ks-cart .ks-cart-summary__header h2 {
    margin: 0;
    color: var(--ks-cart-ink);
    font-size: clamp(28px, 2.2vw, 34px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.ks-cart .ks-cart-section__intro {
    margin: 9px 0 0;
    color: var(--ks-cart-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* Cart table uses Woo fields and hooks, with a controlled technical grid. */
.ks-cart .ks-cart-table {
    display: block;
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    background: transparent;
    table-layout: fixed;
    font-variant-numeric: tabular-nums;
}

.ks-cart .ks-cart-table thead,
.ks-cart .ks-cart-table tbody {
    display: block;
    width: 100%;
}

.ks-cart .ks-cart-table thead tr,
.ks-cart .ks-cart-table tbody tr.cart_item {
    display: grid;
    grid-template-columns: 34px 76px minmax(0, 1fr) 94px 132px 104px;
    align-items: center;
    width: 100%;
}

.ks-cart .ks-cart-table th,
.ks-cart .ks-cart-table td {
    box-sizing: border-box;
    min-width: 0;
    border: 0;
    color: inherit;
}

.ks-cart .ks-cart-table thead tr {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ks-cart-border);
}

.ks-cart .ks-cart-table thead th {
    padding: 0 8px;
    color: #77777b;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
}

.ks-cart .ks-cart-table thead .product-remove,
.ks-cart .ks-cart-table thead .product-thumbnail {
    padding: 0;
}

.ks-cart .ks-cart-table tbody tr.cart_item {
    padding: 16px 0;
    border-bottom: 1px solid var(--ks-cart-border);
}

.ks-cart .ks-cart-table tbody tr.cart_item > td {
    padding: 0 8px;
    text-align: left;
}

.ks-cart .ks-cart-table .product-remove {
    padding-left: 0;
    text-align: left;
}

.ks-cart .ks-cart-table .product-remove a.remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid var(--ks-cart-border);
    border-radius: 0;
    color: #77777b;
    background: transparent;
    font-size: 19px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
}

.ks-cart .ks-cart-table .product-remove a.remove:hover {
    border-color: var(--ks-cart-red);
    color: #ffffff;
    background: var(--ks-cart-red);
}

.ks-cart .ks-cart-table .product-thumbnail {
    padding: 0;
}

.ks-cart .ks-cart-table .product-thumbnail a,
.ks-cart .ks-cart-table .product-thumbnail img {
    display: block;
    width: 64px;
    max-width: 64px;
    height: 64px;
}

.ks-cart .ks-cart-table .product-thumbnail img {
    box-sizing: border-box;
    padding: 4px;
    border: 1px solid var(--ks-cart-border);
    background: #ffffff;
    object-fit: contain;
}

.ks-cart .ks-cart-product__name {
    display: block;
    color: var(--ks-cart-ink);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.35;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.ks-cart .ks-cart-product__name:hover {
    color: var(--ks-cart-red);
}

.ks-cart .ks-cart-table .variation,
.ks-cart .ks-cart-table .variation dt,
.ks-cart .ks-cart-table .variation dd,
.ks-cart .ks-cart-table .backorder_notification {
    margin-top: 4px;
    color: #7a7a7e;
    font-size: 11px;
    line-height: 1.4;
}

.ks-cart .ks-cart-table .product-price,
.ks-cart .ks-cart-table .product-subtotal {
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.ks-cart .ks-cart-table .product-subtotal {
    padding-right: 0;
    text-align: right;
}

.ks-cart .ks-cart-table .product-quantity {
    width: auto;
    min-width: 0;
}

.ks-cart .ks-cart-table .quantity {
    display: grid;
    grid-template-columns: 32px 42px 32px;
    width: 106px;
    height: 38px;
    margin: 0;
    border: 1px solid var(--ks-cart-border);
    background: var(--ks-cart-field);
}

.ks-cart .ks-cart-table .quantity .plus,
.ks-cart .ks-cart-table .quantity .minus,
.ks-cart .ks-cart-table .quantity input.qty {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 36px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--ks-cart-ink);
    background: transparent;
    line-height: 36px;
    text-align: center;
    box-shadow: none;
}

.ks-cart .ks-cart-table .quantity input.qty {
    border-right: 1px solid var(--ks-cart-border);
    border-left: 1px solid var(--ks-cart-border);
    font-size: 13px;
    font-weight: 800;
    -moz-appearance: textfield;
}

.ks-cart .ks-cart-table .quantity input.qty::-webkit-inner-spin-button,
.ks-cart .ks-cart-table .quantity input.qty::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.ks-cart .ks-cart-table .quantity .plus:hover,
.ks-cart .ks-cart-table .quantity .minus:hover {
    color: #ffffff;
    background: var(--ks-cart-ink);
}

/* Coupon and cart update utilities */
.ks-cart .ks-cart-actions-row,
.ks-cart .ks-cart-actions-row > td {
    display: block;
    width: 100%;
}

.ks-cart .ks-cart-actions-row > td.actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 0 0;
    border: 0;
}

.ks-cart .ks-cart-coupon {
    flex: 1 1 auto;
    max-width: 390px;
}

.ks-cart .ks-cart-coupon > label {
    display: block;
    margin: 0 0 6px;
    color: #626267;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.ks-cart .ks-cart-coupon__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.ks-cart .ks-cart-coupon input.input-text,
.ks-cart .ks-cart-coupon button,
.ks-cart .ks-cart-update {
    box-sizing: border-box;
    height: 44px;
    min-height: 44px;
    margin: 0;
    border-radius: 0;
    font-size: 12px;
    font-weight: 850;
    box-shadow: none;
}

.ks-cart .ks-cart-coupon input.input-text {
    width: 100%;
    padding: 0 13px;
    border: 1px solid var(--ks-cart-border);
    background: var(--ks-cart-field);
    color: var(--ks-cart-ink);
}

.ks-cart .ks-cart-coupon button,
.ks-cart .ks-cart-update {
    padding: 0 16px;
    border: 1px solid var(--ks-cart-ink);
    color: #ffffff;
    background: var(--ks-cart-ink);
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.ks-cart .ks-cart-update {
    flex: 0 0 auto;
}

.ks-cart .ks-cart-coupon button:hover,
.ks-cart .ks-cart-update:hover {
    border-color: var(--ks-cart-red);
    background: var(--ks-cart-red);
}

.ks-cart .ks-cart-update:disabled {
    border-color: #b9b9b5;
    background: #b9b9b5;
    cursor: not-allowed;
}

/* Dark order summary */
.ks-cart .ks-cart-summary {
    box-sizing: border-box;
    min-width: 0;
    padding: 28px;
    border-top: 3px solid var(--ks-cart-red);
    background-color: #151516;
    background-image:
        radial-gradient(circle at 100% 0, rgba(237, 17, 26, 0.14), transparent 34%),
        linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
    background-size: auto, 24px 24px, 24px 24px;
    color: #f5f5f5;
}

.ks-cart .ks-cart-summary .cart_totals {
    width: 100%;
    margin: 0;
    color: inherit;
}

.ks-cart .ks-cart-summary__header {
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.ks-cart .ks-cart-summary__header h2 {
    color: #ffffff;
    font-size: clamp(27px, 2vw, 30px);
}

.ks-cart .ks-cart-summary__header > p:last-child {
    margin: 9px 0 0;
    color: #a9a9ad;
    font-size: 13px;
    line-height: 1.45;
}

.ks-cart .ks-cart-summary .shop_table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    background: transparent;
    color: inherit;
    font-variant-numeric: tabular-nums;
}

.ks-cart .ks-cart-summary .shop_table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.ks-cart .ks-cart-summary .shop_table th,
.ks-cart .ks-cart-summary .shop_table td {
    padding: 13px 0;
    border: 0;
    color: #c6c6ca;
    background: transparent;
    font-size: 13px;
    line-height: 1.4;
}

.ks-cart .ks-cart-summary .shop_table th {
    width: 42%;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
}

.ks-cart .ks-cart-summary .shop_table td {
    text-align: right;
}

.ks-cart .ks-cart-summary .shop_table .amount {
    color: inherit;
    font-weight: 800;
    white-space: nowrap;
}

.ks-cart .ks-cart-summary .shop_table .order-total {
    border-bottom: 0;
}

.ks-cart .ks-cart-summary .shop_table .order-total th,
.ks-cart .ks-cart-summary .shop_table .order-total td {
    padding-top: 18px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
}

.ks-cart .ks-cart-summary .shop_table .order-total .amount {
    color: var(--ks-cart-red);
    font-size: 28px;
    line-height: 1;
}

.ks-cart .ks-cart-summary #shipping_method {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ks-cart .ks-cart-summary #shipping_method li {
    margin: 6px 0;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.4;
}

.ks-cart .ks-cart-summary #shipping_method input {
    margin-right: 7px;
    accent-color: var(--ks-cart-red);
}

.ks-cart .ks-cart-summary .shipping-calculator-button {
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    text-decoration-color: var(--ks-cart-red);
    text-underline-offset: 3px;
}

.ks-cart .ks-cart-summary .shipping-calculator-form {
    margin-top: 12px;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #29292c;
}

.ks-cart .ks-cart-summary .shipping-calculator-form input,
.ks-cart .ks-cart-summary .shipping-calculator-form select {
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    margin: 0;
    border: 1px solid #d8d8d4;
    border-radius: 0;
    background: #ffffff;
    color: var(--ks-cart-ink);
}

.ks-cart .ks-cart-summary .wc-proceed-to-checkout {
    margin: 18px 0 0;
    padding: 0;
}

.ks-cart .ks-cart-summary .checkout-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    width: 100%;
    min-height: 56px;
    margin: 0;
    padding: 0 18px;
    border: 1px solid var(--ks-cart-red);
    border-radius: 0;
    color: #ffffff;
    background: var(--ks-cart-red);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: 0.03em;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: none;
}

.ks-cart .ks-cart-summary .checkout-button:hover {
    border-color: var(--ks-cart-red-dark);
    background: var(--ks-cart-red-dark);
}

.ks-cart .ks-cart-summary__support {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.ks-cart .ks-cart-summary__support span {
    color: #9f9fa3;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ks-cart .ks-cart-summary__support a {
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
}

.ks-cart .ks-cart-summary__support a:hover {
    color: var(--ks-cart-red);
}

/* Notices, empty state, and theme-owned cross-sells remain functional. */
.ks-cart .woocommerce-error,
.ks-cart .woocommerce-message,
.ks-cart .woocommerce-info {
    margin: 0 0 20px;
    padding: 15px 18px;
    border: 1px solid var(--ks-cart-border);
    border-left: 4px solid var(--ks-cart-red);
    border-radius: 0;
    background: #ffffff;
    color: var(--ks-cart-ink);
}

.ks-cart .cart-empty,
.ks-cart .return-to-shop {
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
}

.ks-cart .cart-empty {
    padding: 28px;
    border-top: 3px solid var(--ks-cart-ink);
    background: #ffffff;
    color: var(--ks-cart-ink);
    font-size: 18px;
    font-weight: 800;
}

.ks-cart .return-to-shop .button {
    min-height: 48px;
    border-radius: 0;
    background: var(--ks-cart-red);
    color: #ffffff;
}

.ks-cart .cross-sells {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 28px;
}

.ks-cart a:focus-visible,
.ks-cart button:focus-visible,
.ks-cart input:focus-visible,
.ks-cart select:focus-visible {
    outline: 3px solid var(--ks-cart-red);
    outline-offset: 2px;
}

@media only screen and (max-width: 1120px) {
    .ks-cart .ks-cart-table thead tr,
    .ks-cart .ks-cart-table tbody tr.cart_item {
        grid-template-columns: 32px 70px minmax(0, 1fr) 82px 112px 96px;
    }

    .ks-cart .ks-cart-table .quantity {
        grid-template-columns: 29px 38px 29px;
        width: 96px;
    }
}

@media only screen and (max-width: 1023px) {
    .ks-cart .ks-cart__content {
        max-width: 760px;
        padding-top: 32px;
    }

    .ks-cart .ks-cart-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media only screen and (max-width: 640px) {
    .ks-cart .ks-cart-progress__inner {
        min-height: 78px;
        padding: 0 16px;
    }

    .ks-cart .ks-cart-progress__step {
        padding: 14px 8px;
    }

    .ks-cart .ks-cart-progress__step--active::before {
        left: 8px;
        width: 36px;
    }

    .ks-cart .ks-cart-progress__number {
        font-size: 27px;
    }

    .ks-cart .ks-cart-progress__label {
        font-size: 10px;
        letter-spacing: 0.025em;
    }

    .ks-cart .ks-cart__content {
        padding: 24px 16px 44px;
    }

    .ks-cart .ks-cart-layout {
        gap: 20px;
    }

    .ks-cart .ks-cart-products,
    .ks-cart .ks-cart-summary {
        padding: 20px 18px;
    }

    .ks-cart .ks-cart-section__header {
        margin-bottom: 18px;
        padding: 0 48px 16px 0;
    }

    .ks-cart .ks-cart-section__index {
        font-size: 32px;
    }

    .ks-cart .ks-cart-section__title,
    .ks-cart .ks-cart-summary__header h2 {
        font-size: 28px;
    }

    .ks-cart .ks-cart-table thead {
        display: none;
    }

    .ks-cart .ks-cart-table tbody tr.cart_item {
        position: relative;
        grid-template-columns: 68px minmax(0, 1fr) auto;
        grid-template-areas:
            "thumb name remove"
            "thumb price price"
            "qty qty subtotal";
        gap: 9px 12px;
        padding: 16px 0;
    }

    .ks-cart .ks-cart-table tbody tr.cart_item > td {
        padding: 0;
    }

    .ks-cart .ks-cart-table .product-remove {
        grid-area: remove;
        align-self: start;
        text-align: right;
    }

    .ks-cart .ks-cart-table .product-thumbnail {
        grid-area: thumb;
        align-self: start;
    }

    .ks-cart .ks-cart-table .product-thumbnail a,
    .ks-cart .ks-cart-table .product-thumbnail img {
        width: 68px;
        max-width: 68px;
        height: 68px;
    }

    .ks-cart .ks-cart-table .product-name {
        grid-area: name;
        align-self: start;
    }

    .ks-cart .ks-cart-table .product-price {
        grid-area: price;
        color: #6c6c70;
    }

    .ks-cart .ks-cart-table .product-price::before {
        margin-right: 5px;
        color: #8b8b8f;
        font-size: 10px;
        font-weight: 800;
        content: attr(data-title) ":";
        text-transform: uppercase;
    }

    .ks-cart .ks-cart-table .product-quantity {
        grid-area: qty;
    }

    .ks-cart .ks-cart-table .product-subtotal {
        grid-area: subtotal;
        align-self: center;
        color: var(--ks-cart-red);
        font-size: 15px;
        text-align: right;
    }

    .ks-cart .ks-cart-actions-row > td.actions {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .ks-cart .ks-cart-coupon {
        width: 100%;
        max-width: none;
    }

    .ks-cart .ks-cart-update {
        width: 100%;
    }

    .ks-cart .ks-cart-summary .shop_table .order-total .amount {
        font-size: 26px;
    }

    .ks-cart .ks-cart-summary .checkout-button {
        min-height: 54px;
    }

    .ks-cart .ks-cart-summary__support {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }
}

@media only screen and (max-width: 380px) {
    .ks-cart .ks-cart-products,
    .ks-cart .ks-cart-summary {
        padding-right: 16px;
        padding-left: 16px;
    }

    .ks-cart .ks-cart-table tbody tr.cart_item {
        grid-template-columns: 60px minmax(0, 1fr) auto;
    }

    .ks-cart .ks-cart-table .product-thumbnail a,
    .ks-cart .ks-cart-table .product-thumbnail img {
        width: 60px;
        max-width: 60px;
        height: 60px;
    }

    .ks-cart .ks-cart-coupon__controls {
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
    }
}
