/**
 * Cart Drawer Styles
 * Reusable cart drawer component
 */

/* Bundle Product Personalization Styles */
.bundle-product-personalization {
    margin-top: 6px;
    padding: 6px 8px;
    background: #e8f5e9;
    border-radius: 4px;
    font-size: 11px;
}

.bundle-pers-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 2px;
}

.bundle-pers-item:last-child {
    margin-bottom: 0;
}

.bundle-pers-label {
    font-weight: 600;
    color: #2e7d32;
    white-space: nowrap;
}

.bundle-pers-value {
    color: #1b5e20;
    word-break: break-word;
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    right: 0;
}

/* Cart Header */
.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.cart-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-grey);
    transition: var(--transition);
}

.cart-close:hover {
    color: var(--primary-red);
}

/* Cart Body */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    padding: 60px 0;
}

.cart-empty i {
    font-size: 48px;
    color: var(--medium-grey);
    margin-bottom: 20px;
    display: block;
}

.cart-empty p {
    color: var(--medium-grey);
    font-size: 16px;
}

/* Cart Items */
.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--light-grey);
}

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

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--light-grey);
    flex-shrink: 0;
}

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

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: var(--primary-black);
}

.cart-item-price {
    color: var(--primary-red);
    font-weight: 600;
    font-size: 14px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.cart-qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}

.cart-qty-btn:hover {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

.cart-qty-value {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    font-size: 14px;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--medium-grey);
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}

.cart-item-remove:hover {
    color: var(--primary-red);
}

/* Cart Footer */
.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    background: var(--light-grey);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.cart-total-amount {
    color: var(--primary-red);
    font-size: 24px;
}

.btn-block {
    width: 100%;
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
}

.cart-overlay.active {
    display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cart-drawer {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .cart-header {
        padding: 15px;
    }

    .cart-body {
        padding: 15px;
    }

    .cart-footer {
        padding: 15px;
    }

    .cart-item {
        gap: 10px;
        padding: 12px 0;
    }

    .cart-item-image {
        width: 50px;
        height: 50px;
    }

    .cart-total {
        font-size: 16px;
    }

    .cart-total-amount {
        font-size: 20px;
    }
}