/* CartHalo Frontend Styles */
.chdc-side-cart, .chdc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.chdc-side-cart.is-open, .chdc-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.chdc-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

/* Side Drawer */
.chdc-drawer {
    position: absolute;
    top: 0;
    width: 380px;
    max-width: 85vw;
    height: 100%;
    background: #fff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.chdc-position-right .chdc-drawer {
    right: 0;
    transform: translateX(100%);
}

.chdc-position-left .chdc-drawer {
    left: 0;
    transform: translateX(-100%);
}

.chdc-side-cart.is-open .chdc-drawer {
    transform: translateX(0);
}

.chdc-header, .chdc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.chdc-close-btn, .chdc-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.chdc-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.chdc-item-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.chdc-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
}

.chdc-item-img img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.chdc-item-details {
    flex: 1;
}

.chdc-qty-controls {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.chdc-qty-btn {
    width: 25px;
    height: 25px;
    border: 1px solid #ccc;
    background: #f0f0f0;
    cursor: pointer;
}

.chdc-qty-input {
    width: 35px;
    text-align: center;
    border: 1px solid #ccc;
    margin: 0 5px;
}

.chdc-remove-btn {
    position: absolute;
    right: 0;
    top: 0;
    background: none;
    border: none;
    color: red;
    font-size: 18px;
    cursor: pointer;
}

.chdc-cart-footer {
    border-top: 1px solid #eee;
    padding: 20px;
}

.chdc-coupon-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.chdc-coupon-form input {
    flex: 1;
    padding: 6px;
}

.chdc-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    margin-bottom: 15px;
}

.chdc-btn-checkout, .chdc-buy-now-btn {
    width: 100%;
    background-color: var(--chdc-primary);
    color: #fff;
    border: none;
    padding: 12px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
}

.chdc-buy-now-btn {
    margin-top: 10px;
}

/* Modal Window */
.chdc-modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--chdc-popup-width);
    max-width: 90vw;
    max-height: 90vh;
    background: #fff;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
}

.chdc-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.chdc-loading-state {
    opacity: 0.5;
    pointer-events: none;
}