/* Cart Drawer / Sidebar Styles */

.happigoo-cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    color: #102036;
    box-shadow: -10px 0 40px rgba(10, 20, 40, 0.18);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease-in-out;
    padding-top: 0;
    border-left: 1px solid rgba(16, 32, 54, 0.1);
    backdrop-filter: none;
    overflow: hidden;
}

.happigoo-cart-drawer.active {
    right: 0; 
}

.happigoo-cart-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.happigoo-cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 15, 28, 0.35);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    pointer-events: none;
}

.happigoo-cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.happigoo-cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    padding: 20px;
    border-bottom: 1px solid rgba(16, 32, 54, 0.08);
    background: #f8fafc;
}

.happigoo-cart-drawer-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: inherit;
}

.happigoo-cart-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: rgba(16, 32, 54, 0.6);
    transition: color 0.2s;
}

.happigoo-cart-drawer-close:hover {
    color: #102036;
}

.happigoo-cart-drawer-items {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
}

.happigoo-cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(16, 32, 54, 0.08);
    align-items: flex-start;
}

.happigoo-cart-item:last-child {
    border-bottom: none;
}

.happigoo-cart-item-image {
    width: 60px;
    height: 60px;
    background: #f3f6fa;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(16, 32, 54, 0.08);
}

.happigoo-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.happigoo-cart-item-details {
    flex: 1;
    min-width: 0;
}

.happigoo-cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #102036;
    margin: 0 0 4px 0;
}

.happigoo-cart-item-meta {
    font-size: 13px;
    color: rgba(16, 32, 54, 0.65);
    margin: 0;
}

.happigoo-cart-item-qty {
    font-size: 13px;
    color: rgba(16, 32, 54, 0.55);
    margin-top: 4px;
}

.happigoo-cart-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #0b1b2b;
}

.happigoo-cart-item-delete {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: rgba(16, 32, 54, 0.45);
    transition: color 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.happigoo-cart-item-delete:hover {
    color: #ff5f56;
}

.happigoo-cart-empty {
    text-align: center;
    color: rgba(16, 32, 54, 0.6);
    padding: 40px 20px;
    margin: 0;
}

.happigoo-cart-drawer-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    padding: 24px 20px;
    border-top: 1px solid rgba(16, 32, 54, 0.08);
    background: #f8fafc;
}

.happigoo-cart-total-label {
    font-size: 16px;
    font-weight: 600;
    color: inherit;
}

.happigoo-cart-total-amount {
    font-size: 18px;
    font-weight: 700;
    color: #0b1b2b;
}

.happigoo-cart-drawer-actions {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid rgba(16, 32, 54, 0.08);
}

.happigoo-cart-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
    display: block;
}

.happigoo-cart-btn-primary {
    background: #0b1b2b;
    color: #fff;
}

.happigoo-cart-btn-primary:hover {
    background: #1a3a5a;
}

.happigoo-cart-btn-secondary {
    background: #eef3f8;
    color: #102036;
}

.happigoo-cart-btn-secondary:hover {
    background: #e3ebf3;
}

.happigoo-cart-btn-danger {
    background: #fff3f2;
    color: #b42318;
    border: 1px solid #f7c4bf;
}

.happigoo-cart-btn-danger:hover {
    background: #fee4e2;
}

.happigoo-cart-btn.is-disabled,
.happigoo-cart-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .happigoo-cart-drawer {
        width: 100%;
        right: -100%;
    }
}
