:root {
    --cart-ink: #0b0b0b;
    --cart-red: #ed1d24;
    --cart-navy: #121212;
    --cart-muted: #6b7280;
    --cart-line: #e8ebf0;
    --cart-bg: #f4f6f9;
    --cart-card: #ffffff;
    --cart-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.cart-page,
.checkout-page {
    background:
        radial-gradient(900px 320px at 0% 0%, rgba(237, 29, 36, 0.06), transparent 55%),
        radial-gradient(800px 280px at 100% 0%, rgba(18, 18, 18, 0.07), transparent 50%),
        var(--cart-bg);
    padding: 28px 0 72px;
    min-height: 60vh;
}

.cart-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.cart-page-head h1 {
    margin: 0;
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    font-weight: 800;
    color: var(--cart-ink);
}

.cart-page-head p {
    margin: 6px 0 0;
    color: var(--cart-muted);
    font-size: 0.95rem;
}

.cart-steps {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.cart-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--cart-line);
    color: var(--cart-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.cart-step.is-active {
    background: var(--cart-ink);
    border-color: var(--cart-ink);
    color: #fff;
}

.cart-step.is-done {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.cart-step span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.08);
    font-size: 0.75rem;
}

.cart-step.is-active span {
    background: var(--cart-red);
    color: #fff;
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.cart-panel,
.cart-summary {
    background: var(--cart-card);
    border-radius: 22px;
    box-shadow: var(--cart-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.cart-panel {
    padding: 8px 8px 8px;
    overflow: hidden;
}

.cart-item {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr) auto;
    gap: 16px;
    padding: 18px;
    border-bottom: 1px solid var(--cart-line);
    align-items: center;
}

.cart-item:last-child {
    border-bottom: 0;
}

.cart-item__img {
    width: 108px;
    height: 108px;
    max-width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #f2f4f7;
    flex-shrink: 0;
    display: block;
}

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

.cart-item__body {
    min-width: 0;
}

.cart-item__name {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cart-ink);
    word-break: break-word;
}

.cart-item__name a {
    color: inherit;
    text-decoration: none;
}

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

.cart-item__meta {
    color: var(--cart-muted);
    font-size: 0.86rem;
    margin-bottom: 10px;
}

.cart-item__price {
    font-weight: 800;
    color: var(--cart-red);
    font-size: 1.05rem;
}

.cart-item__mrp {
    margin-left: 8px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 500;
    font-size: 0.88rem;
}

.cart-item__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.cart-qty-wrap {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--cart-line);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.cart-qty-wrap button {
    border: 0;
    background: #f8f9fb;
    width: 36px;
    height: 36px;
    font-size: 16px;
    cursor: pointer;
    color: var(--cart-ink);
}

.cart-qty-wrap input {
    width: 46px;
    border: 0;
    text-align: center;
    height: 36px;
    font-weight: 700;
    color: var(--cart-ink);
}

.cart-item__line {
    text-align: right;
    min-width: 110px;
}

.cart-item__line-label {
    display: block;
    font-size: 0.75rem;
    color: var(--cart-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cart-item__line-total {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--cart-ink);
}

.cart-remove {
    border: 0;
    background: transparent;
    color: var(--cart-red);
    font-weight: 700;
    font-size: 0.86rem;
    cursor: pointer;
    padding: 0;
}

.cart-remove:hover {
    text-decoration: underline;
}

.cart-summary {
    padding: 24px;
    position: sticky;
    top: 90px;
}

.cart-summary h3 {
    margin: 0 0 18px;
    font-size: 1.15rem;
    font-weight: 800;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    color: #374151;
    font-size: 0.95rem;
    border-bottom: 1px dashed #eef1f5;
}

.cart-summary-row.is-savings {
    color: #059669;
    font-weight: 700;
}

.cart-summary-row.is-total {
    border-bottom: 0;
    margin-top: 6px;
    padding-top: 14px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--cart-ink);
}

.cart-summary-row.is-total span:last-child {
    color: var(--cart-red);
}

.cart-summary-note {
    margin: 14px 0 0;
    font-size: 0.8rem;
    color: var(--cart-muted);
    line-height: 1.45;
}

.cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border-radius: 999px;
    padding: 14px 18px;
    font-weight: 800;
    text-decoration: none !important;
    border: 0;
    cursor: pointer;
    transition: 0.2s ease;
}

.cart-btn-primary {
    background: var(--cart-red);
    color: #fff !important;
    box-shadow: 0 12px 24px rgba(237, 29, 36, 0.25);
    margin-top: 18px;
}

.cart-btn-primary:hover {
    background: #9e0c24;
    transform: translateY(-1px);
}

.cart-btn-ghost {
    background: #fff;
    color: var(--cart-navy) !important;
    border: 1.5px solid var(--cart-line);
    margin-top: 10px;
}

.cart-btn-ghost:hover {
    border-color: var(--cart-navy);
}

.cart-btn-wa {
    background: #25d366;
    color: #fff !important;
    margin-top: 12px;
}

.cart-btn-wa:hover {
    background: #1ebe57;
}

.cart-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.cart-empty {
    text-align: center;
    padding: 70px 24px;
    background: #fff;
    border-radius: 22px;
    box-shadow: var(--cart-shadow);
}

.cart-empty__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #fde8eb;
    color: var(--cart-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.cart-empty h2 {
    margin: 0 0 8px;
    font-weight: 800;
}

.cart-empty p {
    color: var(--cart-muted);
    margin-bottom: 22px;
}

.checkout-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.checkout-form-grid .full {
    grid-column: 1 / -1;
}

.checkout-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}

.checkout-field label .req {
    color: var(--cart-red);
}

.checkout-field input,
.checkout-field textarea,
.checkout-field select {
    width: 100%;
    border: 1.5px solid var(--cart-line);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    color: var(--cart-ink);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.checkout-field input:focus,
.checkout-field textarea:focus,
.checkout-field select:focus {
    outline: none;
    border-color: rgba(237, 29, 36, 0.5);
    box-shadow: 0 0 0 4px rgba(237, 29, 36, 0.1);
}

.checkout-field textarea {
    min-height: 88px;
    resize: vertical;
}

.checkout-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 1.15rem;
    font-weight: 800;
}

.checkout-panel-title i {
    color: var(--cart-red);
}

.checkout-mini-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
}

