/* ============================================================
   Diilzo Storefront — Cart (Modern Redesign)
   ============================================================ */

.dz-cart-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

/* ── Header ───────────────────────────────────────────────────── */
.dz-cart-header {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.dz-cart-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dz-cart-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--diilzo-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dz-cart-header h1 i {
    color: var(--diilzo-primary);
}

.dz-cart-header-count {
    font-size: 14px;
    color: var(--diilzo-muted);
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

/* ── Layout ───────────────────────────────────────────────────── */
.dz-cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
    align-items: start;
}

/* ── Items Column ─────────────────────────────────────────────── */
.dz-cart-items-col {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* Select-all bar */
.dz-cart-select-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.dz-cart-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--diilzo-text);
}

.dz-cart-select-all input {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.dz-cart-bulk-remove {
    background: none;
    border: 1px solid #cc0c39;
    color: #cc0c39;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, color 0.15s;
}

.dz-cart-bulk-remove:hover {
    background: #cc0c39;
    color: #fff;
}

.dz-cart-price-label {
    margin-left: auto;
    font-size: 14px;
    font-weight: 700;
    color: var(--diilzo-text);
}

/* Cart item row */
.dz-cart-items {
    padding: 0 20px;
}

.dz-cart-row {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: opacity 0.3s;
}

.dz-cart-row:last-child {
    border-bottom: none;
}

.dz-cart-row.dz-removing {
    opacity: 0;
    transform: translateX(-30px);
}

.dz-cart-row-check {
    display: flex;
    align-items: flex-start;
    padding-top: 4px;
}

.dz-cart-row-check input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.dz-cart-row-img {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    background: #fafafa;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dz-cart-row-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    transition: transform 0.3s;
}

.dz-cart-row-img:hover img {
    transform: scale(1.08);
}

.dz-cart-row-noimg {
    font-size: 40px;
    color: #ddd;
}

.dz-cart-row-info {
    flex: 1;
    min-width: 0;
}

.dz-cart-row-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--diilzo-text);
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
    line-height: 1.4;
}

.dz-cart-row-name:hover {
    color: var(--diilzo-primary);
}

