/* ═══════════════════════════════════════════════════
 *  Dazzelit Cart – Styles
 *  Matches the provided Figma/design export exactly.
 *  No font-family declarations (inherits from theme).
 * ═══════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
    --dz-green: #0B8258;
    --dz-green-hover: #056a48;
    --dz-red: #F01B31;
    --dz-gold: #FDAA0F;
    --dz-dark: #333333;
    --dz-text: #56585B;
    --dz-text-light: #56585B;
    --dz-border: #EFEFEF;
    --dz-bg: #FFFFFF;
    --dz-bg-light: #F5F5F5;
    --dz-radius-card: 24px;
    --dz-radius-pill: 50px;
}

/* ── Page Reset ── */
.dz-cart-page {
    margin: 0 auto;
    padding: 24px 16px 48px;
    direction: rtl;
}

.dz-cart-page *,
.dz-cart-page *::before,
.dz-cart-page *::after {
    box-sizing: border-box;
}

/* ══════════════════════════════════════════════
 *  Messages
 * ══════════════════════════════════════════════ */
.dz-cart-messages:empty {
    display: none;
}

.dz-cart-msg {
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.dz-cart-msg--success {
    background: #e8f5e9;
    color: var(--dz-green);
    border: 1px solid #c8e6c9;
}

.dz-cart-msg--error {
    background: #fce4ec;
    color: var(--dz-red);
    border: 1px solid #f8bbd0;
}

/* ══════════════════════════════════════════════
 *  Header
 * ══════════════════════════════════════════════ */
.dz-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dz-cart-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dz-cart-title h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dz-dark);
    margin: 0;
    line-height: 1.4;
}

.dz-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 26px;
    padding: 0 8px;
    border-radius: 13px;
    background: var(--dz-gold);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.dz-empty-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--dz-radius-pill);
    border: 1px solid var(--dz-border);
    background: var(--dz-bg);
    color: var(--dz-text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.dz-empty-cart-btn:hover {
    border-color: var(--dz-text-light);
    background: #fafafa;
}

.dz-empty-cart-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════
 *  Content layout (two-column desktop)
 * ══════════════════════════════════════════════ */
.dz-cart-content {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.dz-cart-main {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.dz-cart-sidebar {
    width: 380px;
    flex-shrink: 0;
    position: sticky;
    top: 24px;
}

/* ══════════════════════════════════════════════
 *  Cart Items
 * ══════════════════════════════════════════════ */
.dz-cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dz-cart-item {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 8px 8px 8px 32px;
    border: 1px solid var(--dz-border);
    border-radius: var(--dz-radius-card);
    background: var(--dz-bg);
    transition: box-shadow 0.2s ease;
}

.dz-cart-item:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* ── Product group (image + details) ── */
.dz-item-product {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.dz-item-image {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
}

.dz-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.dz-item-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--dz-dark);
    margin: 0 0 6px;
    line-height: 1.5;
}

.dz-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--dz-text-light);
    line-height: 1.5;
}

.dz-meta-sep::before {
    content: '·';
    display: inline-block;
    margin: 0 6px;
    color: var(--dz-text-light);
}

/* ── Separators (vertical lines) ── */
.dz-item-sep,
.dz-item-sep-inner {
    width: 1px;
    height: 32px;
    background: var(--dz-border);
    flex-shrink: 0;
    margin: 0 20px;
    border-radius: 1px;
}

/* ── Actions group (qty + price + remove) ── */
.dz-item-actions {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

/* ── Quantity controls ── */
.dz-item-qty {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--dz-border);
    border-radius: var(--dz-radius-pill);
    height: 44px;
    padding: 0 4px;
    flex-shrink: 0;
}

.dz-qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--dz-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    padding: 0;
}

.dz-qty-btn:hover {
    background: #f0f0f0;
}

.dz-qty-btn svg {
    width: 12px;
    height: 12px;
}

.dz-qty-value {
    min-width: 28px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--dz-dark);
    line-height: 1;
    user-select: none;
}

/* ── Price ── */
.dz-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex-shrink: 0;
}

.dz-price-line {
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}

.dz-price-amount {
    font-size: 15px;
    font-weight: 700;
    color: var(--dz-dark);
}

.dz-price-currency {
    font-size: 12px;
    color: var(--dz-text-light);
}

