/**
 * Winkelwagen pagina — custom layout
 *
 * Design tokens consistent met Darkshop PDP.
 *
 * @package DarkshopCart
 */

/* ── Variables ────────────────────────────────────── */
:root {
    --dsc-primary: #1a1a1a;
    --dsc-accent: #4CAF50;
    --dsc-bg: #ffffff;
    --dsc-bg-subtle: #f5f5f5;
    --dsc-border: #e0e0e0;
    --dsc-text: #1a1a1a;
    --dsc-text-muted: #666;
    --dsc-radius: 12px;
    --dsc-radius-sm: 8px;
    --dsc-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Cart wrapper ─────────────────────────────────── */
.dsc-cart {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 60px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Verberg WC defaults */
.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper,
.woocommerce-cart .woocommerce > .cart-empty,
.woocommerce-cart .woocommerce > .return-to-shop,
.woocommerce-cart .shop_table.cart,
.woocommerce-cart .cart_totals,
.woocommerce-cart .cart-collaterals,
.woocommerce-cart .woocommerce > form.woocommerce-cart-form {
    display: none !important;
}

/* ── Header ───────────────────────────────────────── */
.dsc-cart__header {
    padding: 24px 0 16px;
}

.dsc-cart__title {
    font-size: 28px;
    font-weight: 800;
    color: var(--dsc-text);
    margin: 0;
}

.dsc-cart__count {
    font-weight: 400;
    color: var(--dsc-text-muted);
    font-size: 20px;
}

/* ── Shipping threshold ───────────────────────────── */
.dsc-cart__shipping {
    margin-bottom: 24px;
    padding: 14px 18px;
    background: var(--dsc-bg-subtle);
    border-radius: var(--dsc-radius);
}

.dsc-cart__ship-ok {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dsc-accent);
}

.dsc-cart__ship-msg {
    font-size: 14px;
    color: var(--dsc-text);
    margin-bottom: 8px;
}

.dsc-cart__progress {
    height: 6px;
    background: var(--dsc-border);
    border-radius: 3px;
    overflow: hidden;
}

.dsc-cart__progress-bar {
    height: 100%;
    background: var(--dsc-accent);
    border-radius: 3px;
    transition: width var(--dsc-transition);
}

/* ── Layout ───────────────────────────────────────── */
.dsc-cart__layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

/* ── Items ────────────────────────────────────────── */
.dsc-cart__items {
    flex: 1;
    min-width: 0;
}

.dsc-cart__item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--dsc-border);
    transition: opacity var(--dsc-transition);
}

.dsc-cart__item:first-child {
    padding-top: 0;
}

.dsc-cart__item.removing {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

.dsc-cart__item-img {
    width: 100px;
    height: 100px;
    border-radius: var(--dsc-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--dsc-bg-subtle);
}

.dsc-cart__item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dsc-cart__item-img a {
    display: block;
    width: 100%;
    height: 100%;
}

.dsc-cart__item-info {
    flex: 1;
    min-width: 0;
}

.dsc-cart__item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--dsc-text);
    line-height: 1.3;
    margin-bottom: 4px;
}

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

.dsc-cart__item-name a:hover {
    text-decoration: underline;
}

.dsc-cart__item-meta {
    font-size: 13px;
    color: var(--dsc-text-muted);
    margin-bottom: 6px;
}

.dsc-cart__item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--dsc-text);
}

.dsc-cart__item-price del {
    font-size: 13px;
    color: var(--dsc-text-muted);
    font-weight: 400;
    margin-right: 4px;
}

.dsc-cart__item-price ins {
    text-decoration: none;
}

/* ── Actions: qty + remove ────────────────────────── */
.dsc-cart__item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.dsc-cart__qty {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--dsc-border);
    border-radius: var(--dsc-radius-sm);
    overflow: hidden;
}

.dsc-cart__qb {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--dsc-bg);
    font-size: 18px;
    font-weight: 500;
    color: var(--dsc-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--dsc-transition);
    padding: 0;
}