.dz-cart-row-store {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dz-cart-row-stock {
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 8px;
}

.dz-in-stock {
    color: #16a34a;
}

.dz-out-stock {
    color: #cc0c39;
}

.dz-cart-row-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.dz-cart-badge-sale {
    background: #DC2626;
    color: #fff;
}

.dz-cart-row-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* Quantity selector */
.dz-cart-qty {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.dz-cart-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    font-size: 18px;
    cursor: pointer;
    color: var(--diilzo-text);
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dz-cart-qty-btn:hover {
    background: var(--diilzo-primary);
    color: #fff;
}

.dz-cart-qty-btn:active {
    transform: scale(0.95);
}

.dz-cart-qty-input {
    width: 50px;
    height: 36px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

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

.dz-cart-row-remove,
.dz-cart-row-wishlist {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s;
}

.dz-cart-row-remove {
    color: #cc0c39;
}

.dz-cart-row-remove:hover {
    color: #a00;
    text-decoration: underline;
}

.dz-cart-row-wishlist {
    color: #666;
}

.dz-cart-row-wishlist:hover {
    color: var(--diilzo-primary);
}

/* Price column */
.dz-cart-row-price {
    flex-shrink: 0;
    width: 140px;
    text-align: right;
}

.dz-cart-row-unit {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}

.dz-cart-row-total {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--diilzo-text);
}

.dz-cart-row-moq {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* Bottom bar */
.dz-cart-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.dz-cart-continue-link {
    font-size: 14px;
    color: var(--diilzo-primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dz-cart-continue-link:hover {
    text-decoration: underline;
}

.dz-cart-clear-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dz-cart-clear-btn:hover {
    color: #cc0c39;
}

/* ── Summary Column ───────────────────────────────────────────── */
.dz-cart-summary-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
}

.dz-cart-summary {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.dz-cart-summary h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--diilzo-text);
}

/* Coupon */
.dz-cart-coupon {
    margin-bottom: 16px;
}

.dz-cart-coupon-row {
    display: flex;
    gap: 8px;
}

.dz-cart-coupon-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    text-transform: uppercase;
    outline: none;
    transition: border-color 0.15s;
}

.dz-cart-coupon-input:focus {
    border-color: var(--diilzo-primary);
}

.dz-cart-coupon-btn {
    padding: 10px 20px;
    background: var(--diilzo-text);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.dz-cart-coupon-btn:hover {
    background: #333;
}

.dz-cart-coupon-msg {
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
}

.dz-cart-coupon-msg.dz-coupon-ok {
    color: #16a34a;
}

.dz-cart-coupon-msg.dz-coupon-err {
    color: #cc0c39;
}

/* Summary rows */
.dz-cart-summary-rows {
    margin-bottom: 16px;
}

.dz-cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: var(--diilzo-muted);
}

.dz-cart-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 0 0;
    border-top: 2px dashed #e0e0e0;
    margin-top: 8px;
    font-size: 20px;
    font-weight: 800;
    color: var(--diilzo-text);
}

.dz-cart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: var(--diilzo-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.dz-cart-checkout-btn:hover {
    background: #00C732;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 106, 0, 0.3);
}

/* Trust badges */
.dz-cart-trust {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.dz-cart-trust-item {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dz-cart-trust-item i {
    color: #16a34a;
}

/* Payment icons */
.dz-cart-pay-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.dz-cart-pay-icons span {
    font-size: 11px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Suggestions */
.dz-cart-suggestions {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.dz-cart-suggestions h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--diilzo-text);
}

.dz-cart-suggest-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.dz-cart-suggest-list::-webkit-scrollbar {
    display: none;
}

.dz-cart-suggest-loading {
    font-size: 13px;
    color: #999;
    padding: 20px;
    text-align: center;
    width: 100%;
}

.dz-cart-suggest-card {
    flex-shrink: 0;
    width: 130px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.15s, transform 0.15s;
}

.dz-cart-suggest-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.dz-cart-suggest-card img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    background: #fafafa;
}

.dz-cart-suggest-card-body {
    padding: 8px;
}

.dz-cart-suggest-card-body h5 {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dz-cart-suggest-card-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--diilzo-primary);
}

/* ── Empty Cart ───────────────────────────────────────────────── */
.dz-cart-empty {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.dz-cart-empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: #DCF5EC;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--diilzo-primary);
}

.dz-cart-empty h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--diilzo-text);
    margin-bottom: 8px;
}

.dz-cart-empty p {
    font-size: 15px;
    color: #888;
    margin-bottom: 24px;
}

.dz-cart-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--diilzo-primary);
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: background 0.15s, transform 0.15s;
}

.dz-cart-empty-btn:hover {
    background: #00C732;
    transform: translateY(-2px);
}

/* ── Toast ────────────────────────────────────────────────────── */
.dz-cart-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #0A2E1A;
    color: #fff;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    max-width: 350px;
}

.dz-cart-toast.dz-toast-show {
    opacity: 1;
    transform: translateY(0);
}

.dz-cart-toast.dz-toast-success {
    border-left: 4px solid #16a34a;
}

.dz-cart-toast.dz-toast-error {
    border-left: 4px solid #cc0c39;
}

/* ── Responsive ───────────────────────────────────────────────── */