.dz-price-old-line {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dz-badge-discount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 22px;
    padding: 0 8px;
    border-radius: 11px;
    background: var(--dz-red);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.dz-price-regular {
    font-size: 13px;
    color: var(--dz-text-light);
    text-decoration: line-through;
}

/* ── Remove button ── */
.dz-item-remove {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--dz-border);
    background: var(--dz-bg);
    color: var(--dz-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 0;
    margin-left: 0;
    transition: all 0.15s ease;
    padding: 0;
}

.dz-item-remove:hover {
    border-color: var(--dz-red);
    color: var(--dz-red);
    background: #fff5f5;
}

.dz-item-remove svg {
    width: 12px;
    height: 12px;
}

/* ══════════════════════════════════════════════
 *  Coupon
 * ══════════════════════════════════════════════ */
.dz-cart-coupon {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 20px;
}

.dz-coupon-input-wrap {
    flex: 1;
}

.dz-coupon-input {
    width: 100% !important;
    height: 48px !important;
    padding: 0 20px !important;
    border: 1px solid var(--dz-border) !important;
    border-radius: var(--dz-radius-pill) !important;
    background: var(--dz-bg-light) !important;
    color: var(--dz-dark) !important;
    font-size: 14px !important;
    outline: none !important;
    transition: border-color 0.2s ease !important;
}

.dz-coupon-input::placeholder {
    color: var(--dz-text-light);
}

.dz-coupon-input:focus {
    border-color: var(--dz-green);
}

.dz-coupon-btn {
    height: 48px;
    padding: 0 28px;
    border: none;
    border-radius: var(--dz-radius-pill);
    background: var(--dz-green);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.dz-coupon-btn:hover {
    background: var(--dz-green-hover);
}

/* Applied coupons */
.dz-applied-coupons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.dz-applied-coupon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 16px;
    background: #e8f5e9;
    color: var(--dz-green);
    font-size: 13px;
    font-weight: 600;
}

.dz-remove-coupon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    color: var(--dz-green);
    cursor: pointer;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background 0.15s ease;
}

.dz-remove-coupon:hover {
    background: rgba(0, 0, 0, 0.15);
}

/* ══════════════════════════════════════════════
 *  Order Summary (Sidebar)
 * ══════════════════════════════════════════════ */
.dz-cart-summary {
    background: var(--dz-bg);
    border: 1px solid var(--dz-border);
    border-radius: var(--dz-radius-card);
    padding: 24px;
}

.dz-summary-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dz-dark);
    text-align: center;
    margin: 0 0 20px;
    line-height: 1.5;
}

.dz-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.dz-summary-label {
    font-size: 14px;
    color: var(--dz-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dz-summary-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--dz-dark);
}

/* Discount row */
.dz-summary-discount .dz-summary-label {
    color: var(--dz-red);
}

.dz-summary-discount .dz-summary-value {
    color: var(--dz-red);
}

/* Divider */
.dz-summary-divider {
    height: 1px;
    background: var(--dz-border);
    margin: 4px 0;
}

/* Total row */
.dz-summary-total .dz-summary-label {
    color: var(--dz-green);
    font-weight: 700;
}

.dz-summary-total .dz-summary-value {
    color: var(--dz-green);
    font-weight: 700;
    font-size: 15px;
}

/* ── Checkout Button ── */
.dz-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    margin-top: 20px;
    border-radius: var(--dz-radius-pill);
    background: var(--dz-green);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.dz-checkout-btn:hover {
    background: var(--dz-green-hover);
    color: #fff;
    text-decoration: none;
}

.dz-checkout-btn:active {
    transform: scale(0.98);
}

/* ── Cart Notice ── */
.dz-cart-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    font-size: 12px;
    color: var(--dz-text-light);
    line-height: 1.7;
}

.dz-cart-notice svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--dz-text-light);
}

.dz-cart-notice p {
    margin: 0;
}

/* ══════════════════════════════════════════════
 *  Empty State
 * ══════════════════════════════════════════════ */
.dz-cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 24px;
    text-align: center;
}

.dz-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dz-text);
    margin: 0;
}

.dz-empty-shop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 32px;
    border-radius: var(--dz-radius-pill);
    background: var(--dz-green);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.dz-empty-shop-btn:hover {
    background: var(--dz-green-hover);
    color: #fff !important;
    text-decoration: none;
}

/* ══════════════════════════════════════════════
 *  Loading overlay
 * ══════════════════════════════════════════════ */
