/* Cart dropdown open state and overlay */
#header .blockcart .cart_block.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

#header .header-top .overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#header .header-top .overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Cart items list */
#header .blockcart .cart-items-container {
    padding: 15px 20px;
    max-height: 75vh;
    overflow-y: auto;
}

#header .blockcart .cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
    align-items: flex-start;
}

#header .blockcart .cart-item:last-of-type {
    border-bottom: none;
}

#header .blockcart .cart-item-img {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    display: block;
    overflow: hidden;
    border: 1px solid #eee;
}

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

#header .blockcart .cart-item-details {
    flex: 1;
    min-width: 0;
    position: relative;
    padding-right: 24px;
}

#header .blockcart .cart-item-name {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    text-decoration: none;
}

#header .blockcart .cart-item-name:hover {
    color: #146cda;
}

#header .blockcart .cart-item-variant {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

#header .blockcart .cart-item-variants {
    margin-top: 6px;
    border-top: 1px dashed #e5e5e5;
    padding-top: 6px;
}

#header .blockcart .cart-variant {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    font-size: 12px;
    color: #555;
}

#header .blockcart .cart-variant-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#header .blockcart .cart-variant-qty {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

#header .blockcart .cart-variant-remove {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #999;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}

#header .blockcart .cart-variant-remove:hover {
    background: #fee;
    color: #c00;
}

#header .blockcart .cart-item-price {
    font-size: 13px;
    color: #666;
    display: block;
}

#header .blockcart .cart-item-subtotal {
    font-weight: 600;
    color: #333;
    display: block;
    margin-top: 4px;
}

#header .blockcart .cart-item-remove {
    position: absolute;
    top: 0;
    right: 0;
    width: 28px;
    height: 28px;
    border: none;
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#header .blockcart .cart-item-remove:hover {
    background: #eee;
    color: #c00;
}

#header .blockcart .cart-footer {
    padding: 15px 20px 20px;
    border-top: 1px solid #e5e5e5;
    margin-top: auto;
}

#header .blockcart .cart-total {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

#header .blockcart .cart-total-value {
    float: right;
}

#header .blockcart .cart-checkout-btn {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    box-sizing: border-box;
}