.checkout-mini-item:last-of-type {
    border-bottom: 0;
    margin-bottom: 8px;
}

.checkout-mini-item img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: #f2f4f7;
}

.checkout-mini-item strong {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 2px;
}

.checkout-alert {
    display: none;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.checkout-alert.show {
    display: block;
}

.checkout-alert.error {
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

.checkout-alert.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.checkout-panel {
    background: var(--cart-card);
    border-radius: 22px;
    box-shadow: var(--cart-shadow);
    padding: 26px;
    margin-bottom: 20px;
}

.checkout-pay {
    margin: 18px 0 14px;
    padding-top: 14px;
    border-top: 1px solid #eef1f5;
}

.checkout-pay h4 {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #111;
}

.checkout-pay-options {
    display: grid;
    gap: 10px;
}

.checkout-pay-option {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 12px 14px;
    border: 1.5px solid #e5e8ee;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.checkout-pay-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkout-pay-option.is-active {
    border-color: #ed1d24;
    background: #fff7f8;
    box-shadow: 0 0 0 3px rgba(237, 29, 36, 0.08);
}

.checkout-pay-option__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f3f5f8;
    color: #0b0b0b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.checkout-pay-option__icon svg,
.checkout-pay-option__icon i {
    display: block;
    width: 20px;
    height: 20px;
    font-size: 18px;
    line-height: 1;
    color: inherit;
}

.checkout-pay-option__icon.is-online {
    background: #eef4ff;
    color: #1d4ed8;
}

.checkout-pay-option.is-active .checkout-pay-option__icon {
    background: #ed1d24;
    color: #fff;
}

.checkout-pay-option.is-active .checkout-pay-option__icon.is-online {
    background: #1d4ed8;
    color: #fff;
}

.checkout-pay-option__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.checkout-pay-option__text strong {
    font-size: 0.92rem;
    color: #111;
}

.checkout-pay-option__text small {
    font-size: 0.78rem;
    color: #6b7280;
}

.checkout-pay-hint {
    margin: 10px 0 0;
    font-size: 0.8rem;
    color: #9a3412;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 8px 10px;
}

.cart-btn-online {
    background: #1d4ed8;
    color: #fff;
    border: 0;
}

.cart-btn-online:hover {
    background: #1e40af;
    color: #fff;
}

.pay-static-modal {
    position: fixed;
    inset: 0;
    z-index: 10000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pay-static-modal[hidden] {
    display: none !important;
}

.pay-static-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.pay-static-modal__card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    padding: 28px 24px 22px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    text-align: center;
    z-index: 1;
}

.pay-static-modal__close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
}

.pay-static-modal__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: #eef4ff;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.pay-static-modal__card h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 800;
}

.pay-static-modal__card p {
    margin: 0 0 10px;
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.5;
}

