/* Envifloors slide-out cart drawer */

#efCartOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 100000;
}

    #efCartOverlay.dcd-open {
        opacity: 1;
        visibility: visible;
    }

#efCartDrawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 92vw;
    background: #fff;
    box-shadow: -4px 0 18px rgba(0, 0, 0, 0.25);
    transform: translateX(105%);
    transition: transform 0.28s ease;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    font-family: inherit;
}

    #efCartDrawer.dcd-open {
        transform: translateX(0);
    }

.dcd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f8f8;
}

.dcd-title {
    font-size: 17px;
    font-weight: bold;
    color: #333;
}

    .dcd-title .dcd-check {
        color: #5cb85c;
        margin-right: 6px;
    }

.dcd-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
}

    .dcd-close:hover {
        color: #333;
    }

.dcd-status {
    display: none;
    padding: 10px 18px;
    font-size: 13px;
    line-height: 1.45;
}

    .dcd-status.dcd-status-info {
        display: block;
        background: #d9edf7;
        color: #31708f;
    }

    .dcd-status.dcd-status-warn {
        display: block;
        background: #fcf8e3;
        color: #8a6d3b;
    }

.dcd-items {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 8px 18px;
}

.dcd-empty {
    color: #777;
    text-align: center;
    padding: 30px 0;
}

.dcd-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 22px 12px 0;
    border-bottom: 1px solid #eee;
    position: relative;
}

    .dcd-item:last-child {
        border-bottom: none;
    }

.dcd-item-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    margin-right: 12px;
    flex-shrink: 0;
    background: #fafafa;
}

.dcd-item-info {
    flex: 1 1 auto;
    min-width: 0;
}

.dcd-item-name {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin: 0 0 3px;
    line-height: 1.35;
}

.dcd-item-meta {
    font-size: 12px;
    color: #777;
}

.dcd-item-price {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin-left: 10px;
    white-space: nowrap;
}

.dcd-item-sample-badge {
    display: inline-block;
    background: #5cb85c;
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
    vertical-align: middle;
}

.dcd-footer {
    border-top: 1px solid #e5e5e5;
    padding: 14px 18px 16px;
    background: #fafafa;
}

.dcd-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
}

.dcd-subtotal-value {
    font-weight: bold;
}

.dcd-checkout {
    display: block;
    width: 100%;
    text-align: center;
    background: #5cb85c;
    border: 1px solid #4cae4c;
    color: #fff !important;
    font-size: 15px;
    font-weight: bold;
    padding: 10px 12px;
    border-radius: 4px;
    text-decoration: none !important;
    margin-bottom: 8px;
}

    .dcd-checkout:hover,
    .dcd-checkout:focus {
        background: #449d44;
        color: #fff;
    }

.dcd-continue {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #5cb85c !important;
    text-decoration: underline;
    cursor: pointer;
}

.dcd-checkout[disabled],
.dcd-checkout.dcd-disabled {
    opacity: 0.5;
    pointer-events: none;
}

@media (max-width: 480px) {
    #efCartDrawer {
        width: 100vw;
        max-width: 100vw;
    }
}

/* ------------------------------------------------------------------ */
/* Header cart badge                                                   */
/* Injected by js/cart-drawer.js into the header's viewcart link. */
/* ------------------------------------------------------------------ */

/* The header is CMS-managed, so this only adds a positioning context and lets
   the badge escape the link box — it deliberately does not touch display,
   size or spacing of the existing header link. */
.ef-cart-link {
    position: relative;
    overflow: visible;
}

.ef-cart-badge {
    position: absolute;
    top: -7px;
    right: -9px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    box-sizing: border-box;
    border-radius: 9px;
    background: #d9534f;
    border: 1px solid #fff;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    line-height: 15px;
    text-align: center;
    text-decoration: none;
    letter-spacing: 0;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
}

.ef-cart-badge-empty {
    display: none;
}

.ef-cart-badge-pop {
    animation: efCartBadgePop 0.45s ease-out;
}

@keyframes efCartBadgePop {
    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.45);
    }

    70% {
        transform: scale(0.92);
    }

    100% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ef-cart-badge-pop {
        animation: none;
    }
}


/* Envifloors cart drawer — qty stepper + remove button additions */

.dcd-item-qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.dcd-qty-btn {
    width: 22px;
    height: 22px;
    line-height: 20px;
    padding: 0;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    font-size: 14px;
    border-radius: 3px;
    cursor: pointer;
}

    .dcd-qty-btn:hover {
        background: #f2f2f2;
    }

.dcd-qty-value {
    min-width: 18px;
    text-align: center;
    font-size: 13px;
}

.dcd-item-remove {
    position: absolute;
    top: 12px;
    right: 0;
    width: 20px;
    height: 20px;
    line-height: 18px;
    padding: 0;
    border: none;
    background: transparent;
    color: #999;
    font-size: 16px;
    cursor: pointer;
}

    .dcd-item-remove:hover {
        color: #c0392b;
    }

.dcd-item-unit {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}