.dz-cart-page.dz-loading {
    position: relative;
    pointer-events: none;
}

.dz-cart-page.dz-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
    z-index: 10;
    border-radius: 8px;
}

/* ══════════════════════════════════════════════
 *  Animations
 * ══════════════════════════════════════════════ */
.dz-cart-item {
    animation: dz-fadeIn 0.3s ease;
}

@keyframes dz-fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dz-cart-item.dz-removing {
    animation: dz-fadeOut 0.3s ease forwards;
}

@keyframes dz-fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

/* ══════════════════════════════════════════════
 *  Mobile – max-width: 768px
 * ══════════════════════════════════════════════ */
@media (max-width: 768px) {

    .dz-cart-page {
        padding: 16px 12px 32px;
    }

    /* Header */
    .dz-cart-title h1 {
        font-size: 16px;
    }

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

    /* Single column */
    .dz-cart-content {
        flex-direction: column;
        gap: 16px;
    }

    .dz-cart-sidebar {
        width: 100%;
        position: static;
    }

    /* ── Cart item (mobile layout) ── */
    .dz-cart-item {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 12px;
    }

    /* Product info row stays horizontal */
    .dz-item-product {
        gap: 12px;
    }

    .dz-item-image {
        width: 80px;
        height: 80px;
    }

    .dz-item-name {
        font-size: 14px;
    }

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

    /* Hide desktop separators */
    .dz-item-sep,
    .dz-item-sep-inner {
        display: none;
    }

    /* Actions row */
    .dz-item-actions {
        display: flex;
        flex-direction: row-reverse;
        justify-content: space-between;
        align-items: flex-end;
        width: 100%;
        gap: 8px;
    }

    /* Price moves to end (left side visually in RTL row-reverse) */
    .dz-item-price {
        align-items: flex-start;
    }

    /* Qty + remove grouped on the right (start) */
    .dz-item-qty {
        height: 38px;
    }

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

    .dz-qty-value {
        font-size: 14px;
    }

    .dz-item-remove {
        width: 38px;
        height: 38px;
    }

    .dz-price-amount {
        font-size: 14px;
    }

    /* Coupon stacked */
    .dz-cart-coupon {
        flex-direction: column;
        gap: 10px;
    }

    .dz-coupon-btn {
        width: 100%;
    }

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

    /* Checkout button */
    .dz-checkout-btn {
        height: 52px;
        font-size: 15px;
    }
}

/* ═══════════════════════════════════════════════════
 *  Theme Overrides & Reset (Anti-Bleeding)
 * ═══════════════════════════════════════════════════ */