.dsc-cart__qb:hover {
    background: var(--dsc-bg-subtle);
}

.dsc-cart__qb:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.dsc-cart__qn {
    width: 32px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--dsc-text);
}

.dsc-cart__remove {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--dsc-text-muted);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--dsc-transition);
}

.dsc-cart__remove:hover {
    background: #fee;
    color: #d32f2f;
}

/* ── Summary ──────────────────────────────────────── */
.dsc-cart__summary {
    width: 360px;
    flex-shrink: 0;
    background: var(--dsc-bg-subtle);
    border-radius: var(--dsc-radius);
    padding: 28px;
    position: sticky;
    top: 100px;
}

.dsc-cart__sum-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #444;
    margin-bottom: 12px;
}

.dsc-cart__sum-ship {
    color: var(--dsc-accent);
    font-size: 13px;
}

.dsc-cart__sum-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 800;
    color: var(--dsc-text);
    padding-top: 16px;
    margin-bottom: 24px;
    border-top: 1.5px solid var(--dsc-border);
}

.dsc-cart__checkout {
    display: block;
    width: 100%;
    padding: 18px;
    background: var(--dsc-accent);
    color: #fff;
    border: none;
    border-radius: var(--dsc-radius);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--dsc-transition);
    margin-bottom: 24px;
}

.dsc-cart__checkout:hover {
    background: #43A047;
    color: #fff;
}

/* USPs */
.dsc-cart__usps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.dsc-cart__usp {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dsc-cart__usp svg {
    flex-shrink: 0;
}

/* Betaalmethoden */
.dsc-cart__payments {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--dsc-border);
}

.dsc-cart__pay-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--dsc-text-muted);
    background: var(--dsc-bg);
    border: 1px solid var(--dsc-border);
    border-radius: 4px;
    padding: 4px 10px;
    letter-spacing: 0.3px;
}

/* ── Suggestions ──────────────────────────────────── */
.dsc-cart__suggestions {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--dsc-border);
}

.dsc-cart__sug-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dsc-text);
    margin: 0 0 20px;
}

.dsc-cart__sug-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

.dsc-cart__sug-track::-webkit-scrollbar {
    display: none;
}

.dsc-cart__sug-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
    text-decoration: none;
    color: var(--dsc-text);
    transition: transform var(--dsc-transition);
}

.dsc-cart__sug-card:hover {
    transform: translateY(-4px);
}

.dsc-cart__sug-img {
    width: 200px;
    height: 200px;
    border-radius: var(--dsc-radius);
    overflow: hidden;
    background: var(--dsc-bg-subtle);
    margin-bottom: 10px;
}

.dsc-cart__sug-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dsc-cart__sug-name {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dsc-cart__sug-price {
    font-size: 14px;
    font-weight: 700;
}

.dsc-cart__sug-price del {
    font-size: 12px;
    color: var(--dsc-text-muted);
    font-weight: 400;
}

.dsc-cart__sug-price ins {
    text-decoration: none;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .dsc-cart__layout {
        flex-direction: column;
        gap: 24px;
    }

    .dsc-cart__summary {
        width: 100%;
        position: static;
    }

    .dsc-cart__title {
        font-size: 22px;
    }

    .dsc-cart__item-img {
        width: 80px;
        height: 80px;
    }

    .dsc-cart__sug-card {
        flex: 0 0 160px;
    }

    .dsc-cart__sug-img {
        width: 160px;
        height: 160px;
    }
}

/* ── Sticky checkout (mobiel) ─────────────────────── */
@media (max-width: 768px) {
    .dsc-cart__checkout-sticky {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999;
        background: var(--dsc-bg);
        padding: 12px 16px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--dsc-border);
    }

    .dsc-cart__checkout-sticky .dsc-cart__checkout {
        margin-bottom: 0;
    }

    .dsc-cart {
        padding-bottom: 100px;
    }
}

/* ── Swipe-to-delete hint ─────────────────────────── */
@media (max-width: 768px) {
    .dsc-cart__item {
        position: relative;
        overflow: hidden;
    }
}