/* Mobile sticky checkout bar */
.dz-cart-mobile-sticky {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    padding: 12px 16px;
    z-index: 1000;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dz-cart-mobile-sticky-total {
    display: flex;
    flex-direction: column;
}

.dz-cart-mobile-sticky-total small {
    font-size: 11px;
    color: #888;
}

.dz-cart-mobile-sticky-total strong {
    font-size: 18px;
    font-weight: 800;
    color: var(--diilzo-text);
}

.dz-cart-mobile-sticky-btn {
    background: var(--diilzo-primary);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

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

    .dz-cart-summary-col {
        position: static;
    }
}

@media (max-width: 600px) {
    .dz-cart-page {
        padding: 8px;
        padding-bottom: 80px;
    }

    /* Show sticky checkout bar on mobile */
    .dz-cart-mobile-sticky {
        display: flex;
    }

    .dz-cart-header {
        padding: 14px 16px;
        margin-bottom: 12px;
    }

    .dz-cart-header h1 {
        font-size: 18px;
    }

    .dz-cart-header-count {
        font-size: 12px;
        padding: 3px 10px;
    }

    /* Select bar */
    .dz-cart-select-bar {
        flex-wrap: wrap;
        padding: 10px 14px;
        gap: 10px;
    }

    .dz-cart-price-label {
        display: none;
    }

    /* Cart row — vertical stack on mobile */
    .dz-cart-items {
        padding: 0 14px;
    }

    .dz-cart-row {
        flex-wrap: wrap;
        padding: 16px 0;
        gap: 12px;
        position: relative;
    }

    .dz-cart-row-check {
        position: absolute;
        top: 16px;
        left: 0;
    }

    .dz-cart-row-img {
        width: 80px;
        height: 80px;
        margin-left: 24px;
    }

    .dz-cart-row-info {
        width: calc(100% - 104px - 24px);
    }

    .dz-cart-row-name {
        font-size: 14px;
        line-height: 1.3;
    }

    .dz-cart-row-store {
        font-size: 11px;
    }

    .dz-cart-row-stock {
        font-size: 12px;
    }

    /* Controls wrap below */
    .dz-cart-row-controls {
        gap: 10px;
        margin-top: 10px;
        flex-wrap: wrap;
    }

    .dz-cart-qty-btn {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .dz-cart-qty-input {
        width: 44px;
        height: 34px;
        font-size: 14px;
    }

    .dz-cart-row-remove,
    .dz-cart-row-wishlist {
        font-size: 12px;
    }

    /* Price row — inline at bottom */
    .dz-cart-row-price {
        width: 100%;
        text-align: left;
        padding-left: 24px;
        display: flex;
        align-items: baseline;
        gap: 10px;
        border-top: 1px dashed #f0f0f0;
        padding-top: 10px;
    }

    .dz-cart-row-unit {
        display: inline;
        font-size: 12px;
    }

    .dz-cart-row-total {
        display: inline;
        font-size: 16px;
    }

    .dz-cart-row-moq {
        display: inline;
        margin-left: 8px;
    }

    /* Bottom bar */
    .dz-cart-bottom-bar {
        padding: 12px 14px;
    }

    .dz-cart-continue-link {
        font-size: 13px;
    }

    .dz-cart-clear-btn {
        font-size: 12px;
    }

    /* Summary */
    .dz-cart-summary {
        padding: 16px;
    }

    .dz-cart-summary h3 {
        font-size: 16px;
    }

    .dz-cart-coupon-input {
        font-size: 13px;
        padding: 8px 10px;
    }

    .dz-cart-coupon-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .dz-cart-summary-row {
        font-size: 13px;
    }

    .dz-cart-summary-total {
        font-size: 18px;
    }

    .dz-cart-checkout-btn {
        padding: 12px;
        font-size: 15px;
    }

    .dz-cart-trust-item {
        font-size: 12px;
    }

    .dz-cart-pay-icons span {
        font-size: 10px;
    }

    /* Suggestions */
    .dz-cart-suggestions {
        padding: 14px;
    }

    .dz-cart-suggest-card {
        width: 110px;
    }

    .dz-cart-suggest-card img {
        height: 80px;
    }

    /* Empty cart */
    .dz-cart-empty {
        padding: 50px 16px;
    }

    .dz-cart-empty-icon {
        width: 80px;
        height: 80px;
        font-size: 36px;
    }

    .dz-cart-empty h2 {
        font-size: 20px;
    }

    .dz-cart-empty p {
        font-size: 14px;
    }

    .dz-cart-empty-btn {
        padding: 12px 24px;
        font-size: 15px;
    }

    /* Toast — bottom center on mobile */
    .dz-cart-toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        font-size: 13px;
        padding: 12px 16px;
    }
}

@media (max-width: 380px) {
    .dz-cart-row-img {
        width: 70px;
        height: 70px;
    }

    .dz-cart-row-info {
        width: calc(100% - 94px - 24px);
    }

    .dz-cart-row-name {
        font-size: 13px;
    }

    .dz-cart-qty-btn {
        width: 30px;
        height: 30px;
    }

    .dz-cart-qty-input {
        width: 36px;
        height: 30px;
    }
}