/* ── Cart & checkout — elegant food layout ── */

.wz-cart-page {
    background: #f7f5fa;
    padding: 8px 20px 40px;
    min-height: calc(100vh - 100px);
}

.wz-cart-page__reco {
    max-width: 1120px;
    margin: 32px auto 0;
}

.wz-cart {
    max-width: 1120px;
    margin: 0 auto;
}

.wz-cart .cart-container {
    padding: 0;
}

/* ── Grid layout ── */
.modern-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

/* ── Items panel ── */
.cart-items-section {
    background: #fff;
    border: 1px solid #ebe6f2;
    border-radius: 16px;
    padding: 20px 20px 16px;
    box-shadow: 0 1px 3px rgba(46, 31, 83, 0.04);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0ecf5;
}

.cart-header h2 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #2e1f53;
    line-height: 1.2;
}

.cart-header h2::before {
    content: 'Your order';
    display: block;
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9a8fb0;
    margin-bottom: 2px;
}

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

/* ── Cart line item ── */
.cart-item-card {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid #f0ecf5;
    border-radius: 14px;
    background: #fdfcfe;
}

.cart-item-card__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.item-checkbox {
    margin: 4px 0 0;
}

.item-image {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: #f3eff8;
    border: 1px solid #ebe6f2;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px !important;
}

.item-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.item-variant {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9a8fb0;
}

.item-name {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.3;
    color: #2e1f53;
}

.item-name a {
    color: inherit;
    text-decoration: none;
}

.item-name a:hover {
    color: var(--primary-color, #6b4fa3);
}

.item-pricing {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
}

.item-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-color, #6b4fa3);
}

.item-price .bdt-icon,
.item-quantity .bdt-icon,
.summary-total-value .bdt-icon,
.wz-cart-addon__price-row .bdt-icon {
    color: var(--primary-color, #6b4fa3);
}

.item-quantity {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9a8fb0;
}

.item-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.remove-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #f0e0e0;
    border-radius: 9px;
    background: #fff;
    color: #b07070;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.remove-item:hover:not(:disabled) {
    background: #fef2f2;
    border-color: #e8b4b4;
    color: #c44;
}

.remove-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.clear-cart-btn {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    border: 1px dashed #e8d4d4;
    border-radius: 10px;
    background: transparent;
    color: #b07070;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.clear-cart-btn:hover {
    background: #fef8f8;
}

/* ── Quantity control (main + shared) ── */
.cart-quantity-control {
    display: inline-flex;
}

.cart-quantity-selector {
    display: inline-grid;
    grid-template-columns: 32px 40px 32px;
    align-items: stretch;
    height: 36px;
    border: 1px solid #e4ddf0;
    border-radius: 9px;
    overflow: hidden;
    background: #fff;
}

.cart-quantity-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #f8f5fb;
    color: var(--primary-color, #6b4fa3);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.cart-quantity-btn:hover {
    background: #efe8f7;
}

.cart-quantity-input {
    width: 40px;
    border: 0;
    border-left: 1px solid #e4ddf0;
    border-right: 1px solid #e4ddf0;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: #2e1f53;
    padding: 0;
    -moz-appearance: textfield;
}

.cart-quantity-input::-webkit-outer-spin-button,
.cart-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.wz-cart-qty {
    display: inline-flex;
    align-items: center;
    height: 36px;
    border: 1px solid #e4ddf0;
    border-radius: 9px;
    overflow: hidden;
    background: #fff;
}

.wz-cart-qty--sm {
    height: 32px;
}

.wz-cart-qty__btn {
    width: 30px;
    height: 100%;
    border: 0;
    background: #f8f5fb;
    color: var(--primary-color, #6b4fa3);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wz-cart-qty__btn:hover {
    background: #efe8f7;
}

.wz-cart-qty__val {
    min-width: 28px;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 800;
    color: #2e1f53;
    border-left: 1px solid #e4ddf0;
    border-right: 1px solid #e4ddf0;
    line-height: 32px;
}

.wz-cart-qty--sm .wz-cart-qty__val {
    line-height: 30px;
}

/* ── Add-ons ── */
.wz-cart-addons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px dashed #e8e2f0;
    margin-left: 0;
}

.wz-cart-addon {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8f6fb;
    border: 1px solid #ebe6f2;
}