/* 1. General reset to cancel theme's aggressive button/input styling */
.woocommerce .dz-cart-page button,
.woocommerce .dz-cart-page input,
.woocommerce .dz-cart-page select,
.woocommerce .dz-cart-page a.button {
    float: none !important;
    position: static !important;
    box-shadow: none !important;
    text-shadow: none !important;
    margin: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* 2. Empty Cart Button (Force transparent background, thin border, correct color) */
.woocommerce .dz-cart-page .dz-empty-cart-btn {
    background-color: var(--dz-bg) !important;
    background: var(--dz-bg) !important;
    border: 1px solid var(--dz-border) !important;
    color: var(--dz-text) !important;
    padding: 10px 20px !important;
    border-radius: var(--dz-radius-pill) !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    height: auto !important;
    line-height: 1.4 !important;
    transition: all 0.2s ease !important;
}

.woocommerce .dz-cart-page .dz-empty-cart-btn:hover {
    border-color: var(--dz-text-light) !important;
    background-color: #fafafa !important;
    background: #fafafa !important;
    color: var(--dz-dark) !important;
}

.woocommerce .dz-cart-page .dz-empty-cart-btn svg {
    color: inherit !important;
    stroke: currentColor !important;
}

/* 3. Quantity Pill (Ensure it is white, has thin border, resets buttons) */
.woocommerce .dz-cart-page .dz-item-qty {
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid var(--dz-border) !important;
    border-radius: var(--dz-radius-pill) !important;
    height: 44px !important;
    padding: 0 4px !important;
    background-color: #FFFFFF !important;
    background: #FFFFFF !important;
    gap: 0 !important;
    float: none !important;
}

.woocommerce .dz-cart-page .dz-qty-btn {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    color: var(--dz-text) !important;
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
}

.woocommerce .dz-cart-page .dz-qty-btn:hover {
    background-color: #f0f0f0 !important;
    background: #f0f0f0 !important;
    color: var(--dz-dark) !important;
}

.woocommerce .dz-cart-page .dz-qty-btn svg {
    stroke: currentColor !important;
    fill: none !important;
    width: 12px !important;
    height: 12px !important;
}

/* 4. Remove Button (Force white circle, gray border, gray cross icon) */
.woocommerce .dz-cart-page .dz-item-remove {
    background-color: var(--dz-bg) !important;
    background: var(--dz-bg) !important;
    border: 1px solid var(--dz-border) !important;
    color: var(--dz-text) !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    float: none !important;
}

.woocommerce .dz-cart-page .dz-item-remove:hover {
    border-color: var(--dz-red) !important;
    color: var(--dz-red) !important;
    background-color: #fff5f5 !important;
    background: #fff5f5 !important;
}

.woocommerce .dz-cart-page .dz-item-remove svg {
    stroke: currentColor !important;
    fill: none !important;
    width: 12px !important;
    height: 12px !important;
}

/* 5. Checkout Button (Force green background, white text) */
.woocommerce .dz-cart-page .dz-checkout-btn {
    background-color: var(--dz-green) !important;
    background: var(--dz-green) !important;
    color: #FFFFFF !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 56px !important;
    border-radius: var(--dz-radius-pill) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
    transition: background-color 0.2s ease !important;
}

.woocommerce .dz-cart-page .dz-checkout-btn:hover {
    background-color: var(--dz-green-hover) !important;
    background: var(--dz-green-hover) !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
}

/* 6. Coupon Apply Button (Force green background, white text) */
.woocommerce .dz-cart-page .dz-coupon-btn {
    background-color: var(--dz-green) !important;
    background: var(--dz-green) !important;
    color: #FFFFFF !important;
    height: 48px !important;
    padding: 0 28px !important;
    border-radius: var(--dz-radius-pill) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.2s ease !important;
}

.woocommerce .dz-cart-page .dz-coupon-btn:hover {
    background-color: var(--dz-green-hover) !important;
    background: var(--dz-green-hover) !important;
    color: #FFFFFF !important;
}

/* 7. Attributes dot replacement to vertical bar */
.woocommerce .dz-cart-page .dz-meta-sep::before {
    content: '|' !important;
    display: inline-block !important;
    margin: 0 10px !important;
    color: var(--dz-text-light) !important;
    font-weight: 300 !important;
}

/* 8. Make sure separator lines are rendered properly on desktop, hidden on mobile */
@media (min-width: 769px) {

    .woocommerce .dz-cart-page .dz-item-sep,
    .woocommerce .dz-cart-page .dz-item-sep-inner {
        width: 1px !important;
        height: 32px !important;
        background-color: var(--dz-border) !important;
        background: var(--dz-border) !important;
        display: block !important;
        margin: 0 20px !important;
        border-radius: 1px !important;
        flex-shrink: 0 !important;
    }
}

@media (max-width: 768px) {

    .woocommerce .dz-cart-page .dz-item-sep,
    .woocommerce .dz-cart-page .dz-item-sep-inner {
        display: none !important;
    }
}

/* 9. Flex Layout Ordering for exact match on Desktop vs Mobile */
@media (min-width: 769px) {
    .woocommerce .dz-cart-page .dz-item-qty {
        order: 1 !important;
    }

    .woocommerce .dz-cart-page .dz-item-sep-inner:nth-of-type(1) {
        order: 2 !important;
    }

    .woocommerce .dz-cart-page .dz-item-price {
        order: 3 !important;
    }

    .woocommerce .dz-cart-page .dz-item-sep-inner:nth-of-type(2) {
        order: 4 !important;
    }

    .woocommerce .dz-cart-page .dz-item-remove {
        order: 5 !important;
    }
}

@media (max-width: 768px) {
    .woocommerce .dz-cart-page .dz-item-qty {
        order: 1 !important;
    }

    .woocommerce .dz-cart-page .dz-item-remove {
        order: 2 !important;
        margin-left: auto !important;
    }

    .woocommerce .dz-cart-page .dz-item-price {
        order: 3 !important;
    }

    .woocommerce .dz-cart-page .dz-item-actions {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
}

/* 10. Adjust price currency spacing slightly for premium look */
.woocommerce .dz-cart-page .dz-price-currency {
    margin-right: 4px !important;
}