.pay-static-modal__note {
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px 12px !important;
    font-size: 0.88rem !important;
}

.pay-static-modal__actions {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.pay-static-modal__icon.is-success {
    background: #ecfdf5;
    color: #059669;
}

.order-success-modal {
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.order-success-sheet {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    max-height: min(88vh, 640px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.order-success-sheet__head {
    flex: 0 0 auto;
    padding: 14px 16px 12px;
    background: #fff;
    border-bottom: 1px solid #eef1f5;
}

.order-success-sheet__title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.order-success-sheet__badge {
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 50%;
    background: #059669;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: none;
}

.order-success-sheet__titles {
    min-width: 0;
}

.order-success-sheet__head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0b0b0b;
    line-height: 1.25;
}

.order-success-sheet__head > p,
.order-success-sheet__titles p {
    margin: 2px 0 0;
    color: #6b7280;
    font-size: 0.82rem;
    line-height: 1.35;
}

.order-success-sheet__number {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    box-shadow: none;
    text-align: left;
}

.order-success-sheet__number span {
    font-size: 0.78rem;
    letter-spacing: 0;
    text-transform: none;
    color: #047857;
    font-weight: 700;
    white-space: nowrap;
}

.order-success-sheet__number strong {
    font-size: 0.9rem;
    color: #0b0b0b;
    word-break: break-all;
    text-align: right;
}

.order-success-sheet__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px 12px;
    display: grid;
    gap: 8px;
    background: #f8fafc;
    scrollbar-width: thin;
}

.order-success-sheet__foot {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border-top: 1px solid #eef1f5;
}

.order-success-sheet__foot .cart-btn {
    padding: 11px 10px;
    font-size: 0.88rem;
}

.order-success-block {
    border: 1px solid #e8ebf0;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
}

.order-success-block h5 {
    margin: 0 0 6px;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
    font-weight: 700;
}

.order-success-block .cart-summary-row {
    padding: 5px 0;
    font-size: 0.88rem;
}

.order-success-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f3f6;
    font-size: 0.86rem;
}

.order-success-line:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.order-success-line strong {
    display: block;
    font-size: 0.86rem;
}

.order-success-line small {
    display: block;
    color: #6b7280;
    margin-top: 1px;
    font-size: 0.75rem;
}

.order-success-address {
    font-size: 0.86rem;
    color: #374151;
    line-height: 1.45;
}

@media (max-width: 991px) {
    .cart-page,
    .checkout-page {
        padding: 18px 0 56px;
    }

    .cart-page-head {
        align-items: flex-start;
        margin-bottom: 18px;
        gap: 12px;
    }

    .cart-page-head h1 {
        font-size: 1.45rem;
    }

    .cart-steps {
        width: 100%;
        gap: 6px;
    }

    .cart-step {
        flex: 1 1 0;
        justify-content: center;
        padding: 8px 10px;
        font-size: 0.75rem;
        gap: 6px;
    }

    .cart-step span {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }

    .cart-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cart-panel {
        padding: 4px;
        border-radius: 18px;
    }

    .cart-summary {
        position: static;
        padding: 18px;
        border-radius: 18px;
    }

    .cart-item {
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 12px;
        padding: 14px 12px;
        align-items: start;
    }

    .cart-item__img {
        width: 84px;
        height: 84px;
        border-radius: 12px;
    }

    .cart-item__body {
        min-width: 0;
        overflow: hidden;
    }

    .cart-item__name {
        font-size: 0.95rem;
        line-height: 1.3;
        margin-bottom: 2px;
    }

    .cart-item__meta {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    .cart-item__price {
        font-size: 0.95rem;
    }

    .cart-item__mrp {
        font-size: 0.8rem;
        margin-left: 6px;
    }

    .cart-item__actions {
        margin-top: 10px;
        gap: 10px;
    }

    .cart-qty-wrap button {
        width: 34px;
        height: 34px;
    }

    .cart-qty-wrap input {
        width: 40px;
        height: 34px;
    }

    .cart-item__line {
        grid-column: 1 / -1;
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-width: 0;
        margin-top: 4px;
        padding-top: 10px;
        border-top: 1px dashed var(--cart-line);
    }

    .cart-item__line-total {
        font-size: 1rem;
    }

    .checkout-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .order-success-sheet__foot {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 10px;
        padding: 12px 10px;
    }

    .cart-item__img {
        width: 72px;
        height: 72px;
        border-radius: 10px;
    }

    .cart-step {
        padding: 7px 6px;
        font-size: 0.7rem;
    }
}