.wz-cart-addon__thumb-wrap {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ebe6f2;
    flex-shrink: 0;
}

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

.wz-cart-addon__info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wz-cart-addon__title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.wz-cart-addon__badge {
    flex-shrink: 0;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--primary-color, #6b4fa3);
    background: rgba(107, 79, 163, 0.1);
}

.wz-cart-addon__name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #3d3550;
    line-height: 1.3;
    min-width: 0;
}

.wz-cart-addon__price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.wz-cart-addon__unit {
    font-size: 0.72rem;
    font-weight: 600;
    color: #9a8fb0;
}

.wz-cart-addon__total {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--primary-color, #6b4fa3);
}

.wz-cart-addon__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.wz-cart-addon__remove {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #b0a8bc;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.wz-cart-addon__remove:hover {
    background: #fef2f2;
    color: #c44;
}

.wz-cart-addon__qty-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #9a8fb0;
}

/* ── Checkbox ── */
.custom-checkbox {
    position: relative;
    display: block;
    padding-left: 26px;
    cursor: pointer;
    user-select: none;
    min-height: 20px;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    border: 1.5px solid #d5cde3;
    border-radius: 5px;
    background: #fff;
    transition: background 0.15s, border-color 0.15s;
}

.custom-checkbox input:checked ~ .checkmark {
    background: var(--primary-color, #6b4fa3);
    border-color: var(--primary-color, #6b4fa3);
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark::after {
    display: block;
}

.select-all-container .custom-checkbox {
    display: flex;
    align-items: center;
    padding-left: 26px;
}

.select-all-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b5f80;
    margin-left: 0;
}

/* ── Order summary ── */
.order-summary-section {
    width: auto;
}

.order-summary-card {
    position: sticky;
    top: 84px;
    background: #fff;
    border: 1px solid #ebe6f2;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(46, 31, 83, 0.06);
}

.order-summary-card__head {
    padding: 16px 18px;
    background: linear-gradient(135deg, #6b4fa3 0%, #7d5fb8 100%);
}

.order-summary-card__head h3 {
    margin: 0;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}

.summary-details {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.summary-shipping-note {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #8a8199;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8f6fb;
    border: 1px solid #f0ecf5;
}

.summary-total-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8f6fb;
    border: 1px solid #ebe6f2;
}

.summary-total-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b5f80;
}

.summary-total-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-color, #6b4fa3);
    font-variant-numeric: tabular-nums;
}

.promo-note {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(var(--theme-accent-rgb, 255 193 7), 0.12);
    border: 1px solid rgba(var(--theme-accent-rgb, 255 193 7), 0.28);
    font-size: 0.76rem;
    font-weight: 600;
    color: #5c4a3a;
    line-height: 1.35;
}

.promo-note i {
    color: var(--primary-color, #6b4fa3);
    font-size: 0.72rem;
    flex-shrink: 0;
}

.checkout-actions {
    margin-top: 2px;
}

.checkout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 16px;
    border: 0;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #6b4fa3 0%, #7d5fb8 100%);
    box-shadow: 0 6px 20px rgba(107, 79, 163, 0.28);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.checkout-btn:hover:not(.disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(107, 79, 163, 0.34);
}

.checkout-btn.disabled {
    background: #d8d2e4;
    box-shadow: none;
    cursor: not-allowed;
}

/* ── Empty cart ── */
.empty-cart-section {
    max-width: 480px;
    margin: 20px auto;
    padding: 32px 24px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #ebe6f2;
    text-align: center;
}

/* Legacy addon classes (checkout / orders) */
.cart-addon-lines {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-addon-line {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

@media (max-width: 992px) {
    .modern-cart-layout {
        grid-template-columns: 1fr;
    }

    .order-summary-card {
        position: static;
    }
}

@media (max-width: 576px) {
    .wz-cart-page {
        padding: 6px 12px 28px;
    }

    .cart-items-section {
        padding: 14px;
    }

    .cart-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .item-image {
        width: 72px;
        height: 72px;
    }

    .wz-cart-addon {
        grid-template-columns: 40px minmax(0, 1fr);
        grid-template-rows: auto auto;
    }

    .wz-cart-addon__actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        padding-top: 4px;
    }
}
